generated-configure.sh revision 2260:13a8f3836051
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
948ZIP
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
1295ZIP
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  ZIP         Override default value for ZIP
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
3661
3662# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3663# $1: variable to set
3664# $2: executable name (or list of names) to look for
3665
3666
3667# Like BASIC_PATH_PROGS but fails if no tool was found.
3668# $1: variable to set
3669# $2: executable name (or list of names) to look for
3670
3671
3672# Like BASIC_SETUP_TOOL but fails if no tool was found.
3673# $1: variable to set
3674# $2: autoconf macro to call to look for the special tool
3675
3676
3677# Setup the most fundamental tools that relies on not much else to set up,
3678# but is used by much of the early bootstrap code.
3679
3680
3681# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3682
3683
3684# Evaluates platform specific overrides for devkit variables.
3685# $1: Name of variable
3686
3687
3688
3689
3690
3691
3692#%%% Simple tools %%%
3693
3694# Check if we have found a usable version of make
3695# $1: the path to a potential make binary (or empty)
3696# $2: the description on how we found this
3697
3698
3699
3700
3701# Goes looking for a usable version of GNU make.
3702
3703
3704
3705
3706
3707
3708
3709
3710# Check if build directory is on local disk. If not possible to determine,
3711# we prefer to claim it's local.
3712# Argument 1: directory to test
3713# Argument 2: what to do if it is on local disk
3714# Argument 3: what to do otherwise (remote disk or failure)
3715
3716
3717# Check that source files have basic read permissions set. This might
3718# not be the case in cygwin in certain conditions.
3719
3720
3721
3722
3723# Check for support for specific options in bash
3724
3725
3726################################################################################
3727#
3728# Default make target
3729#
3730
3731
3732# Code to run after AC_OUTPUT
3733
3734
3735#
3736# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3737# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3738#
3739# This code is free software; you can redistribute it and/or modify it
3740# under the terms of the GNU General Public License version 2 only, as
3741# published by the Free Software Foundation.  Oracle designates this
3742# particular file as subject to the "Classpath" exception as provided
3743# by Oracle in the LICENSE file that accompanied this code.
3744#
3745# This code is distributed in the hope that it will be useful, but WITHOUT
3746# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3747# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3748# version 2 for more details (a copy is included in the LICENSE file that
3749# accompanied this code).
3750#
3751# You should have received a copy of the GNU General Public License version
3752# 2 along with this work; if not, write to the Free Software Foundation,
3753# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3754#
3755# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3756# or visit www.oracle.com if you need additional information or have any
3757# questions.
3758#
3759
3760
3761
3762
3763
3764# Helper function which possibly converts a path using DOS-style short mode.
3765# If so, the updated path is stored in $new_path.
3766# $1: The path to check
3767
3768
3769# Helper function which possibly converts a path using DOS-style short mode.
3770# If so, the updated path is stored in $new_path.
3771# $1: The path to check
3772
3773
3774# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3775# and could probably be heavily simplified. However, all changes in this
3776# area tend to need lot of testing in different scenarios, and in lack of
3777# proper unit testing, cleaning this up has not been deemed worth the effort
3778# at the moment.
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3789
3790
3791
3792
3793# ... then the rest
3794#
3795# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3796# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3797#
3798# This code is free software; you can redistribute it and/or modify it
3799# under the terms of the GNU General Public License version 2 only, as
3800# published by the Free Software Foundation.  Oracle designates this
3801# particular file as subject to the "Classpath" exception as provided
3802# by Oracle in the LICENSE file that accompanied this code.
3803#
3804# This code is distributed in the hope that it will be useful, but WITHOUT
3805# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3806# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3807# version 2 for more details (a copy is included in the LICENSE file that
3808# accompanied this code).
3809#
3810# You should have received a copy of the GNU General Public License version
3811# 2 along with this work; if not, write to the Free Software Foundation,
3812# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3813#
3814# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3815# or visit www.oracle.com if you need additional information or have any
3816# questions.
3817#
3818
3819########################################################################
3820# This file handles detection of the Boot JDK. The Boot JDK detection
3821# process has been developed as a response to solve a complex real-world
3822# problem. Initially, it was simple, but it has grown as platform after
3823# platform, idiosyncracy after idiosyncracy has been supported.
3824#
3825# The basic idea is this:
3826# 1) You need an acceptable *) JDK to use as a Boot JDK
3827# 2) There are several ways to locate a JDK, that are mostly platform
3828#    dependent **)
3829# 3) You can have multiple JDKs installed
3830# 4) If possible, configure should try to dig out an acceptable JDK
3831#    automatically, without having to resort to command-line options
3832#
3833# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3834#     javac) and not a JRE, etc.
3835#
3836# **) On Windows we typically use a well-known path.
3837#     On MacOSX we typically use the tool java_home.
3838#     On Linux we typically find javac in the $PATH, and then follow a
3839#     chain of symlinks that often ends up in a real JDK.
3840#
3841# This leads to the code where we check in different ways to locate a
3842# JDK, and if one is found, check if it is acceptable. If not, we print
3843# our reasons for rejecting it (useful when debugging non-working
3844# configure situations) and continue checking the next one.
3845########################################################################
3846
3847# Execute the check given as argument, and verify the result
3848# If the Boot JDK was previously found, do nothing
3849# $1 A command line (typically autoconf macro) to execute
3850
3851
3852# Test: Is bootjdk explicitely set by command line arguments?
3853
3854
3855# Test: Is $JAVA_HOME set?
3856
3857
3858# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3859
3860
3861# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3862# $1: Argument to the java_home binary (optional)
3863
3864
3865# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3866
3867
3868# Look for a jdk in the given path. If there are multiple, try to select the newest.
3869# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3870# $1 = Path to directory containing jdk installations.
3871# $2 = String to append to the found JDK directory to get the proper JDK home
3872
3873
3874# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3875# environmental variable as base for where to look.
3876# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3877
3878
3879# Test: Is there a JDK installed in default, well-known locations?
3880
3881
3882# Check that a command-line tool in the Boot JDK is correct
3883# $1 = name of variable to assign
3884# $2 = name of binary
3885
3886
3887###############################################################################
3888#
3889# We need a Boot JDK to bootstrap the build.
3890#
3891
3892
3893
3894
3895
3896# BUILD_JDK: the location of the latest JDK that can run
3897#   on the host system and supports the target class file version
3898#   generated in this JDK build.  This variable should only be
3899#   used after the launchers are built.
3900#
3901
3902# Execute the check given as argument, and verify the result.
3903# If the JDK was previously found, do nothing.
3904# $1 A command line (typically autoconf macro) to execute
3905
3906
3907# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3908# is different than the host system doing the build (e.g. cross-compilation),
3909# a special BUILD_JDK is built as part of the build process.  An external
3910# prebuilt BUILD_JDK can also be supplied.
3911
3912
3913#
3914# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3915# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3916#
3917# This code is free software; you can redistribute it and/or modify it
3918# under the terms of the GNU General Public License version 2 only, as
3919# published by the Free Software Foundation.  Oracle designates this
3920# particular file as subject to the "Classpath" exception as provided
3921# by Oracle in the LICENSE file that accompanied this code.
3922#
3923# This code is distributed in the hope that it will be useful, but WITHOUT
3924# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3925# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3926# version 2 for more details (a copy is included in the LICENSE file that
3927# accompanied this code).
3928#
3929# You should have received a copy of the GNU General Public License version
3930# 2 along with this work; if not, write to the Free Software Foundation,
3931# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3932#
3933# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3934# or visit www.oracle.com if you need additional information or have any
3935# questions.
3936#
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954################################################################################
3955#
3956# Runs icecc-create-env once and prints the error if it fails
3957#
3958# $1: arguments to icecc-create-env
3959# $2: log file
3960#
3961
3962
3963################################################################################
3964#
3965# Optionally enable distributed compilation of native code using icecc/icecream
3966#
3967
3968
3969
3970
3971
3972
3973
3974#
3975# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3976# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3977#
3978# This code is free software; you can redistribute it and/or modify it
3979# under the terms of the GNU General Public License version 2 only, as
3980# published by the Free Software Foundation.  Oracle designates this
3981# particular file as subject to the "Classpath" exception as provided
3982# by Oracle in the LICENSE file that accompanied this code.
3983#
3984# This code is distributed in the hope that it will be useful, but WITHOUT
3985# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3986# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3987# version 2 for more details (a copy is included in the LICENSE file that
3988# accompanied this code).
3989#
3990# You should have received a copy of the GNU General Public License version
3991# 2 along with this work; if not, write to the Free Software Foundation,
3992# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3993#
3994# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3995# or visit www.oracle.com if you need additional information or have any
3996# questions.
3997#
3998
3999# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4000# corresponding configure arguments instead
4001
4002
4003# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4004# that configure can use them while detecting compilers.
4005# TOOLCHAIN_TYPE is available here.
4006# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4007
4008
4009
4010
4011
4012
4013# Documentation on common flags used for solstudio in HIGHEST.
4014#
4015# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4016#          done with care, there are some assumptions below that need to
4017#          be understood about the use of pointers, and IEEE behavior.
4018#
4019# -fns: Use non-standard floating point mode (not IEEE 754)
4020# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4021# -fsingle: Use single precision floating point with 'float'
4022# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4023#   (Source with excessing pointer casting and data access with mixed
4024#    pointer types are not recommended)
4025# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4026#   (If you expect perfect errno behavior, do not use this)
4027# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4028# -xrestrict: Pointer parameters to functions do not overlap
4029#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4030#    If you pass in multiple pointers to the same data, do not use this)
4031# -xlibmil: Inline some library routines
4032#   (If you expect perfect errno behavior, do not use this)
4033# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4034#   (If you expect perfect errno behavior, do not use this)
4035#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4036
4037    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4038    # Bug?
4039    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4040    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4041    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4042    #fi
4043
4044
4045
4046
4047
4048
4049################################################################################
4050# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4051#      conditionals against.
4052# $2 - Optional prefix for each variable defined.
4053
4054
4055# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4056#                                  IF_FALSE: [RUN-IF-FALSE])
4057# ------------------------------------------------------------
4058# Check that the C compiler supports an argument
4059
4060
4061
4062
4063# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4064#                                    IF_FALSE: [RUN-IF-FALSE])
4065# ------------------------------------------------------------
4066# Check that the C++ compiler supports an argument
4067
4068
4069
4070
4071# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4072#                                IF_FALSE: [RUN-IF-FALSE])
4073# ------------------------------------------------------------
4074# Check that the C and C++ compilers support an argument
4075
4076
4077
4078
4079# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4080#                                   IF_FALSE: [RUN-IF-FALSE])
4081# ------------------------------------------------------------
4082# Check that the linker support an argument
4083
4084
4085
4086
4087
4088
4089# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4090# Arguments:
4091# $1 - Optional prefix for each variable defined.
4092
4093
4094#
4095# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4096# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4097#
4098# This code is free software; you can redistribute it and/or modify it
4099# under the terms of the GNU General Public License version 2 only, as
4100# published by the Free Software Foundation.  Oracle designates this
4101# particular file as subject to the "Classpath" exception as provided
4102# by Oracle in the LICENSE file that accompanied this code.
4103#
4104# This code is distributed in the hope that it will be useful, but WITHOUT
4105# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4106# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4107# version 2 for more details (a copy is included in the LICENSE file that
4108# accompanied this code).
4109#
4110# You should have received a copy of the GNU General Public License version
4111# 2 along with this work; if not, write to the Free Software Foundation,
4112# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4113#
4114# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4115# or visit www.oracle.com if you need additional information or have any
4116# questions.
4117#
4118
4119
4120
4121
4122
4123cygwin_help() {
4124  case $1 in
4125    unzip)
4126      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4127      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4128      ;;
4129    zip)
4130      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4131      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4132      ;;
4133    make)
4134      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4135      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4136      ;;
4137    freetype)
4138      HELP_MSG="
4139The freetype library can now be build during the configure process.
4140Download the freetype sources and unpack them into an arbitrary directory:
4141
4142wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4143tar -xzf freetype-2.5.3.tar.gz
4144
4145Then run configure with '--with-freetype-src=<freetype_src>'. This will
4146automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4147builds or into '<freetype_src>/lib32' for 32-bit builds.
4148Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4149and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4150
4151Alternatively you can unpack the sources like this to use the default directory:
4152
4153tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4154      ;;
4155  esac
4156}
4157
4158msys_help() {
4159  PKGHANDLER_COMMAND=""
4160}
4161
4162apt_help() {
4163  case $1 in
4164    reduced)
4165      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4166    devkit)
4167      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4168    openjdk)
4169      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4170    alsa)
4171      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4172    cups)
4173      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4174    freetype)
4175      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4176    ffi)
4177      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4178    x11)
4179      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4180    ccache)
4181      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4182    dtrace)
4183      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4184  esac
4185}
4186
4187yum_help() {
4188  case $1 in
4189    devkit)
4190      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4191    openjdk)
4192      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4193    alsa)
4194      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4195    cups)
4196      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4197    freetype)
4198      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4199    x11)
4200      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4201    ccache)
4202      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4203  esac
4204}
4205
4206port_help() {
4207  PKGHANDLER_COMMAND=""
4208}
4209
4210pkgutil_help() {
4211  PKGHANDLER_COMMAND=""
4212}
4213
4214pkgadd_help() {
4215  PKGHANDLER_COMMAND=""
4216}
4217
4218# This function will check if we're called from the "configure" wrapper while
4219# printing --help. If so, we will print out additional information that can
4220# only be extracted within the autoconf script, and then exit. This must be
4221# called at the very beginning in configure.ac.
4222
4223
4224
4225
4226
4227
4228#
4229# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4230# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4231#
4232# This code is free software; you can redistribute it and/or modify it
4233# under the terms of the GNU General Public License version 2 only, as
4234# published by the Free Software Foundation.  Oracle designates this
4235# particular file as subject to the "Classpath" exception as provided
4236# by Oracle in the LICENSE file that accompanied this code.
4237#
4238# This code is distributed in the hope that it will be useful, but WITHOUT
4239# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4240# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4241# version 2 for more details (a copy is included in the LICENSE file that
4242# accompanied this code).
4243#
4244# You should have received a copy of the GNU General Public License version
4245# 2 along with this work; if not, write to the Free Software Foundation,
4246# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4247#
4248# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4249# or visit www.oracle.com if you need additional information or have any
4250# questions.
4251#
4252
4253# All valid JVM features, regardless of platform
4254VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4255    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4256
4257# All valid JVM variants
4258VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4259
4260###############################################################################
4261# Check if the specified JVM variant should be built. To be used in shell if
4262# constructs, like this:
4263# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4264#
4265# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4266
4267# Definition kept in one line to allow inlining in if statements.
4268# Additional [] needed to keep m4 from mangling shell constructs.
4269
4270
4271###############################################################################
4272# Check if the specified JVM features are explicitly enabled. To be used in
4273# shell if constructs, like this:
4274# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4275#
4276# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4277
4278# Definition kept in one line to allow inlining in if statements.
4279# Additional [] needed to keep m4 from mangling shell constructs.
4280
4281
4282###############################################################################
4283# Check which variants of the JVM that we want to build. Available variants are:
4284#   server: normal interpreter, and a tiered C1/C2 compiler
4285#   client: normal interpreter, and C1 (no C2 compiler)
4286#   minimal: reduced form of client with optional features stripped out
4287#   core: normal interpreter only, no compiler
4288#   zero: C++ based interpreter only, no compiler
4289#   zeroshark: C++ based interpreter, and a llvm-based compiler
4290#   custom: baseline JVM with no default features
4291#
4292
4293
4294###############################################################################
4295# Check if dtrace should be enabled and has all prerequisites present.
4296#
4297
4298
4299###############################################################################
4300# Set up all JVM features for each JVM variant.
4301#
4302
4303
4304###############################################################################
4305# Validate JVM features once all setup is complete, including custom setup.
4306#
4307
4308
4309################################################################################
4310# Check if gtest should be built
4311#
4312
4313
4314#
4315# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4316# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4317#
4318# This code is free software; you can redistribute it and/or modify it
4319# under the terms of the GNU General Public License version 2 only, as
4320# published by the Free Software Foundation.  Oracle designates this
4321# particular file as subject to the "Classpath" exception as provided
4322# by Oracle in the LICENSE file that accompanied this code.
4323#
4324# This code is distributed in the hope that it will be useful, but WITHOUT
4325# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4326# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4327# version 2 for more details (a copy is included in the LICENSE file that
4328# accompanied this code).
4329#
4330# You should have received a copy of the GNU General Public License version
4331# 2 along with this work; if not, write to the Free Software Foundation,
4332# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4333#
4334# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4335# or visit www.oracle.com if you need additional information or have any
4336# questions.
4337#
4338
4339###############################################################################
4340# Check which variant of the JDK that we want to build.
4341# Currently we have:
4342#    normal:   standard edition
4343# but the custom make system may add other variants
4344#
4345# Effectively the JDK variant gives a name to a specific set of
4346# modules to compile into the JDK.
4347
4348
4349###############################################################################
4350# Set the debug level
4351#    release: no debug information, all optimizations, no asserts.
4352#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4353#    fastdebug: debug information (-g), all optimizations, all asserts
4354#    slowdebug: debug information (-g), no optimizations, all asserts
4355
4356
4357###############################################################################
4358#
4359# Should we build only OpenJDK even if closed sources are present?
4360#
4361
4362
4363
4364
4365###############################################################################
4366#
4367# Enable or disable the elliptic curve crypto implementation
4368#
4369
4370
4371
4372
4373################################################################################
4374#
4375# Gcov coverage data for hotspot
4376#
4377
4378
4379################################################################################
4380#
4381# Static build support.  When enabled will generate static
4382# libraries instead of shared libraries for all JDK libs.
4383#
4384
4385
4386################################################################################
4387#
4388# jlink options.
4389# We always keep packaged modules in JDK image.
4390#
4391
4392
4393################################################################################
4394#
4395# Check if building of the jtreg failure handler should be enabled.
4396#
4397
4398
4399################################################################################
4400#
4401# Enable or disable generation of the classlist at build time
4402#
4403
4404
4405#
4406# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4407# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4408#
4409# This code is free software; you can redistribute it and/or modify it
4410# under the terms of the GNU General Public License version 2 only, as
4411# published by the Free Software Foundation.  Oracle designates this
4412# particular file as subject to the "Classpath" exception as provided
4413# by Oracle in the LICENSE file that accompanied this code.
4414#
4415# This code is distributed in the hope that it will be useful, but WITHOUT
4416# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4417# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4418# version 2 for more details (a copy is included in the LICENSE file that
4419# accompanied this code).
4420#
4421# You should have received a copy of the GNU General Public License version
4422# 2 along with this work; if not, write to the Free Software Foundation,
4423# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4424#
4425# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4426# or visit www.oracle.com if you need additional information or have any
4427# questions.
4428#
4429
4430###############################################################################
4431#
4432# Setup version numbers
4433#
4434
4435# Verify that a given string represents a valid version number, and assign it
4436# to a variable.
4437
4438# Argument 1: the variable to assign to
4439# Argument 2: the value given by the user
4440
4441
4442
4443
4444#
4445# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4446# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4447#
4448# This code is free software; you can redistribute it and/or modify it
4449# under the terms of the GNU General Public License version 2 only, as
4450# published by the Free Software Foundation.  Oracle designates this
4451# particular file as subject to the "Classpath" exception as provided
4452# by Oracle in the LICENSE file that accompanied this code.
4453#
4454# This code is distributed in the hope that it will be useful, but WITHOUT
4455# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4456# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4457# version 2 for more details (a copy is included in the LICENSE file that
4458# accompanied this code).
4459#
4460# You should have received a copy of the GNU General Public License version
4461# 2 along with this work; if not, write to the Free Software Foundation,
4462# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4463#
4464# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4465# or visit www.oracle.com if you need additional information or have any
4466# questions.
4467#
4468
4469# Major library component reside in separate files.
4470#
4471# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4472# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4473#
4474# This code is free software; you can redistribute it and/or modify it
4475# under the terms of the GNU General Public License version 2 only, as
4476# published by the Free Software Foundation.  Oracle designates this
4477# particular file as subject to the "Classpath" exception as provided
4478# by Oracle in the LICENSE file that accompanied this code.
4479#
4480# This code is distributed in the hope that it will be useful, but WITHOUT
4481# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4482# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4483# version 2 for more details (a copy is included in the LICENSE file that
4484# accompanied this code).
4485#
4486# You should have received a copy of the GNU General Public License version
4487# 2 along with this work; if not, write to the Free Software Foundation,
4488# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4489#
4490# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4491# or visit www.oracle.com if you need additional information or have any
4492# questions.
4493#
4494
4495################################################################################
4496# Setup alsa (Advanced Linux Sound Architecture)
4497################################################################################
4498
4499
4500#
4501# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4502# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4503#
4504# This code is free software; you can redistribute it and/or modify it
4505# under the terms of the GNU General Public License version 2 only, as
4506# published by the Free Software Foundation.  Oracle designates this
4507# particular file as subject to the "Classpath" exception as provided
4508# by Oracle in the LICENSE file that accompanied this code.
4509#
4510# This code is distributed in the hope that it will be useful, but WITHOUT
4511# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4512# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4513# version 2 for more details (a copy is included in the LICENSE file that
4514# accompanied this code).
4515#
4516# You should have received a copy of the GNU General Public License version
4517# 2 along with this work; if not, write to the Free Software Foundation,
4518# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4519#
4520# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4521# or visit www.oracle.com if you need additional information or have any
4522# questions.
4523#
4524
4525################################################################################
4526# Setup bundled libraries.
4527#
4528# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4529# OpenJDK repository. Default is to use these libraries as bundled, but they
4530# might be replaced by en external version by the user.
4531################################################################################
4532
4533
4534################################################################################
4535# Setup libjpeg
4536################################################################################
4537
4538
4539################################################################################
4540# Setup giflib
4541################################################################################
4542
4543
4544################################################################################
4545# Setup libpng
4546################################################################################
4547
4548
4549################################################################################
4550# Setup zlib
4551################################################################################
4552
4553
4554################################################################################
4555# Setup lcms (Little CMS)
4556################################################################################
4557
4558
4559#
4560# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4561# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4562#
4563# This code is free software; you can redistribute it and/or modify it
4564# under the terms of the GNU General Public License version 2 only, as
4565# published by the Free Software Foundation.  Oracle designates this
4566# particular file as subject to the "Classpath" exception as provided
4567# by Oracle in the LICENSE file that accompanied this code.
4568#
4569# This code is distributed in the hope that it will be useful, but WITHOUT
4570# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4571# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4572# version 2 for more details (a copy is included in the LICENSE file that
4573# accompanied this code).
4574#
4575# You should have received a copy of the GNU General Public License version
4576# 2 along with this work; if not, write to the Free Software Foundation,
4577# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4578#
4579# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4580# or visit www.oracle.com if you need additional information or have any
4581# questions.
4582#
4583
4584################################################################################
4585# Setup cups (Common Unix Printing System)
4586################################################################################
4587
4588
4589#
4590# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4591# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4592#
4593# This code is free software; you can redistribute it and/or modify it
4594# under the terms of the GNU General Public License version 2 only, as
4595# published by the Free Software Foundation.  Oracle designates this
4596# particular file as subject to the "Classpath" exception as provided
4597# by Oracle in the LICENSE file that accompanied this code.
4598#
4599# This code is distributed in the hope that it will be useful, but WITHOUT
4600# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4601# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4602# version 2 for more details (a copy is included in the LICENSE file that
4603# accompanied this code).
4604#
4605# You should have received a copy of the GNU General Public License version
4606# 2 along with this work; if not, write to the Free Software Foundation,
4607# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4608#
4609# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4610# or visit www.oracle.com if you need additional information or have any
4611# questions.
4612#
4613
4614################################################################################
4615# Setup libffi (Foreign Function Interface)
4616################################################################################
4617
4618
4619#
4620# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4621# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4622#
4623# This code is free software; you can redistribute it and/or modify it
4624# under the terms of the GNU General Public License version 2 only, as
4625# published by the Free Software Foundation.  Oracle designates this
4626# particular file as subject to the "Classpath" exception as provided
4627# by Oracle in the LICENSE file that accompanied this code.
4628#
4629# This code is distributed in the hope that it will be useful, but WITHOUT
4630# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4631# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4632# version 2 for more details (a copy is included in the LICENSE file that
4633# accompanied this code).
4634#
4635# You should have received a copy of the GNU General Public License version
4636# 2 along with this work; if not, write to the Free Software Foundation,
4637# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4638#
4639# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4640# or visit www.oracle.com if you need additional information or have any
4641# questions.
4642#
4643
4644################################################################################
4645# Build the freetype lib from source
4646################################################################################
4647
4648
4649################################################################################
4650# Check if a potential freeype library match is correct and usable
4651################################################################################
4652
4653
4654################################################################################
4655# Setup freetype (The FreeType2 font rendering library)
4656################################################################################
4657
4658
4659#
4660# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4661# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4662#
4663# This code is free software; you can redistribute it and/or modify it
4664# under the terms of the GNU General Public License version 2 only, as
4665# published by the Free Software Foundation.  Oracle designates this
4666# particular file as subject to the "Classpath" exception as provided
4667# by Oracle in the LICENSE file that accompanied this code.
4668#
4669# This code is distributed in the hope that it will be useful, but WITHOUT
4670# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4671# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4672# version 2 for more details (a copy is included in the LICENSE file that
4673# accompanied this code).
4674#
4675# You should have received a copy of the GNU General Public License version
4676# 2 along with this work; if not, write to the Free Software Foundation,
4677# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4678#
4679# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4680# or visit www.oracle.com if you need additional information or have any
4681# questions.
4682#
4683
4684################################################################################
4685# Setup the standard C/C++ runtime libraries.
4686#
4687# Most importantly, determine if stdc++ should be linked statically or
4688# dynamically.
4689################################################################################
4690
4691
4692#
4693# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4694# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4695#
4696# This code is free software; you can redistribute it and/or modify it
4697# under the terms of the GNU General Public License version 2 only, as
4698# published by the Free Software Foundation.  Oracle designates this
4699# particular file as subject to the "Classpath" exception as provided
4700# by Oracle in the LICENSE file that accompanied this code.
4701#
4702# This code is distributed in the hope that it will be useful, but WITHOUT
4703# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4704# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4705# version 2 for more details (a copy is included in the LICENSE file that
4706# accompanied this code).
4707#
4708# You should have received a copy of the GNU General Public License version
4709# 2 along with this work; if not, write to the Free Software Foundation,
4710# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4711#
4712# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4713# or visit www.oracle.com if you need additional information or have any
4714# questions.
4715#
4716
4717################################################################################
4718# Setup X11 Windows system
4719################################################################################
4720
4721
4722
4723################################################################################
4724# Determine which libraries are needed for this configuration
4725################################################################################
4726
4727
4728################################################################################
4729# Parse library options, and setup needed libraries
4730################################################################################
4731
4732
4733################################################################################
4734# Setup llvm (Low-Level VM)
4735################################################################################
4736
4737
4738################################################################################
4739# Setup various libraries, typically small system libraries
4740################################################################################
4741
4742
4743################################################################################
4744# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4745# redistribute it in the test image.
4746################################################################################
4747
4748
4749
4750#
4751# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4752# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4753#
4754# This code is free software; you can redistribute it and/or modify it
4755# under the terms of the GNU General Public License version 2 only, as
4756# published by the Free Software Foundation.  Oracle designates this
4757# particular file as subject to the "Classpath" exception as provided
4758# by Oracle in the LICENSE file that accompanied this code.
4759#
4760# This code is distributed in the hope that it will be useful, but WITHOUT
4761# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4762# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4763# version 2 for more details (a copy is included in the LICENSE file that
4764# accompanied this code).
4765#
4766# You should have received a copy of the GNU General Public License version
4767# 2 along with this work; if not, write to the Free Software Foundation,
4768# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4769#
4770# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4771# or visit www.oracle.com if you need additional information or have any
4772# questions.
4773#
4774
4775# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4776# Converts autoconf style CPU name to OpenJDK style, into
4777# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4778
4779
4780# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4781# Converts autoconf style OS name to OpenJDK style, into
4782# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4783
4784
4785# Expects $host_os $host_cpu $build_os and $build_cpu
4786# and $with_target_bits to have been setup!
4787#
4788# Translate the standard triplet(quadruplet) definition
4789# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4790# OPENJDK_BUILD_OS, etc.
4791
4792
4793# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4794# accordingly. Must be done after setting up build and target system, but before
4795# doing anything else with these values.
4796
4797
4798# Setup the legacy variables, for controlling the old makefiles.
4799#
4800
4801
4802# $1 - Either TARGET or BUILD to setup the variables for.
4803
4804
4805
4806
4807#%%% Build and target systems %%%
4808
4809
4810
4811
4812# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4813# Add -mX to various FLAGS variables.
4814
4815
4816
4817
4818
4819
4820#
4821# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4822# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4823#
4824# This code is free software; you can redistribute it and/or modify it
4825# under the terms of the GNU General Public License version 2 only, as
4826# published by the Free Software Foundation.  Oracle designates this
4827# particular file as subject to the "Classpath" exception as provided
4828# by Oracle in the LICENSE file that accompanied this code.
4829#
4830# This code is distributed in the hope that it will be useful, but WITHOUT
4831# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4832# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4833# version 2 for more details (a copy is included in the LICENSE file that
4834# accompanied this code).
4835#
4836# You should have received a copy of the GNU General Public License version
4837# 2 along with this work; if not, write to the Free Software Foundation,
4838# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4839#
4840# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4841# or visit www.oracle.com if you need additional information or have any
4842# questions.
4843#
4844
4845
4846
4847
4848
4849
4850
4851################################################################################
4852# Define a mechanism for importing extra prebuilt modules
4853#
4854
4855
4856
4857#
4858# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4859# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4860#
4861# This code is free software; you can redistribute it and/or modify it
4862# under the terms of the GNU General Public License version 2 only, as
4863# published by the Free Software Foundation.  Oracle designates this
4864# particular file as subject to the "Classpath" exception as provided
4865# by Oracle in the LICENSE file that accompanied this code.
4866#
4867# This code is distributed in the hope that it will be useful, but WITHOUT
4868# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4869# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4870# version 2 for more details (a copy is included in the LICENSE file that
4871# accompanied this code).
4872#
4873# You should have received a copy of the GNU General Public License version
4874# 2 along with this work; if not, write to the Free Software Foundation,
4875# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4876#
4877# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4878# or visit www.oracle.com if you need additional information or have any
4879# questions.
4880#
4881
4882########################################################################
4883# This file is responsible for detecting, verifying and setting up the
4884# toolchain, i.e. the compiler, linker and related utilities. It will setup
4885# proper paths to the binaries, but it will not setup any flags.
4886#
4887# The binaries used is determined by the toolchain type, which is the family of
4888# compilers and related tools that are used.
4889########################################################################
4890
4891
4892# All valid toolchains, regardless of platform (used by help.m4)
4893VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4894
4895# These toolchains are valid on different platforms
4896VALID_TOOLCHAINS_linux="gcc clang"
4897VALID_TOOLCHAINS_solaris="solstudio"
4898VALID_TOOLCHAINS_macosx="gcc clang"
4899VALID_TOOLCHAINS_aix="xlc"
4900VALID_TOOLCHAINS_windows="microsoft"
4901
4902# Toolchain descriptions
4903TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4904TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4905TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4906TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4907TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4908
4909# Minimum supported versions, empty means unspecified
4910TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4911TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4912TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4913TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4914TOOLCHAIN_MINIMUM_VERSION_xlc=""
4915
4916# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4917# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4918# $1 - optional variable prefix for compiler and version variables (BUILD_)
4919# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4920
4921
4922# Check if the configured compiler (C and C++) is of a specific version or
4923# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4924#
4925# Arguments:
4926#   VERSION:   The version string to check against the found version
4927#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4928#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4929#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4930
4931
4932
4933
4934# Setup a number of variables describing how native output files are
4935# named on this platform/toolchain.
4936
4937
4938# Determine which toolchain type to use, and make sure it is valid for this
4939# platform. Setup various information about the selected toolchain.
4940
4941
4942# Before we start detecting the toolchain executables, we might need some
4943# special setup, e.g. additional paths etc.
4944
4945
4946# Restore path, etc
4947
4948
4949# Check if a compiler is of the toolchain type we expect, and save the version
4950# information from it. If the compiler does not match the expected type,
4951# this function will abort using AC_MSG_ERROR. If it matches, the version will
4952# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4953# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4954#
4955# $1 = compiler to test (CC or CXX)
4956# $2 = human readable name of compiler (C or C++)
4957
4958
4959# Try to locate the given C or C++ compiler in the path, or otherwise.
4960#
4961# $1 = compiler to test (CC or CXX)
4962# $2 = human readable name of compiler (C or C++)
4963# $3 = list of compiler names to search for
4964
4965
4966# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4967# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4968# archiver (AR). Verify that the compilers are correct according to the
4969# toolchain type.
4970
4971
4972# Setup additional tools that is considered a part of the toolchain, but not the
4973# core part. Many of these are highly platform-specific and do not exist,
4974# and/or are not needed on all platforms.
4975
4976
4977# Setup the build tools (i.e, the compiler and linker used to build programs
4978# that should be run on the build platform, not the target platform, as a build
4979# helper). Since the non-cross-compile case uses the normal, target compilers
4980# for this, we can only do this after these have been setup.
4981
4982
4983# Setup legacy variables that are still needed as alternative ways to refer to
4984# parts of the toolchain.
4985
4986
4987# Do some additional checks on the detected tools.
4988
4989
4990# Setup the JTReg Regression Test Harness.
4991
4992
4993#
4994# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4995# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4996#
4997# This code is free software; you can redistribute it and/or modify it
4998# under the terms of the GNU General Public License version 2 only, as
4999# published by the Free Software Foundation.  Oracle designates this
5000# particular file as subject to the "Classpath" exception as provided
5001# by Oracle in the LICENSE file that accompanied this code.
5002#
5003# This code is distributed in the hope that it will be useful, but WITHOUT
5004# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5005# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5006# version 2 for more details (a copy is included in the LICENSE file that
5007# accompanied this code).
5008#
5009# You should have received a copy of the GNU General Public License version
5010# 2 along with this work; if not, write to the Free Software Foundation,
5011# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5012#
5013# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5014# or visit www.oracle.com if you need additional information or have any
5015# questions.
5016#
5017
5018################################################################################
5019# The order of these defines the priority by which we try to find them.
5020VALID_VS_VERSIONS="2013 2012 2010"
5021
5022VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5023VS_VERSION_INTERNAL_2010=100
5024VS_MSVCR_2010=msvcr100.dll
5025# We don't use msvcp on Visual Studio 2010
5026#VS_MSVCP_2010=msvcp100.dll
5027VS_ENVVAR_2010="VS100COMNTOOLS"
5028VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5029VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5030VS_VS_PLATFORM_NAME_2010="v100"
5031VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5032
5033VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5034VS_VERSION_INTERNAL_2012=110
5035VS_MSVCR_2012=msvcr110.dll
5036VS_MSVCP_2012=msvcp110.dll
5037VS_ENVVAR_2012="VS110COMNTOOLS"
5038VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5039VS_SDK_INSTALLDIR_2012=
5040VS_VS_PLATFORM_NAME_2012="v110"
5041VS_SDK_PLATFORM_NAME_2012=
5042
5043VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5044VS_VERSION_INTERNAL_2013=120
5045VS_MSVCR_2013=msvcr120.dll
5046VS_MSVCP_2013=msvcp120.dll
5047VS_ENVVAR_2013="VS120COMNTOOLS"
5048VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5049VS_SDK_INSTALLDIR_2013=
5050VS_VS_PLATFORM_NAME_2013="v120"
5051VS_SDK_PLATFORM_NAME_2013=
5052
5053################################################################################
5054
5055
5056
5057################################################################################
5058
5059
5060
5061################################################################################
5062# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5063# build environment and assigns it to VS_ENV_CMD
5064
5065
5066################################################################################
5067
5068
5069
5070################################################################################
5071# Check if the VS env variables were setup prior to running configure.
5072# If not, then find vcvarsall.bat and run it automatically, and integrate
5073# the set env variables into the spec file.
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088# This line needs to be here, verbatim, after all includes and the dummy hook
5089# definitions. It is replaced with custom functionality when building
5090# custom sources.
5091#CUSTOM_AUTOCONF_INCLUDE
5092
5093# Do not change or remove the following line, it is needed for consistency checks:
5094DATE_WHEN_GENERATED=1475218974
5095
5096###############################################################################
5097#
5098# Initialization / Boot-strapping
5099#
5100# The bootstrapping process needs to solve the "chicken or the egg" problem,
5101# thus it jumps back and forth, each time gaining something needed later on.
5102#
5103###############################################################################
5104
5105# If we are requested to print additional help, do that and then exit.
5106# This must be the very first call.
5107
5108  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5109
5110    # Print available toolchains
5111    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5112    $PRINTF "Which are valid to use depends on the build platform.\n"
5113    for toolchain in $VALID_TOOLCHAINS_all; do
5114      # Use indirect variable referencing
5115      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5116      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5117      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5118    done
5119    $PRINTF "\n"
5120
5121    # Print available jvm features
5122    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5123    $PRINTF "Which are valid to use depends on the target platform.\n  "
5124    $PRINTF "%s " $VALID_JVM_FEATURES
5125    $PRINTF "\n"
5126
5127    # And now exit directly
5128    exit 0
5129  fi
5130
5131
5132# Basic initialization that must happen first of all in the normal process.
5133
5134  # Save the original command line. This is passed to us by the wrapper configure script.
5135
5136  # Save the path variable before it gets changed
5137  ORIGINAL_PATH="$PATH"
5138
5139  DATE_WHEN_CONFIGURED=`LANG=C date`
5140
5141  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5142$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5143  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5144$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5145
5146
5147  # Start with tools that do not need have cross compilation support
5148  # and can be expected to be found in the default PATH. These tools are
5149  # used by configure.
5150
5151  # First are all the simple required tools.
5152
5153
5154
5155  # Publish this variable in the help.
5156
5157
5158  if [ -z "${BASENAME+x}" ]; then
5159    # The variable is not set by user, try to locate tool using the code snippet
5160    for ac_prog in basename
5161do
5162  # Extract the first word of "$ac_prog", so it can be a program name with args.
5163set dummy $ac_prog; ac_word=$2
5164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5165$as_echo_n "checking for $ac_word... " >&6; }
5166if ${ac_cv_path_BASENAME+:} false; then :
5167  $as_echo_n "(cached) " >&6
5168else
5169  case $BASENAME in
5170  [\\/]* | ?:[\\/]*)
5171  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5172  ;;
5173  *)
5174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5175for as_dir in $PATH
5176do
5177  IFS=$as_save_IFS
5178  test -z "$as_dir" && as_dir=.
5179    for ac_exec_ext in '' $ac_executable_extensions; do
5180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5181    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5183    break 2
5184  fi
5185done
5186  done
5187IFS=$as_save_IFS
5188
5189  ;;
5190esac
5191fi
5192BASENAME=$ac_cv_path_BASENAME
5193if test -n "$BASENAME"; then
5194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5195$as_echo "$BASENAME" >&6; }
5196else
5197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5198$as_echo "no" >&6; }
5199fi
5200
5201
5202  test -n "$BASENAME" && break
5203done
5204
5205  else
5206    # The variable is set, but is it from the command line or the environment?
5207
5208    # Try to remove the string !BASENAME! from our list.
5209    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5210    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5211      # If it failed, the variable was not from the command line. Ignore it,
5212      # but warn the user (except for BASH, which is always set by the calling BASH).
5213      if test "xBASENAME" != xBASH; then
5214        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5215$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5216      fi
5217      # Try to locate tool using the code snippet
5218      for ac_prog in basename
5219do
5220  # Extract the first word of "$ac_prog", so it can be a program name with args.
5221set dummy $ac_prog; ac_word=$2
5222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5223$as_echo_n "checking for $ac_word... " >&6; }
5224if ${ac_cv_path_BASENAME+:} false; then :
5225  $as_echo_n "(cached) " >&6
5226else
5227  case $BASENAME in
5228  [\\/]* | ?:[\\/]*)
5229  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5230  ;;
5231  *)
5232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5233for as_dir in $PATH
5234do
5235  IFS=$as_save_IFS
5236  test -z "$as_dir" && as_dir=.
5237    for ac_exec_ext in '' $ac_executable_extensions; do
5238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5239    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5241    break 2
5242  fi
5243done
5244  done
5245IFS=$as_save_IFS
5246
5247  ;;
5248esac
5249fi
5250BASENAME=$ac_cv_path_BASENAME
5251if test -n "$BASENAME"; then
5252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5253$as_echo "$BASENAME" >&6; }
5254else
5255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5256$as_echo "no" >&6; }
5257fi
5258
5259
5260  test -n "$BASENAME" && break
5261done
5262
5263    else
5264      # If it succeeded, then it was overridden by the user. We will use it
5265      # for the tool.
5266
5267      # First remove it from the list of overridden variables, so we can test
5268      # for unknown variables in the end.
5269      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5270
5271      # Check if we try to supply an empty value
5272      if test "x$BASENAME" = x; then
5273        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5274$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5275        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5276$as_echo_n "checking for BASENAME... " >&6; }
5277        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5278$as_echo "disabled" >&6; }
5279      else
5280        # Check if the provided tool contains a complete path.
5281        tool_specified="$BASENAME"
5282        tool_basename="${tool_specified##*/}"
5283        if test "x$tool_basename" = "x$tool_specified"; then
5284          # A command without a complete path is provided, search $PATH.
5285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5286$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5287          # Extract the first word of "$tool_basename", so it can be a program name with args.
5288set dummy $tool_basename; ac_word=$2
5289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5290$as_echo_n "checking for $ac_word... " >&6; }
5291if ${ac_cv_path_BASENAME+:} false; then :
5292  $as_echo_n "(cached) " >&6
5293else
5294  case $BASENAME in
5295  [\\/]* | ?:[\\/]*)
5296  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5297  ;;
5298  *)
5299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5300for as_dir in $PATH
5301do
5302  IFS=$as_save_IFS
5303  test -z "$as_dir" && as_dir=.
5304    for ac_exec_ext in '' $ac_executable_extensions; do
5305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5306    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5308    break 2
5309  fi
5310done
5311  done
5312IFS=$as_save_IFS
5313
5314  ;;
5315esac
5316fi
5317BASENAME=$ac_cv_path_BASENAME
5318if test -n "$BASENAME"; then
5319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5320$as_echo "$BASENAME" >&6; }
5321else
5322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5323$as_echo "no" >&6; }
5324fi
5325
5326
5327          if test "x$BASENAME" = x; then
5328            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5329          fi
5330        else
5331          # Otherwise we believe it is a complete path. Use it as it is.
5332          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5333$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5334          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5335$as_echo_n "checking for BASENAME... " >&6; }
5336          if test ! -x "$tool_specified"; then
5337            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5338$as_echo "not found" >&6; }
5339            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5340          fi
5341          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5342$as_echo "$tool_specified" >&6; }
5343        fi
5344      fi
5345    fi
5346
5347  fi
5348
5349
5350
5351  if test "x$BASENAME" = x; then
5352    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5353  fi
5354
5355
5356
5357
5358
5359  # Publish this variable in the help.
5360
5361
5362  if [ -z "${BASH+x}" ]; then
5363    # The variable is not set by user, try to locate tool using the code snippet
5364    for ac_prog in bash
5365do
5366  # Extract the first word of "$ac_prog", so it can be a program name with args.
5367set dummy $ac_prog; ac_word=$2
5368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5369$as_echo_n "checking for $ac_word... " >&6; }
5370if ${ac_cv_path_BASH+:} false; then :
5371  $as_echo_n "(cached) " >&6
5372else
5373  case $BASH in
5374  [\\/]* | ?:[\\/]*)
5375  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5376  ;;
5377  *)
5378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5379for as_dir in $PATH
5380do
5381  IFS=$as_save_IFS
5382  test -z "$as_dir" && as_dir=.
5383    for ac_exec_ext in '' $ac_executable_extensions; do
5384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5385    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5387    break 2
5388  fi
5389done
5390  done
5391IFS=$as_save_IFS
5392
5393  ;;
5394esac
5395fi
5396BASH=$ac_cv_path_BASH
5397if test -n "$BASH"; then
5398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5399$as_echo "$BASH" >&6; }
5400else
5401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5402$as_echo "no" >&6; }
5403fi
5404
5405
5406  test -n "$BASH" && break
5407done
5408
5409  else
5410    # The variable is set, but is it from the command line or the environment?
5411
5412    # Try to remove the string !BASH! from our list.
5413    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5414    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5415      # If it failed, the variable was not from the command line. Ignore it,
5416      # but warn the user (except for BASH, which is always set by the calling BASH).
5417      if test "xBASH" != xBASH; then
5418        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5419$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5420      fi
5421      # Try to locate tool using the code snippet
5422      for ac_prog in bash
5423do
5424  # Extract the first word of "$ac_prog", so it can be a program name with args.
5425set dummy $ac_prog; ac_word=$2
5426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5427$as_echo_n "checking for $ac_word... " >&6; }
5428if ${ac_cv_path_BASH+:} false; then :
5429  $as_echo_n "(cached) " >&6
5430else
5431  case $BASH in
5432  [\\/]* | ?:[\\/]*)
5433  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5434  ;;
5435  *)
5436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5437for as_dir in $PATH
5438do
5439  IFS=$as_save_IFS
5440  test -z "$as_dir" && as_dir=.
5441    for ac_exec_ext in '' $ac_executable_extensions; do
5442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5443    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5445    break 2
5446  fi
5447done
5448  done
5449IFS=$as_save_IFS
5450
5451  ;;
5452esac
5453fi
5454BASH=$ac_cv_path_BASH
5455if test -n "$BASH"; then
5456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5457$as_echo "$BASH" >&6; }
5458else
5459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5460$as_echo "no" >&6; }
5461fi
5462
5463
5464  test -n "$BASH" && break
5465done
5466
5467    else
5468      # If it succeeded, then it was overridden by the user. We will use it
5469      # for the tool.
5470
5471      # First remove it from the list of overridden variables, so we can test
5472      # for unknown variables in the end.
5473      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5474
5475      # Check if we try to supply an empty value
5476      if test "x$BASH" = x; then
5477        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5478$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5479        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5480$as_echo_n "checking for BASH... " >&6; }
5481        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5482$as_echo "disabled" >&6; }
5483      else
5484        # Check if the provided tool contains a complete path.
5485        tool_specified="$BASH"
5486        tool_basename="${tool_specified##*/}"
5487        if test "x$tool_basename" = "x$tool_specified"; then
5488          # A command without a complete path is provided, search $PATH.
5489          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5490$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5491          # Extract the first word of "$tool_basename", so it can be a program name with args.
5492set dummy $tool_basename; ac_word=$2
5493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5494$as_echo_n "checking for $ac_word... " >&6; }
5495if ${ac_cv_path_BASH+:} false; then :
5496  $as_echo_n "(cached) " >&6
5497else
5498  case $BASH in
5499  [\\/]* | ?:[\\/]*)
5500  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5501  ;;
5502  *)
5503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5504for as_dir in $PATH
5505do
5506  IFS=$as_save_IFS
5507  test -z "$as_dir" && as_dir=.
5508    for ac_exec_ext in '' $ac_executable_extensions; do
5509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5510    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5512    break 2
5513  fi
5514done
5515  done
5516IFS=$as_save_IFS
5517
5518  ;;
5519esac
5520fi
5521BASH=$ac_cv_path_BASH
5522if test -n "$BASH"; then
5523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5524$as_echo "$BASH" >&6; }
5525else
5526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5527$as_echo "no" >&6; }
5528fi
5529
5530
5531          if test "x$BASH" = x; then
5532            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5533          fi
5534        else
5535          # Otherwise we believe it is a complete path. Use it as it is.
5536          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5537$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5538          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5539$as_echo_n "checking for BASH... " >&6; }
5540          if test ! -x "$tool_specified"; then
5541            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5542$as_echo "not found" >&6; }
5543            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5544          fi
5545          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5546$as_echo "$tool_specified" >&6; }
5547        fi
5548      fi
5549    fi
5550
5551  fi
5552
5553
5554
5555  if test "x$BASH" = x; then
5556    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5557  fi
5558
5559
5560
5561
5562
5563  # Publish this variable in the help.
5564
5565
5566  if [ -z "${CAT+x}" ]; then
5567    # The variable is not set by user, try to locate tool using the code snippet
5568    for ac_prog in cat
5569do
5570  # Extract the first word of "$ac_prog", so it can be a program name with args.
5571set dummy $ac_prog; ac_word=$2
5572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5573$as_echo_n "checking for $ac_word... " >&6; }
5574if ${ac_cv_path_CAT+:} false; then :
5575  $as_echo_n "(cached) " >&6
5576else
5577  case $CAT in
5578  [\\/]* | ?:[\\/]*)
5579  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5580  ;;
5581  *)
5582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5583for as_dir in $PATH
5584do
5585  IFS=$as_save_IFS
5586  test -z "$as_dir" && as_dir=.
5587    for ac_exec_ext in '' $ac_executable_extensions; do
5588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5589    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5591    break 2
5592  fi
5593done
5594  done
5595IFS=$as_save_IFS
5596
5597  ;;
5598esac
5599fi
5600CAT=$ac_cv_path_CAT
5601if test -n "$CAT"; then
5602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5603$as_echo "$CAT" >&6; }
5604else
5605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5606$as_echo "no" >&6; }
5607fi
5608
5609
5610  test -n "$CAT" && break
5611done
5612
5613  else
5614    # The variable is set, but is it from the command line or the environment?
5615
5616    # Try to remove the string !CAT! from our list.
5617    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5618    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5619      # If it failed, the variable was not from the command line. Ignore it,
5620      # but warn the user (except for BASH, which is always set by the calling BASH).
5621      if test "xCAT" != xBASH; then
5622        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5623$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5624      fi
5625      # Try to locate tool using the code snippet
5626      for ac_prog in cat
5627do
5628  # Extract the first word of "$ac_prog", so it can be a program name with args.
5629set dummy $ac_prog; ac_word=$2
5630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5631$as_echo_n "checking for $ac_word... " >&6; }
5632if ${ac_cv_path_CAT+:} false; then :
5633  $as_echo_n "(cached) " >&6
5634else
5635  case $CAT in
5636  [\\/]* | ?:[\\/]*)
5637  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5638  ;;
5639  *)
5640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5641for as_dir in $PATH
5642do
5643  IFS=$as_save_IFS
5644  test -z "$as_dir" && as_dir=.
5645    for ac_exec_ext in '' $ac_executable_extensions; do
5646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5647    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5649    break 2
5650  fi
5651done
5652  done
5653IFS=$as_save_IFS
5654
5655  ;;
5656esac
5657fi
5658CAT=$ac_cv_path_CAT
5659if test -n "$CAT"; then
5660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5661$as_echo "$CAT" >&6; }
5662else
5663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5664$as_echo "no" >&6; }
5665fi
5666
5667
5668  test -n "$CAT" && break
5669done
5670
5671    else
5672      # If it succeeded, then it was overridden by the user. We will use it
5673      # for the tool.
5674
5675      # First remove it from the list of overridden variables, so we can test
5676      # for unknown variables in the end.
5677      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5678
5679      # Check if we try to supply an empty value
5680      if test "x$CAT" = x; then
5681        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5682$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5683        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5684$as_echo_n "checking for CAT... " >&6; }
5685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5686$as_echo "disabled" >&6; }
5687      else
5688        # Check if the provided tool contains a complete path.
5689        tool_specified="$CAT"
5690        tool_basename="${tool_specified##*/}"
5691        if test "x$tool_basename" = "x$tool_specified"; then
5692          # A command without a complete path is provided, search $PATH.
5693          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5694$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5695          # Extract the first word of "$tool_basename", so it can be a program name with args.
5696set dummy $tool_basename; ac_word=$2
5697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5698$as_echo_n "checking for $ac_word... " >&6; }
5699if ${ac_cv_path_CAT+:} false; then :
5700  $as_echo_n "(cached) " >&6
5701else
5702  case $CAT in
5703  [\\/]* | ?:[\\/]*)
5704  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5705  ;;
5706  *)
5707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5708for as_dir in $PATH
5709do
5710  IFS=$as_save_IFS
5711  test -z "$as_dir" && as_dir=.
5712    for ac_exec_ext in '' $ac_executable_extensions; do
5713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5714    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5716    break 2
5717  fi
5718done
5719  done
5720IFS=$as_save_IFS
5721
5722  ;;
5723esac
5724fi
5725CAT=$ac_cv_path_CAT
5726if test -n "$CAT"; then
5727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5728$as_echo "$CAT" >&6; }
5729else
5730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5731$as_echo "no" >&6; }
5732fi
5733
5734
5735          if test "x$CAT" = x; then
5736            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5737          fi
5738        else
5739          # Otherwise we believe it is a complete path. Use it as it is.
5740          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5741$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5742          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5743$as_echo_n "checking for CAT... " >&6; }
5744          if test ! -x "$tool_specified"; then
5745            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5746$as_echo "not found" >&6; }
5747            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5748          fi
5749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5750$as_echo "$tool_specified" >&6; }
5751        fi
5752      fi
5753    fi
5754
5755  fi
5756
5757
5758
5759  if test "x$CAT" = x; then
5760    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5761  fi
5762
5763
5764
5765
5766
5767  # Publish this variable in the help.
5768
5769
5770  if [ -z "${CHMOD+x}" ]; then
5771    # The variable is not set by user, try to locate tool using the code snippet
5772    for ac_prog in chmod
5773do
5774  # Extract the first word of "$ac_prog", so it can be a program name with args.
5775set dummy $ac_prog; ac_word=$2
5776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5777$as_echo_n "checking for $ac_word... " >&6; }
5778if ${ac_cv_path_CHMOD+:} false; then :
5779  $as_echo_n "(cached) " >&6
5780else
5781  case $CHMOD in
5782  [\\/]* | ?:[\\/]*)
5783  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5784  ;;
5785  *)
5786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5787for as_dir in $PATH
5788do
5789  IFS=$as_save_IFS
5790  test -z "$as_dir" && as_dir=.
5791    for ac_exec_ext in '' $ac_executable_extensions; do
5792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5793    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5795    break 2
5796  fi
5797done
5798  done
5799IFS=$as_save_IFS
5800
5801  ;;
5802esac
5803fi
5804CHMOD=$ac_cv_path_CHMOD
5805if test -n "$CHMOD"; then
5806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5807$as_echo "$CHMOD" >&6; }
5808else
5809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5810$as_echo "no" >&6; }
5811fi
5812
5813
5814  test -n "$CHMOD" && break
5815done
5816
5817  else
5818    # The variable is set, but is it from the command line or the environment?
5819
5820    # Try to remove the string !CHMOD! from our list.
5821    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5822    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5823      # If it failed, the variable was not from the command line. Ignore it,
5824      # but warn the user (except for BASH, which is always set by the calling BASH).
5825      if test "xCHMOD" != xBASH; then
5826        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5827$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5828      fi
5829      # Try to locate tool using the code snippet
5830      for ac_prog in chmod
5831do
5832  # Extract the first word of "$ac_prog", so it can be a program name with args.
5833set dummy $ac_prog; ac_word=$2
5834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5835$as_echo_n "checking for $ac_word... " >&6; }
5836if ${ac_cv_path_CHMOD+:} false; then :
5837  $as_echo_n "(cached) " >&6
5838else
5839  case $CHMOD in
5840  [\\/]* | ?:[\\/]*)
5841  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5842  ;;
5843  *)
5844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5845for as_dir in $PATH
5846do
5847  IFS=$as_save_IFS
5848  test -z "$as_dir" && as_dir=.
5849    for ac_exec_ext in '' $ac_executable_extensions; do
5850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5851    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5853    break 2
5854  fi
5855done
5856  done
5857IFS=$as_save_IFS
5858
5859  ;;
5860esac
5861fi
5862CHMOD=$ac_cv_path_CHMOD
5863if test -n "$CHMOD"; then
5864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5865$as_echo "$CHMOD" >&6; }
5866else
5867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5868$as_echo "no" >&6; }
5869fi
5870
5871
5872  test -n "$CHMOD" && break
5873done
5874
5875    else
5876      # If it succeeded, then it was overridden by the user. We will use it
5877      # for the tool.
5878
5879      # First remove it from the list of overridden variables, so we can test
5880      # for unknown variables in the end.
5881      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5882
5883      # Check if we try to supply an empty value
5884      if test "x$CHMOD" = x; then
5885        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5886$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5887        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5888$as_echo_n "checking for CHMOD... " >&6; }
5889        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5890$as_echo "disabled" >&6; }
5891      else
5892        # Check if the provided tool contains a complete path.
5893        tool_specified="$CHMOD"
5894        tool_basename="${tool_specified##*/}"
5895        if test "x$tool_basename" = "x$tool_specified"; then
5896          # A command without a complete path is provided, search $PATH.
5897          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5898$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5899          # Extract the first word of "$tool_basename", so it can be a program name with args.
5900set dummy $tool_basename; ac_word=$2
5901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5902$as_echo_n "checking for $ac_word... " >&6; }
5903if ${ac_cv_path_CHMOD+:} false; then :
5904  $as_echo_n "(cached) " >&6
5905else
5906  case $CHMOD in
5907  [\\/]* | ?:[\\/]*)
5908  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5909  ;;
5910  *)
5911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5912for as_dir in $PATH
5913do
5914  IFS=$as_save_IFS
5915  test -z "$as_dir" && as_dir=.
5916    for ac_exec_ext in '' $ac_executable_extensions; do
5917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5918    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5920    break 2
5921  fi
5922done
5923  done
5924IFS=$as_save_IFS
5925
5926  ;;
5927esac
5928fi
5929CHMOD=$ac_cv_path_CHMOD
5930if test -n "$CHMOD"; then
5931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5932$as_echo "$CHMOD" >&6; }
5933else
5934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5935$as_echo "no" >&6; }
5936fi
5937
5938
5939          if test "x$CHMOD" = x; then
5940            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5941          fi
5942        else
5943          # Otherwise we believe it is a complete path. Use it as it is.
5944          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5945$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5946          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5947$as_echo_n "checking for CHMOD... " >&6; }
5948          if test ! -x "$tool_specified"; then
5949            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5950$as_echo "not found" >&6; }
5951            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5952          fi
5953          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5954$as_echo "$tool_specified" >&6; }
5955        fi
5956      fi
5957    fi
5958
5959  fi
5960
5961
5962
5963  if test "x$CHMOD" = x; then
5964    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5965  fi
5966
5967
5968
5969
5970
5971  # Publish this variable in the help.
5972
5973
5974  if [ -z "${CMP+x}" ]; then
5975    # The variable is not set by user, try to locate tool using the code snippet
5976    for ac_prog in cmp
5977do
5978  # Extract the first word of "$ac_prog", so it can be a program name with args.
5979set dummy $ac_prog; ac_word=$2
5980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5981$as_echo_n "checking for $ac_word... " >&6; }
5982if ${ac_cv_path_CMP+:} false; then :
5983  $as_echo_n "(cached) " >&6
5984else
5985  case $CMP in
5986  [\\/]* | ?:[\\/]*)
5987  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5988  ;;
5989  *)
5990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5991for as_dir in $PATH
5992do
5993  IFS=$as_save_IFS
5994  test -z "$as_dir" && as_dir=.
5995    for ac_exec_ext in '' $ac_executable_extensions; do
5996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5997    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5999    break 2
6000  fi
6001done
6002  done
6003IFS=$as_save_IFS
6004
6005  ;;
6006esac
6007fi
6008CMP=$ac_cv_path_CMP
6009if test -n "$CMP"; then
6010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6011$as_echo "$CMP" >&6; }
6012else
6013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6014$as_echo "no" >&6; }
6015fi
6016
6017
6018  test -n "$CMP" && break
6019done
6020
6021  else
6022    # The variable is set, but is it from the command line or the environment?
6023
6024    # Try to remove the string !CMP! from our list.
6025    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6026    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6027      # If it failed, the variable was not from the command line. Ignore it,
6028      # but warn the user (except for BASH, which is always set by the calling BASH).
6029      if test "xCMP" != xBASH; then
6030        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6031$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6032      fi
6033      # Try to locate tool using the code snippet
6034      for ac_prog in cmp
6035do
6036  # Extract the first word of "$ac_prog", so it can be a program name with args.
6037set dummy $ac_prog; ac_word=$2
6038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6039$as_echo_n "checking for $ac_word... " >&6; }
6040if ${ac_cv_path_CMP+:} false; then :
6041  $as_echo_n "(cached) " >&6
6042else
6043  case $CMP in
6044  [\\/]* | ?:[\\/]*)
6045  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6046  ;;
6047  *)
6048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6049for as_dir in $PATH
6050do
6051  IFS=$as_save_IFS
6052  test -z "$as_dir" && as_dir=.
6053    for ac_exec_ext in '' $ac_executable_extensions; do
6054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6055    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6057    break 2
6058  fi
6059done
6060  done
6061IFS=$as_save_IFS
6062
6063  ;;
6064esac
6065fi
6066CMP=$ac_cv_path_CMP
6067if test -n "$CMP"; then
6068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6069$as_echo "$CMP" >&6; }
6070else
6071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6072$as_echo "no" >&6; }
6073fi
6074
6075
6076  test -n "$CMP" && break
6077done
6078
6079    else
6080      # If it succeeded, then it was overridden by the user. We will use it
6081      # for the tool.
6082
6083      # First remove it from the list of overridden variables, so we can test
6084      # for unknown variables in the end.
6085      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6086
6087      # Check if we try to supply an empty value
6088      if test "x$CMP" = x; then
6089        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6090$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6091        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6092$as_echo_n "checking for CMP... " >&6; }
6093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6094$as_echo "disabled" >&6; }
6095      else
6096        # Check if the provided tool contains a complete path.
6097        tool_specified="$CMP"
6098        tool_basename="${tool_specified##*/}"
6099        if test "x$tool_basename" = "x$tool_specified"; then
6100          # A command without a complete path is provided, search $PATH.
6101          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6102$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6103          # Extract the first word of "$tool_basename", so it can be a program name with args.
6104set dummy $tool_basename; ac_word=$2
6105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6106$as_echo_n "checking for $ac_word... " >&6; }
6107if ${ac_cv_path_CMP+:} false; then :
6108  $as_echo_n "(cached) " >&6
6109else
6110  case $CMP in
6111  [\\/]* | ?:[\\/]*)
6112  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6113  ;;
6114  *)
6115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6116for as_dir in $PATH
6117do
6118  IFS=$as_save_IFS
6119  test -z "$as_dir" && as_dir=.
6120    for ac_exec_ext in '' $ac_executable_extensions; do
6121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6122    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6124    break 2
6125  fi
6126done
6127  done
6128IFS=$as_save_IFS
6129
6130  ;;
6131esac
6132fi
6133CMP=$ac_cv_path_CMP
6134if test -n "$CMP"; then
6135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6136$as_echo "$CMP" >&6; }
6137else
6138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6139$as_echo "no" >&6; }
6140fi
6141
6142
6143          if test "x$CMP" = x; then
6144            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6145          fi
6146        else
6147          # Otherwise we believe it is a complete path. Use it as it is.
6148          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6149$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6150          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6151$as_echo_n "checking for CMP... " >&6; }
6152          if test ! -x "$tool_specified"; then
6153            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6154$as_echo "not found" >&6; }
6155            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6156          fi
6157          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6158$as_echo "$tool_specified" >&6; }
6159        fi
6160      fi
6161    fi
6162
6163  fi
6164
6165
6166
6167  if test "x$CMP" = x; then
6168    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6169  fi
6170
6171
6172
6173
6174
6175  # Publish this variable in the help.
6176
6177
6178  if [ -z "${COMM+x}" ]; then
6179    # The variable is not set by user, try to locate tool using the code snippet
6180    for ac_prog in comm
6181do
6182  # Extract the first word of "$ac_prog", so it can be a program name with args.
6183set dummy $ac_prog; ac_word=$2
6184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6185$as_echo_n "checking for $ac_word... " >&6; }
6186if ${ac_cv_path_COMM+:} false; then :
6187  $as_echo_n "(cached) " >&6
6188else
6189  case $COMM in
6190  [\\/]* | ?:[\\/]*)
6191  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6192  ;;
6193  *)
6194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6195for as_dir in $PATH
6196do
6197  IFS=$as_save_IFS
6198  test -z "$as_dir" && as_dir=.
6199    for ac_exec_ext in '' $ac_executable_extensions; do
6200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6201    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6203    break 2
6204  fi
6205done
6206  done
6207IFS=$as_save_IFS
6208
6209  ;;
6210esac
6211fi
6212COMM=$ac_cv_path_COMM
6213if test -n "$COMM"; then
6214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6215$as_echo "$COMM" >&6; }
6216else
6217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6218$as_echo "no" >&6; }
6219fi
6220
6221
6222  test -n "$COMM" && break
6223done
6224
6225  else
6226    # The variable is set, but is it from the command line or the environment?
6227
6228    # Try to remove the string !COMM! from our list.
6229    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6230    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6231      # If it failed, the variable was not from the command line. Ignore it,
6232      # but warn the user (except for BASH, which is always set by the calling BASH).
6233      if test "xCOMM" != xBASH; then
6234        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6235$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6236      fi
6237      # Try to locate tool using the code snippet
6238      for ac_prog in comm
6239do
6240  # Extract the first word of "$ac_prog", so it can be a program name with args.
6241set dummy $ac_prog; ac_word=$2
6242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6243$as_echo_n "checking for $ac_word... " >&6; }
6244if ${ac_cv_path_COMM+:} false; then :
6245  $as_echo_n "(cached) " >&6
6246else
6247  case $COMM in
6248  [\\/]* | ?:[\\/]*)
6249  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6250  ;;
6251  *)
6252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6253for as_dir in $PATH
6254do
6255  IFS=$as_save_IFS
6256  test -z "$as_dir" && as_dir=.
6257    for ac_exec_ext in '' $ac_executable_extensions; do
6258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6259    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6261    break 2
6262  fi
6263done
6264  done
6265IFS=$as_save_IFS
6266
6267  ;;
6268esac
6269fi
6270COMM=$ac_cv_path_COMM
6271if test -n "$COMM"; then
6272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6273$as_echo "$COMM" >&6; }
6274else
6275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6276$as_echo "no" >&6; }
6277fi
6278
6279
6280  test -n "$COMM" && break
6281done
6282
6283    else
6284      # If it succeeded, then it was overridden by the user. We will use it
6285      # for the tool.
6286
6287      # First remove it from the list of overridden variables, so we can test
6288      # for unknown variables in the end.
6289      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6290
6291      # Check if we try to supply an empty value
6292      if test "x$COMM" = x; then
6293        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6294$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6296$as_echo_n "checking for COMM... " >&6; }
6297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6298$as_echo "disabled" >&6; }
6299      else
6300        # Check if the provided tool contains a complete path.
6301        tool_specified="$COMM"
6302        tool_basename="${tool_specified##*/}"
6303        if test "x$tool_basename" = "x$tool_specified"; then
6304          # A command without a complete path is provided, search $PATH.
6305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6306$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6307          # Extract the first word of "$tool_basename", so it can be a program name with args.
6308set dummy $tool_basename; ac_word=$2
6309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6310$as_echo_n "checking for $ac_word... " >&6; }
6311if ${ac_cv_path_COMM+:} false; then :
6312  $as_echo_n "(cached) " >&6
6313else
6314  case $COMM in
6315  [\\/]* | ?:[\\/]*)
6316  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6317  ;;
6318  *)
6319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6320for as_dir in $PATH
6321do
6322  IFS=$as_save_IFS
6323  test -z "$as_dir" && as_dir=.
6324    for ac_exec_ext in '' $ac_executable_extensions; do
6325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6326    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6328    break 2
6329  fi
6330done
6331  done
6332IFS=$as_save_IFS
6333
6334  ;;
6335esac
6336fi
6337COMM=$ac_cv_path_COMM
6338if test -n "$COMM"; then
6339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6340$as_echo "$COMM" >&6; }
6341else
6342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6343$as_echo "no" >&6; }
6344fi
6345
6346
6347          if test "x$COMM" = x; then
6348            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6349          fi
6350        else
6351          # Otherwise we believe it is a complete path. Use it as it is.
6352          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6353$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6354          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6355$as_echo_n "checking for COMM... " >&6; }
6356          if test ! -x "$tool_specified"; then
6357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6358$as_echo "not found" >&6; }
6359            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6360          fi
6361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6362$as_echo "$tool_specified" >&6; }
6363        fi
6364      fi
6365    fi
6366
6367  fi
6368
6369
6370
6371  if test "x$COMM" = x; then
6372    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6373  fi
6374
6375
6376
6377
6378
6379  # Publish this variable in the help.
6380
6381
6382  if [ -z "${CP+x}" ]; then
6383    # The variable is not set by user, try to locate tool using the code snippet
6384    for ac_prog in cp
6385do
6386  # Extract the first word of "$ac_prog", so it can be a program name with args.
6387set dummy $ac_prog; ac_word=$2
6388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6389$as_echo_n "checking for $ac_word... " >&6; }
6390if ${ac_cv_path_CP+:} false; then :
6391  $as_echo_n "(cached) " >&6
6392else
6393  case $CP in
6394  [\\/]* | ?:[\\/]*)
6395  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6396  ;;
6397  *)
6398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6399for as_dir in $PATH
6400do
6401  IFS=$as_save_IFS
6402  test -z "$as_dir" && as_dir=.
6403    for ac_exec_ext in '' $ac_executable_extensions; do
6404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6405    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6407    break 2
6408  fi
6409done
6410  done
6411IFS=$as_save_IFS
6412
6413  ;;
6414esac
6415fi
6416CP=$ac_cv_path_CP
6417if test -n "$CP"; then
6418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6419$as_echo "$CP" >&6; }
6420else
6421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6422$as_echo "no" >&6; }
6423fi
6424
6425
6426  test -n "$CP" && break
6427done
6428
6429  else
6430    # The variable is set, but is it from the command line or the environment?
6431
6432    # Try to remove the string !CP! from our list.
6433    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6434    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6435      # If it failed, the variable was not from the command line. Ignore it,
6436      # but warn the user (except for BASH, which is always set by the calling BASH).
6437      if test "xCP" != xBASH; then
6438        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6439$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6440      fi
6441      # Try to locate tool using the code snippet
6442      for ac_prog in cp
6443do
6444  # Extract the first word of "$ac_prog", so it can be a program name with args.
6445set dummy $ac_prog; ac_word=$2
6446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6447$as_echo_n "checking for $ac_word... " >&6; }
6448if ${ac_cv_path_CP+:} false; then :
6449  $as_echo_n "(cached) " >&6
6450else
6451  case $CP in
6452  [\\/]* | ?:[\\/]*)
6453  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6454  ;;
6455  *)
6456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6457for as_dir in $PATH
6458do
6459  IFS=$as_save_IFS
6460  test -z "$as_dir" && as_dir=.
6461    for ac_exec_ext in '' $ac_executable_extensions; do
6462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6463    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6465    break 2
6466  fi
6467done
6468  done
6469IFS=$as_save_IFS
6470
6471  ;;
6472esac
6473fi
6474CP=$ac_cv_path_CP
6475if test -n "$CP"; then
6476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6477$as_echo "$CP" >&6; }
6478else
6479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6480$as_echo "no" >&6; }
6481fi
6482
6483
6484  test -n "$CP" && break
6485done
6486
6487    else
6488      # If it succeeded, then it was overridden by the user. We will use it
6489      # for the tool.
6490
6491      # First remove it from the list of overridden variables, so we can test
6492      # for unknown variables in the end.
6493      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6494
6495      # Check if we try to supply an empty value
6496      if test "x$CP" = x; then
6497        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6498$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6499        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6500$as_echo_n "checking for CP... " >&6; }
6501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6502$as_echo "disabled" >&6; }
6503      else
6504        # Check if the provided tool contains a complete path.
6505        tool_specified="$CP"
6506        tool_basename="${tool_specified##*/}"
6507        if test "x$tool_basename" = "x$tool_specified"; then
6508          # A command without a complete path is provided, search $PATH.
6509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6510$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6511          # Extract the first word of "$tool_basename", so it can be a program name with args.
6512set dummy $tool_basename; ac_word=$2
6513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6514$as_echo_n "checking for $ac_word... " >&6; }
6515if ${ac_cv_path_CP+:} false; then :
6516  $as_echo_n "(cached) " >&6
6517else
6518  case $CP in
6519  [\\/]* | ?:[\\/]*)
6520  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6521  ;;
6522  *)
6523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6524for as_dir in $PATH
6525do
6526  IFS=$as_save_IFS
6527  test -z "$as_dir" && as_dir=.
6528    for ac_exec_ext in '' $ac_executable_extensions; do
6529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6530    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6532    break 2
6533  fi
6534done
6535  done
6536IFS=$as_save_IFS
6537
6538  ;;
6539esac
6540fi
6541CP=$ac_cv_path_CP
6542if test -n "$CP"; then
6543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6544$as_echo "$CP" >&6; }
6545else
6546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6547$as_echo "no" >&6; }
6548fi
6549
6550
6551          if test "x$CP" = x; then
6552            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6553          fi
6554        else
6555          # Otherwise we believe it is a complete path. Use it as it is.
6556          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6557$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6558          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6559$as_echo_n "checking for CP... " >&6; }
6560          if test ! -x "$tool_specified"; then
6561            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6562$as_echo "not found" >&6; }
6563            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6564          fi
6565          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6566$as_echo "$tool_specified" >&6; }
6567        fi
6568      fi
6569    fi
6570
6571  fi
6572
6573
6574
6575  if test "x$CP" = x; then
6576    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6577  fi
6578
6579
6580
6581
6582
6583  # Publish this variable in the help.
6584
6585
6586  if [ -z "${CUT+x}" ]; then
6587    # The variable is not set by user, try to locate tool using the code snippet
6588    for ac_prog in cut
6589do
6590  # Extract the first word of "$ac_prog", so it can be a program name with args.
6591set dummy $ac_prog; ac_word=$2
6592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6593$as_echo_n "checking for $ac_word... " >&6; }
6594if ${ac_cv_path_CUT+:} false; then :
6595  $as_echo_n "(cached) " >&6
6596else
6597  case $CUT in
6598  [\\/]* | ?:[\\/]*)
6599  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6600  ;;
6601  *)
6602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6603for as_dir in $PATH
6604do
6605  IFS=$as_save_IFS
6606  test -z "$as_dir" && as_dir=.
6607    for ac_exec_ext in '' $ac_executable_extensions; do
6608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6609    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6611    break 2
6612  fi
6613done
6614  done
6615IFS=$as_save_IFS
6616
6617  ;;
6618esac
6619fi
6620CUT=$ac_cv_path_CUT
6621if test -n "$CUT"; then
6622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6623$as_echo "$CUT" >&6; }
6624else
6625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6626$as_echo "no" >&6; }
6627fi
6628
6629
6630  test -n "$CUT" && break
6631done
6632
6633  else
6634    # The variable is set, but is it from the command line or the environment?
6635
6636    # Try to remove the string !CUT! from our list.
6637    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6638    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6639      # If it failed, the variable was not from the command line. Ignore it,
6640      # but warn the user (except for BASH, which is always set by the calling BASH).
6641      if test "xCUT" != xBASH; then
6642        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6643$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6644      fi
6645      # Try to locate tool using the code snippet
6646      for ac_prog in cut
6647do
6648  # Extract the first word of "$ac_prog", so it can be a program name with args.
6649set dummy $ac_prog; ac_word=$2
6650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6651$as_echo_n "checking for $ac_word... " >&6; }
6652if ${ac_cv_path_CUT+:} false; then :
6653  $as_echo_n "(cached) " >&6
6654else
6655  case $CUT in
6656  [\\/]* | ?:[\\/]*)
6657  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6658  ;;
6659  *)
6660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6661for as_dir in $PATH
6662do
6663  IFS=$as_save_IFS
6664  test -z "$as_dir" && as_dir=.
6665    for ac_exec_ext in '' $ac_executable_extensions; do
6666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6667    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6669    break 2
6670  fi
6671done
6672  done
6673IFS=$as_save_IFS
6674
6675  ;;
6676esac
6677fi
6678CUT=$ac_cv_path_CUT
6679if test -n "$CUT"; then
6680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6681$as_echo "$CUT" >&6; }
6682else
6683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6684$as_echo "no" >&6; }
6685fi
6686
6687
6688  test -n "$CUT" && break
6689done
6690
6691    else
6692      # If it succeeded, then it was overridden by the user. We will use it
6693      # for the tool.
6694
6695      # First remove it from the list of overridden variables, so we can test
6696      # for unknown variables in the end.
6697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6698
6699      # Check if we try to supply an empty value
6700      if test "x$CUT" = x; then
6701        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6702$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6704$as_echo_n "checking for CUT... " >&6; }
6705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6706$as_echo "disabled" >&6; }
6707      else
6708        # Check if the provided tool contains a complete path.
6709        tool_specified="$CUT"
6710        tool_basename="${tool_specified##*/}"
6711        if test "x$tool_basename" = "x$tool_specified"; then
6712          # A command without a complete path is provided, search $PATH.
6713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6714$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6715          # Extract the first word of "$tool_basename", so it can be a program name with args.
6716set dummy $tool_basename; ac_word=$2
6717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6718$as_echo_n "checking for $ac_word... " >&6; }
6719if ${ac_cv_path_CUT+:} false; then :
6720  $as_echo_n "(cached) " >&6
6721else
6722  case $CUT in
6723  [\\/]* | ?:[\\/]*)
6724  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6725  ;;
6726  *)
6727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6728for as_dir in $PATH
6729do
6730  IFS=$as_save_IFS
6731  test -z "$as_dir" && as_dir=.
6732    for ac_exec_ext in '' $ac_executable_extensions; do
6733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6734    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6736    break 2
6737  fi
6738done
6739  done
6740IFS=$as_save_IFS
6741
6742  ;;
6743esac
6744fi
6745CUT=$ac_cv_path_CUT
6746if test -n "$CUT"; then
6747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6748$as_echo "$CUT" >&6; }
6749else
6750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6751$as_echo "no" >&6; }
6752fi
6753
6754
6755          if test "x$CUT" = x; then
6756            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6757          fi
6758        else
6759          # Otherwise we believe it is a complete path. Use it as it is.
6760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6761$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6762          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6763$as_echo_n "checking for CUT... " >&6; }
6764          if test ! -x "$tool_specified"; then
6765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6766$as_echo "not found" >&6; }
6767            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6768          fi
6769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6770$as_echo "$tool_specified" >&6; }
6771        fi
6772      fi
6773    fi
6774
6775  fi
6776
6777
6778
6779  if test "x$CUT" = x; then
6780    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6781  fi
6782
6783
6784
6785
6786
6787  # Publish this variable in the help.
6788
6789
6790  if [ -z "${DATE+x}" ]; then
6791    # The variable is not set by user, try to locate tool using the code snippet
6792    for ac_prog in date
6793do
6794  # Extract the first word of "$ac_prog", so it can be a program name with args.
6795set dummy $ac_prog; ac_word=$2
6796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6797$as_echo_n "checking for $ac_word... " >&6; }
6798if ${ac_cv_path_DATE+:} false; then :
6799  $as_echo_n "(cached) " >&6
6800else
6801  case $DATE in
6802  [\\/]* | ?:[\\/]*)
6803  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6804  ;;
6805  *)
6806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6807for as_dir in $PATH
6808do
6809  IFS=$as_save_IFS
6810  test -z "$as_dir" && as_dir=.
6811    for ac_exec_ext in '' $ac_executable_extensions; do
6812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6813    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6815    break 2
6816  fi
6817done
6818  done
6819IFS=$as_save_IFS
6820
6821  ;;
6822esac
6823fi
6824DATE=$ac_cv_path_DATE
6825if test -n "$DATE"; then
6826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6827$as_echo "$DATE" >&6; }
6828else
6829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6830$as_echo "no" >&6; }
6831fi
6832
6833
6834  test -n "$DATE" && break
6835done
6836
6837  else
6838    # The variable is set, but is it from the command line or the environment?
6839
6840    # Try to remove the string !DATE! from our list.
6841    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6842    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6843      # If it failed, the variable was not from the command line. Ignore it,
6844      # but warn the user (except for BASH, which is always set by the calling BASH).
6845      if test "xDATE" != xBASH; then
6846        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6847$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6848      fi
6849      # Try to locate tool using the code snippet
6850      for ac_prog in date
6851do
6852  # Extract the first word of "$ac_prog", so it can be a program name with args.
6853set dummy $ac_prog; ac_word=$2
6854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6855$as_echo_n "checking for $ac_word... " >&6; }
6856if ${ac_cv_path_DATE+:} false; then :
6857  $as_echo_n "(cached) " >&6
6858else
6859  case $DATE in
6860  [\\/]* | ?:[\\/]*)
6861  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6862  ;;
6863  *)
6864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6865for as_dir in $PATH
6866do
6867  IFS=$as_save_IFS
6868  test -z "$as_dir" && as_dir=.
6869    for ac_exec_ext in '' $ac_executable_extensions; do
6870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6871    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6873    break 2
6874  fi
6875done
6876  done
6877IFS=$as_save_IFS
6878
6879  ;;
6880esac
6881fi
6882DATE=$ac_cv_path_DATE
6883if test -n "$DATE"; then
6884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6885$as_echo "$DATE" >&6; }
6886else
6887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6888$as_echo "no" >&6; }
6889fi
6890
6891
6892  test -n "$DATE" && break
6893done
6894
6895    else
6896      # If it succeeded, then it was overridden by the user. We will use it
6897      # for the tool.
6898
6899      # First remove it from the list of overridden variables, so we can test
6900      # for unknown variables in the end.
6901      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6902
6903      # Check if we try to supply an empty value
6904      if test "x$DATE" = x; then
6905        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6906$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6907        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6908$as_echo_n "checking for DATE... " >&6; }
6909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6910$as_echo "disabled" >&6; }
6911      else
6912        # Check if the provided tool contains a complete path.
6913        tool_specified="$DATE"
6914        tool_basename="${tool_specified##*/}"
6915        if test "x$tool_basename" = "x$tool_specified"; then
6916          # A command without a complete path is provided, search $PATH.
6917          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6918$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6919          # Extract the first word of "$tool_basename", so it can be a program name with args.
6920set dummy $tool_basename; ac_word=$2
6921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6922$as_echo_n "checking for $ac_word... " >&6; }
6923if ${ac_cv_path_DATE+:} false; then :
6924  $as_echo_n "(cached) " >&6
6925else
6926  case $DATE in
6927  [\\/]* | ?:[\\/]*)
6928  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6929  ;;
6930  *)
6931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6932for as_dir in $PATH
6933do
6934  IFS=$as_save_IFS
6935  test -z "$as_dir" && as_dir=.
6936    for ac_exec_ext in '' $ac_executable_extensions; do
6937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6938    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6940    break 2
6941  fi
6942done
6943  done
6944IFS=$as_save_IFS
6945
6946  ;;
6947esac
6948fi
6949DATE=$ac_cv_path_DATE
6950if test -n "$DATE"; then
6951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6952$as_echo "$DATE" >&6; }
6953else
6954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6955$as_echo "no" >&6; }
6956fi
6957
6958
6959          if test "x$DATE" = x; then
6960            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6961          fi
6962        else
6963          # Otherwise we believe it is a complete path. Use it as it is.
6964          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6965$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6966          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6967$as_echo_n "checking for DATE... " >&6; }
6968          if test ! -x "$tool_specified"; then
6969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6970$as_echo "not found" >&6; }
6971            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6972          fi
6973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6974$as_echo "$tool_specified" >&6; }
6975        fi
6976      fi
6977    fi
6978
6979  fi
6980
6981
6982
6983  if test "x$DATE" = x; then
6984    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6985  fi
6986
6987
6988
6989
6990
6991  # Publish this variable in the help.
6992
6993
6994  if [ -z "${DIFF+x}" ]; then
6995    # The variable is not set by user, try to locate tool using the code snippet
6996    for ac_prog in gdiff diff
6997do
6998  # Extract the first word of "$ac_prog", so it can be a program name with args.
6999set dummy $ac_prog; ac_word=$2
7000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7001$as_echo_n "checking for $ac_word... " >&6; }
7002if ${ac_cv_path_DIFF+:} false; then :
7003  $as_echo_n "(cached) " >&6
7004else
7005  case $DIFF in
7006  [\\/]* | ?:[\\/]*)
7007  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7008  ;;
7009  *)
7010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7011for as_dir in $PATH
7012do
7013  IFS=$as_save_IFS
7014  test -z "$as_dir" && as_dir=.
7015    for ac_exec_ext in '' $ac_executable_extensions; do
7016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7017    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7019    break 2
7020  fi
7021done
7022  done
7023IFS=$as_save_IFS
7024
7025  ;;
7026esac
7027fi
7028DIFF=$ac_cv_path_DIFF
7029if test -n "$DIFF"; then
7030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7031$as_echo "$DIFF" >&6; }
7032else
7033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7034$as_echo "no" >&6; }
7035fi
7036
7037
7038  test -n "$DIFF" && break
7039done
7040
7041  else
7042    # The variable is set, but is it from the command line or the environment?
7043
7044    # Try to remove the string !DIFF! from our list.
7045    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7046    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7047      # If it failed, the variable was not from the command line. Ignore it,
7048      # but warn the user (except for BASH, which is always set by the calling BASH).
7049      if test "xDIFF" != xBASH; then
7050        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7051$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7052      fi
7053      # Try to locate tool using the code snippet
7054      for ac_prog in gdiff diff
7055do
7056  # Extract the first word of "$ac_prog", so it can be a program name with args.
7057set dummy $ac_prog; ac_word=$2
7058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7059$as_echo_n "checking for $ac_word... " >&6; }
7060if ${ac_cv_path_DIFF+:} false; then :
7061  $as_echo_n "(cached) " >&6
7062else
7063  case $DIFF in
7064  [\\/]* | ?:[\\/]*)
7065  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7066  ;;
7067  *)
7068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7069for as_dir in $PATH
7070do
7071  IFS=$as_save_IFS
7072  test -z "$as_dir" && as_dir=.
7073    for ac_exec_ext in '' $ac_executable_extensions; do
7074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7075    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7077    break 2
7078  fi
7079done
7080  done
7081IFS=$as_save_IFS
7082
7083  ;;
7084esac
7085fi
7086DIFF=$ac_cv_path_DIFF
7087if test -n "$DIFF"; then
7088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7089$as_echo "$DIFF" >&6; }
7090else
7091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7092$as_echo "no" >&6; }
7093fi
7094
7095
7096  test -n "$DIFF" && break
7097done
7098
7099    else
7100      # If it succeeded, then it was overridden by the user. We will use it
7101      # for the tool.
7102
7103      # First remove it from the list of overridden variables, so we can test
7104      # for unknown variables in the end.
7105      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7106
7107      # Check if we try to supply an empty value
7108      if test "x$DIFF" = x; then
7109        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7110$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7111        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7112$as_echo_n "checking for DIFF... " >&6; }
7113        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7114$as_echo "disabled" >&6; }
7115      else
7116        # Check if the provided tool contains a complete path.
7117        tool_specified="$DIFF"
7118        tool_basename="${tool_specified##*/}"
7119        if test "x$tool_basename" = "x$tool_specified"; then
7120          # A command without a complete path is provided, search $PATH.
7121          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7122$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7123          # Extract the first word of "$tool_basename", so it can be a program name with args.
7124set dummy $tool_basename; ac_word=$2
7125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7126$as_echo_n "checking for $ac_word... " >&6; }
7127if ${ac_cv_path_DIFF+:} false; then :
7128  $as_echo_n "(cached) " >&6
7129else
7130  case $DIFF in
7131  [\\/]* | ?:[\\/]*)
7132  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7133  ;;
7134  *)
7135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7136for as_dir in $PATH
7137do
7138  IFS=$as_save_IFS
7139  test -z "$as_dir" && as_dir=.
7140    for ac_exec_ext in '' $ac_executable_extensions; do
7141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7142    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7144    break 2
7145  fi
7146done
7147  done
7148IFS=$as_save_IFS
7149
7150  ;;
7151esac
7152fi
7153DIFF=$ac_cv_path_DIFF
7154if test -n "$DIFF"; then
7155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7156$as_echo "$DIFF" >&6; }
7157else
7158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7159$as_echo "no" >&6; }
7160fi
7161
7162
7163          if test "x$DIFF" = x; then
7164            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7165          fi
7166        else
7167          # Otherwise we believe it is a complete path. Use it as it is.
7168          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7169$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7170          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7171$as_echo_n "checking for DIFF... " >&6; }
7172          if test ! -x "$tool_specified"; then
7173            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7174$as_echo "not found" >&6; }
7175            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7176          fi
7177          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7178$as_echo "$tool_specified" >&6; }
7179        fi
7180      fi
7181    fi
7182
7183  fi
7184
7185
7186
7187  if test "x$DIFF" = x; then
7188    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7189  fi
7190
7191
7192
7193
7194
7195  # Publish this variable in the help.
7196
7197
7198  if [ -z "${DIRNAME+x}" ]; then
7199    # The variable is not set by user, try to locate tool using the code snippet
7200    for ac_prog in dirname
7201do
7202  # Extract the first word of "$ac_prog", so it can be a program name with args.
7203set dummy $ac_prog; ac_word=$2
7204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7205$as_echo_n "checking for $ac_word... " >&6; }
7206if ${ac_cv_path_DIRNAME+:} false; then :
7207  $as_echo_n "(cached) " >&6
7208else
7209  case $DIRNAME in
7210  [\\/]* | ?:[\\/]*)
7211  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7212  ;;
7213  *)
7214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7215for as_dir in $PATH
7216do
7217  IFS=$as_save_IFS
7218  test -z "$as_dir" && as_dir=.
7219    for ac_exec_ext in '' $ac_executable_extensions; do
7220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7221    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7223    break 2
7224  fi
7225done
7226  done
7227IFS=$as_save_IFS
7228
7229  ;;
7230esac
7231fi
7232DIRNAME=$ac_cv_path_DIRNAME
7233if test -n "$DIRNAME"; then
7234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7235$as_echo "$DIRNAME" >&6; }
7236else
7237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7238$as_echo "no" >&6; }
7239fi
7240
7241
7242  test -n "$DIRNAME" && break
7243done
7244
7245  else
7246    # The variable is set, but is it from the command line or the environment?
7247
7248    # Try to remove the string !DIRNAME! from our list.
7249    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7250    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7251      # If it failed, the variable was not from the command line. Ignore it,
7252      # but warn the user (except for BASH, which is always set by the calling BASH).
7253      if test "xDIRNAME" != xBASH; then
7254        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7255$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7256      fi
7257      # Try to locate tool using the code snippet
7258      for ac_prog in dirname
7259do
7260  # Extract the first word of "$ac_prog", so it can be a program name with args.
7261set dummy $ac_prog; ac_word=$2
7262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7263$as_echo_n "checking for $ac_word... " >&6; }
7264if ${ac_cv_path_DIRNAME+:} false; then :
7265  $as_echo_n "(cached) " >&6
7266else
7267  case $DIRNAME in
7268  [\\/]* | ?:[\\/]*)
7269  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7270  ;;
7271  *)
7272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7273for as_dir in $PATH
7274do
7275  IFS=$as_save_IFS
7276  test -z "$as_dir" && as_dir=.
7277    for ac_exec_ext in '' $ac_executable_extensions; do
7278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7279    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7281    break 2
7282  fi
7283done
7284  done
7285IFS=$as_save_IFS
7286
7287  ;;
7288esac
7289fi
7290DIRNAME=$ac_cv_path_DIRNAME
7291if test -n "$DIRNAME"; then
7292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7293$as_echo "$DIRNAME" >&6; }
7294else
7295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7296$as_echo "no" >&6; }
7297fi
7298
7299
7300  test -n "$DIRNAME" && break
7301done
7302
7303    else
7304      # If it succeeded, then it was overridden by the user. We will use it
7305      # for the tool.
7306
7307      # First remove it from the list of overridden variables, so we can test
7308      # for unknown variables in the end.
7309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7310
7311      # Check if we try to supply an empty value
7312      if test "x$DIRNAME" = x; then
7313        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7314$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7315        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7316$as_echo_n "checking for DIRNAME... " >&6; }
7317        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7318$as_echo "disabled" >&6; }
7319      else
7320        # Check if the provided tool contains a complete path.
7321        tool_specified="$DIRNAME"
7322        tool_basename="${tool_specified##*/}"
7323        if test "x$tool_basename" = "x$tool_specified"; then
7324          # A command without a complete path is provided, search $PATH.
7325          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7326$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7327          # Extract the first word of "$tool_basename", so it can be a program name with args.
7328set dummy $tool_basename; ac_word=$2
7329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7330$as_echo_n "checking for $ac_word... " >&6; }
7331if ${ac_cv_path_DIRNAME+:} false; then :
7332  $as_echo_n "(cached) " >&6
7333else
7334  case $DIRNAME in
7335  [\\/]* | ?:[\\/]*)
7336  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7337  ;;
7338  *)
7339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7340for as_dir in $PATH
7341do
7342  IFS=$as_save_IFS
7343  test -z "$as_dir" && as_dir=.
7344    for ac_exec_ext in '' $ac_executable_extensions; do
7345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7346    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7348    break 2
7349  fi
7350done
7351  done
7352IFS=$as_save_IFS
7353
7354  ;;
7355esac
7356fi
7357DIRNAME=$ac_cv_path_DIRNAME
7358if test -n "$DIRNAME"; then
7359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7360$as_echo "$DIRNAME" >&6; }
7361else
7362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7363$as_echo "no" >&6; }
7364fi
7365
7366
7367          if test "x$DIRNAME" = x; then
7368            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7369          fi
7370        else
7371          # Otherwise we believe it is a complete path. Use it as it is.
7372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7373$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7374          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7375$as_echo_n "checking for DIRNAME... " >&6; }
7376          if test ! -x "$tool_specified"; then
7377            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7378$as_echo "not found" >&6; }
7379            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7380          fi
7381          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7382$as_echo "$tool_specified" >&6; }
7383        fi
7384      fi
7385    fi
7386
7387  fi
7388
7389
7390
7391  if test "x$DIRNAME" = x; then
7392    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7393  fi
7394
7395
7396
7397
7398
7399  # Publish this variable in the help.
7400
7401
7402  if [ -z "${ECHO+x}" ]; then
7403    # The variable is not set by user, try to locate tool using the code snippet
7404    for ac_prog in echo
7405do
7406  # Extract the first word of "$ac_prog", so it can be a program name with args.
7407set dummy $ac_prog; ac_word=$2
7408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7409$as_echo_n "checking for $ac_word... " >&6; }
7410if ${ac_cv_path_ECHO+:} false; then :
7411  $as_echo_n "(cached) " >&6
7412else
7413  case $ECHO in
7414  [\\/]* | ?:[\\/]*)
7415  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7416  ;;
7417  *)
7418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7419for as_dir in $PATH
7420do
7421  IFS=$as_save_IFS
7422  test -z "$as_dir" && as_dir=.
7423    for ac_exec_ext in '' $ac_executable_extensions; do
7424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7425    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7427    break 2
7428  fi
7429done
7430  done
7431IFS=$as_save_IFS
7432
7433  ;;
7434esac
7435fi
7436ECHO=$ac_cv_path_ECHO
7437if test -n "$ECHO"; then
7438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7439$as_echo "$ECHO" >&6; }
7440else
7441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7442$as_echo "no" >&6; }
7443fi
7444
7445
7446  test -n "$ECHO" && break
7447done
7448
7449  else
7450    # The variable is set, but is it from the command line or the environment?
7451
7452    # Try to remove the string !ECHO! from our list.
7453    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7454    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7455      # If it failed, the variable was not from the command line. Ignore it,
7456      # but warn the user (except for BASH, which is always set by the calling BASH).
7457      if test "xECHO" != xBASH; then
7458        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7459$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7460      fi
7461      # Try to locate tool using the code snippet
7462      for ac_prog in echo
7463do
7464  # Extract the first word of "$ac_prog", so it can be a program name with args.
7465set dummy $ac_prog; ac_word=$2
7466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7467$as_echo_n "checking for $ac_word... " >&6; }
7468if ${ac_cv_path_ECHO+:} false; then :
7469  $as_echo_n "(cached) " >&6
7470else
7471  case $ECHO in
7472  [\\/]* | ?:[\\/]*)
7473  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7474  ;;
7475  *)
7476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7477for as_dir in $PATH
7478do
7479  IFS=$as_save_IFS
7480  test -z "$as_dir" && as_dir=.
7481    for ac_exec_ext in '' $ac_executable_extensions; do
7482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7483    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7485    break 2
7486  fi
7487done
7488  done
7489IFS=$as_save_IFS
7490
7491  ;;
7492esac
7493fi
7494ECHO=$ac_cv_path_ECHO
7495if test -n "$ECHO"; then
7496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7497$as_echo "$ECHO" >&6; }
7498else
7499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7500$as_echo "no" >&6; }
7501fi
7502
7503
7504  test -n "$ECHO" && break
7505done
7506
7507    else
7508      # If it succeeded, then it was overridden by the user. We will use it
7509      # for the tool.
7510
7511      # First remove it from the list of overridden variables, so we can test
7512      # for unknown variables in the end.
7513      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7514
7515      # Check if we try to supply an empty value
7516      if test "x$ECHO" = x; then
7517        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7518$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7519        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7520$as_echo_n "checking for ECHO... " >&6; }
7521        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7522$as_echo "disabled" >&6; }
7523      else
7524        # Check if the provided tool contains a complete path.
7525        tool_specified="$ECHO"
7526        tool_basename="${tool_specified##*/}"
7527        if test "x$tool_basename" = "x$tool_specified"; then
7528          # A command without a complete path is provided, search $PATH.
7529          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7530$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7531          # Extract the first word of "$tool_basename", so it can be a program name with args.
7532set dummy $tool_basename; ac_word=$2
7533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7534$as_echo_n "checking for $ac_word... " >&6; }
7535if ${ac_cv_path_ECHO+:} false; then :
7536  $as_echo_n "(cached) " >&6
7537else
7538  case $ECHO in
7539  [\\/]* | ?:[\\/]*)
7540  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7541  ;;
7542  *)
7543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7544for as_dir in $PATH
7545do
7546  IFS=$as_save_IFS
7547  test -z "$as_dir" && as_dir=.
7548    for ac_exec_ext in '' $ac_executable_extensions; do
7549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7550    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7552    break 2
7553  fi
7554done
7555  done
7556IFS=$as_save_IFS
7557
7558  ;;
7559esac
7560fi
7561ECHO=$ac_cv_path_ECHO
7562if test -n "$ECHO"; then
7563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7564$as_echo "$ECHO" >&6; }
7565else
7566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7567$as_echo "no" >&6; }
7568fi
7569
7570
7571          if test "x$ECHO" = x; then
7572            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7573          fi
7574        else
7575          # Otherwise we believe it is a complete path. Use it as it is.
7576          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7577$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7578          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7579$as_echo_n "checking for ECHO... " >&6; }
7580          if test ! -x "$tool_specified"; then
7581            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7582$as_echo "not found" >&6; }
7583            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7584          fi
7585          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7586$as_echo "$tool_specified" >&6; }
7587        fi
7588      fi
7589    fi
7590
7591  fi
7592
7593
7594
7595  if test "x$ECHO" = x; then
7596    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7597  fi
7598
7599
7600
7601
7602
7603  # Publish this variable in the help.
7604
7605
7606  if [ -z "${EXPR+x}" ]; then
7607    # The variable is not set by user, try to locate tool using the code snippet
7608    for ac_prog in expr
7609do
7610  # Extract the first word of "$ac_prog", so it can be a program name with args.
7611set dummy $ac_prog; ac_word=$2
7612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7613$as_echo_n "checking for $ac_word... " >&6; }
7614if ${ac_cv_path_EXPR+:} false; then :
7615  $as_echo_n "(cached) " >&6
7616else
7617  case $EXPR in
7618  [\\/]* | ?:[\\/]*)
7619  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7620  ;;
7621  *)
7622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7623for as_dir in $PATH
7624do
7625  IFS=$as_save_IFS
7626  test -z "$as_dir" && as_dir=.
7627    for ac_exec_ext in '' $ac_executable_extensions; do
7628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7629    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7631    break 2
7632  fi
7633done
7634  done
7635IFS=$as_save_IFS
7636
7637  ;;
7638esac
7639fi
7640EXPR=$ac_cv_path_EXPR
7641if test -n "$EXPR"; then
7642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7643$as_echo "$EXPR" >&6; }
7644else
7645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7646$as_echo "no" >&6; }
7647fi
7648
7649
7650  test -n "$EXPR" && break
7651done
7652
7653  else
7654    # The variable is set, but is it from the command line or the environment?
7655
7656    # Try to remove the string !EXPR! from our list.
7657    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7658    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7659      # If it failed, the variable was not from the command line. Ignore it,
7660      # but warn the user (except for BASH, which is always set by the calling BASH).
7661      if test "xEXPR" != xBASH; then
7662        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7663$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7664      fi
7665      # Try to locate tool using the code snippet
7666      for ac_prog in expr
7667do
7668  # Extract the first word of "$ac_prog", so it can be a program name with args.
7669set dummy $ac_prog; ac_word=$2
7670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7671$as_echo_n "checking for $ac_word... " >&6; }
7672if ${ac_cv_path_EXPR+:} false; then :
7673  $as_echo_n "(cached) " >&6
7674else
7675  case $EXPR in
7676  [\\/]* | ?:[\\/]*)
7677  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7678  ;;
7679  *)
7680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7681for as_dir in $PATH
7682do
7683  IFS=$as_save_IFS
7684  test -z "$as_dir" && as_dir=.
7685    for ac_exec_ext in '' $ac_executable_extensions; do
7686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7687    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7689    break 2
7690  fi
7691done
7692  done
7693IFS=$as_save_IFS
7694
7695  ;;
7696esac
7697fi
7698EXPR=$ac_cv_path_EXPR
7699if test -n "$EXPR"; then
7700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7701$as_echo "$EXPR" >&6; }
7702else
7703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7704$as_echo "no" >&6; }
7705fi
7706
7707
7708  test -n "$EXPR" && break
7709done
7710
7711    else
7712      # If it succeeded, then it was overridden by the user. We will use it
7713      # for the tool.
7714
7715      # First remove it from the list of overridden variables, so we can test
7716      # for unknown variables in the end.
7717      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7718
7719      # Check if we try to supply an empty value
7720      if test "x$EXPR" = x; then
7721        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7722$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7723        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7724$as_echo_n "checking for EXPR... " >&6; }
7725        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7726$as_echo "disabled" >&6; }
7727      else
7728        # Check if the provided tool contains a complete path.
7729        tool_specified="$EXPR"
7730        tool_basename="${tool_specified##*/}"
7731        if test "x$tool_basename" = "x$tool_specified"; then
7732          # A command without a complete path is provided, search $PATH.
7733          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7734$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7735          # Extract the first word of "$tool_basename", so it can be a program name with args.
7736set dummy $tool_basename; ac_word=$2
7737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7738$as_echo_n "checking for $ac_word... " >&6; }
7739if ${ac_cv_path_EXPR+:} false; then :
7740  $as_echo_n "(cached) " >&6
7741else
7742  case $EXPR in
7743  [\\/]* | ?:[\\/]*)
7744  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7745  ;;
7746  *)
7747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7748for as_dir in $PATH
7749do
7750  IFS=$as_save_IFS
7751  test -z "$as_dir" && as_dir=.
7752    for ac_exec_ext in '' $ac_executable_extensions; do
7753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7754    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7756    break 2
7757  fi
7758done
7759  done
7760IFS=$as_save_IFS
7761
7762  ;;
7763esac
7764fi
7765EXPR=$ac_cv_path_EXPR
7766if test -n "$EXPR"; then
7767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7768$as_echo "$EXPR" >&6; }
7769else
7770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7771$as_echo "no" >&6; }
7772fi
7773
7774
7775          if test "x$EXPR" = x; then
7776            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7777          fi
7778        else
7779          # Otherwise we believe it is a complete path. Use it as it is.
7780          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7781$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7782          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7783$as_echo_n "checking for EXPR... " >&6; }
7784          if test ! -x "$tool_specified"; then
7785            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7786$as_echo "not found" >&6; }
7787            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7788          fi
7789          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7790$as_echo "$tool_specified" >&6; }
7791        fi
7792      fi
7793    fi
7794
7795  fi
7796
7797
7798
7799  if test "x$EXPR" = x; then
7800    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7801  fi
7802
7803
7804
7805
7806
7807  # Publish this variable in the help.
7808
7809
7810  if [ -z "${FILE+x}" ]; then
7811    # The variable is not set by user, try to locate tool using the code snippet
7812    for ac_prog in file
7813do
7814  # Extract the first word of "$ac_prog", so it can be a program name with args.
7815set dummy $ac_prog; ac_word=$2
7816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7817$as_echo_n "checking for $ac_word... " >&6; }
7818if ${ac_cv_path_FILE+:} false; then :
7819  $as_echo_n "(cached) " >&6
7820else
7821  case $FILE in
7822  [\\/]* | ?:[\\/]*)
7823  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7824  ;;
7825  *)
7826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7827for as_dir in $PATH
7828do
7829  IFS=$as_save_IFS
7830  test -z "$as_dir" && as_dir=.
7831    for ac_exec_ext in '' $ac_executable_extensions; do
7832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7833    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7835    break 2
7836  fi
7837done
7838  done
7839IFS=$as_save_IFS
7840
7841  ;;
7842esac
7843fi
7844FILE=$ac_cv_path_FILE
7845if test -n "$FILE"; then
7846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7847$as_echo "$FILE" >&6; }
7848else
7849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7850$as_echo "no" >&6; }
7851fi
7852
7853
7854  test -n "$FILE" && break
7855done
7856
7857  else
7858    # The variable is set, but is it from the command line or the environment?
7859
7860    # Try to remove the string !FILE! from our list.
7861    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7862    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7863      # If it failed, the variable was not from the command line. Ignore it,
7864      # but warn the user (except for BASH, which is always set by the calling BASH).
7865      if test "xFILE" != xBASH; then
7866        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7867$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7868      fi
7869      # Try to locate tool using the code snippet
7870      for ac_prog in file
7871do
7872  # Extract the first word of "$ac_prog", so it can be a program name with args.
7873set dummy $ac_prog; ac_word=$2
7874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7875$as_echo_n "checking for $ac_word... " >&6; }
7876if ${ac_cv_path_FILE+:} false; then :
7877  $as_echo_n "(cached) " >&6
7878else
7879  case $FILE in
7880  [\\/]* | ?:[\\/]*)
7881  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7882  ;;
7883  *)
7884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7885for as_dir in $PATH
7886do
7887  IFS=$as_save_IFS
7888  test -z "$as_dir" && as_dir=.
7889    for ac_exec_ext in '' $ac_executable_extensions; do
7890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7891    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7893    break 2
7894  fi
7895done
7896  done
7897IFS=$as_save_IFS
7898
7899  ;;
7900esac
7901fi
7902FILE=$ac_cv_path_FILE
7903if test -n "$FILE"; then
7904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7905$as_echo "$FILE" >&6; }
7906else
7907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7908$as_echo "no" >&6; }
7909fi
7910
7911
7912  test -n "$FILE" && break
7913done
7914
7915    else
7916      # If it succeeded, then it was overridden by the user. We will use it
7917      # for the tool.
7918
7919      # First remove it from the list of overridden variables, so we can test
7920      # for unknown variables in the end.
7921      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7922
7923      # Check if we try to supply an empty value
7924      if test "x$FILE" = x; then
7925        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7926$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7927        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7928$as_echo_n "checking for FILE... " >&6; }
7929        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7930$as_echo "disabled" >&6; }
7931      else
7932        # Check if the provided tool contains a complete path.
7933        tool_specified="$FILE"
7934        tool_basename="${tool_specified##*/}"
7935        if test "x$tool_basename" = "x$tool_specified"; then
7936          # A command without a complete path is provided, search $PATH.
7937          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7938$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7939          # Extract the first word of "$tool_basename", so it can be a program name with args.
7940set dummy $tool_basename; ac_word=$2
7941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7942$as_echo_n "checking for $ac_word... " >&6; }
7943if ${ac_cv_path_FILE+:} false; then :
7944  $as_echo_n "(cached) " >&6
7945else
7946  case $FILE in
7947  [\\/]* | ?:[\\/]*)
7948  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7949  ;;
7950  *)
7951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7952for as_dir in $PATH
7953do
7954  IFS=$as_save_IFS
7955  test -z "$as_dir" && as_dir=.
7956    for ac_exec_ext in '' $ac_executable_extensions; do
7957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7958    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7960    break 2
7961  fi
7962done
7963  done
7964IFS=$as_save_IFS
7965
7966  ;;
7967esac
7968fi
7969FILE=$ac_cv_path_FILE
7970if test -n "$FILE"; then
7971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7972$as_echo "$FILE" >&6; }
7973else
7974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7975$as_echo "no" >&6; }
7976fi
7977
7978
7979          if test "x$FILE" = x; then
7980            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7981          fi
7982        else
7983          # Otherwise we believe it is a complete path. Use it as it is.
7984          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7985$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7986          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7987$as_echo_n "checking for FILE... " >&6; }
7988          if test ! -x "$tool_specified"; then
7989            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7990$as_echo "not found" >&6; }
7991            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7992          fi
7993          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7994$as_echo "$tool_specified" >&6; }
7995        fi
7996      fi
7997    fi
7998
7999  fi
8000
8001
8002
8003  if test "x$FILE" = x; then
8004    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8005  fi
8006
8007
8008
8009
8010
8011  # Publish this variable in the help.
8012
8013
8014  if [ -z "${FIND+x}" ]; then
8015    # The variable is not set by user, try to locate tool using the code snippet
8016    for ac_prog in find
8017do
8018  # Extract the first word of "$ac_prog", so it can be a program name with args.
8019set dummy $ac_prog; ac_word=$2
8020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8021$as_echo_n "checking for $ac_word... " >&6; }
8022if ${ac_cv_path_FIND+:} false; then :
8023  $as_echo_n "(cached) " >&6
8024else
8025  case $FIND in
8026  [\\/]* | ?:[\\/]*)
8027  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8028  ;;
8029  *)
8030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8031for as_dir in $PATH
8032do
8033  IFS=$as_save_IFS
8034  test -z "$as_dir" && as_dir=.
8035    for ac_exec_ext in '' $ac_executable_extensions; do
8036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8037    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8039    break 2
8040  fi
8041done
8042  done
8043IFS=$as_save_IFS
8044
8045  ;;
8046esac
8047fi
8048FIND=$ac_cv_path_FIND
8049if test -n "$FIND"; then
8050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8051$as_echo "$FIND" >&6; }
8052else
8053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8054$as_echo "no" >&6; }
8055fi
8056
8057
8058  test -n "$FIND" && break
8059done
8060
8061  else
8062    # The variable is set, but is it from the command line or the environment?
8063
8064    # Try to remove the string !FIND! from our list.
8065    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8066    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8067      # If it failed, the variable was not from the command line. Ignore it,
8068      # but warn the user (except for BASH, which is always set by the calling BASH).
8069      if test "xFIND" != xBASH; then
8070        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8071$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8072      fi
8073      # Try to locate tool using the code snippet
8074      for ac_prog in find
8075do
8076  # Extract the first word of "$ac_prog", so it can be a program name with args.
8077set dummy $ac_prog; ac_word=$2
8078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8079$as_echo_n "checking for $ac_word... " >&6; }
8080if ${ac_cv_path_FIND+:} false; then :
8081  $as_echo_n "(cached) " >&6
8082else
8083  case $FIND in
8084  [\\/]* | ?:[\\/]*)
8085  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8086  ;;
8087  *)
8088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8089for as_dir in $PATH
8090do
8091  IFS=$as_save_IFS
8092  test -z "$as_dir" && as_dir=.
8093    for ac_exec_ext in '' $ac_executable_extensions; do
8094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8095    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8097    break 2
8098  fi
8099done
8100  done
8101IFS=$as_save_IFS
8102
8103  ;;
8104esac
8105fi
8106FIND=$ac_cv_path_FIND
8107if test -n "$FIND"; then
8108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8109$as_echo "$FIND" >&6; }
8110else
8111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8112$as_echo "no" >&6; }
8113fi
8114
8115
8116  test -n "$FIND" && break
8117done
8118
8119    else
8120      # If it succeeded, then it was overridden by the user. We will use it
8121      # for the tool.
8122
8123      # First remove it from the list of overridden variables, so we can test
8124      # for unknown variables in the end.
8125      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8126
8127      # Check if we try to supply an empty value
8128      if test "x$FIND" = x; then
8129        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8130$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8131        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8132$as_echo_n "checking for FIND... " >&6; }
8133        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8134$as_echo "disabled" >&6; }
8135      else
8136        # Check if the provided tool contains a complete path.
8137        tool_specified="$FIND"
8138        tool_basename="${tool_specified##*/}"
8139        if test "x$tool_basename" = "x$tool_specified"; then
8140          # A command without a complete path is provided, search $PATH.
8141          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8142$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8143          # Extract the first word of "$tool_basename", so it can be a program name with args.
8144set dummy $tool_basename; ac_word=$2
8145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8146$as_echo_n "checking for $ac_word... " >&6; }
8147if ${ac_cv_path_FIND+:} false; then :
8148  $as_echo_n "(cached) " >&6
8149else
8150  case $FIND in
8151  [\\/]* | ?:[\\/]*)
8152  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8153  ;;
8154  *)
8155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8156for as_dir in $PATH
8157do
8158  IFS=$as_save_IFS
8159  test -z "$as_dir" && as_dir=.
8160    for ac_exec_ext in '' $ac_executable_extensions; do
8161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8162    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8164    break 2
8165  fi
8166done
8167  done
8168IFS=$as_save_IFS
8169
8170  ;;
8171esac
8172fi
8173FIND=$ac_cv_path_FIND
8174if test -n "$FIND"; then
8175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8176$as_echo "$FIND" >&6; }
8177else
8178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8179$as_echo "no" >&6; }
8180fi
8181
8182
8183          if test "x$FIND" = x; then
8184            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8185          fi
8186        else
8187          # Otherwise we believe it is a complete path. Use it as it is.
8188          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8189$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8190          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8191$as_echo_n "checking for FIND... " >&6; }
8192          if test ! -x "$tool_specified"; then
8193            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8194$as_echo "not found" >&6; }
8195            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8196          fi
8197          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8198$as_echo "$tool_specified" >&6; }
8199        fi
8200      fi
8201    fi
8202
8203  fi
8204
8205
8206
8207  if test "x$FIND" = x; then
8208    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8209  fi
8210
8211
8212
8213
8214
8215  # Publish this variable in the help.
8216
8217
8218  if [ -z "${HEAD+x}" ]; then
8219    # The variable is not set by user, try to locate tool using the code snippet
8220    for ac_prog in head
8221do
8222  # Extract the first word of "$ac_prog", so it can be a program name with args.
8223set dummy $ac_prog; ac_word=$2
8224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8225$as_echo_n "checking for $ac_word... " >&6; }
8226if ${ac_cv_path_HEAD+:} false; then :
8227  $as_echo_n "(cached) " >&6
8228else
8229  case $HEAD in
8230  [\\/]* | ?:[\\/]*)
8231  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8232  ;;
8233  *)
8234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8235for as_dir in $PATH
8236do
8237  IFS=$as_save_IFS
8238  test -z "$as_dir" && as_dir=.
8239    for ac_exec_ext in '' $ac_executable_extensions; do
8240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8241    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8243    break 2
8244  fi
8245done
8246  done
8247IFS=$as_save_IFS
8248
8249  ;;
8250esac
8251fi
8252HEAD=$ac_cv_path_HEAD
8253if test -n "$HEAD"; then
8254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8255$as_echo "$HEAD" >&6; }
8256else
8257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8258$as_echo "no" >&6; }
8259fi
8260
8261
8262  test -n "$HEAD" && break
8263done
8264
8265  else
8266    # The variable is set, but is it from the command line or the environment?
8267
8268    # Try to remove the string !HEAD! from our list.
8269    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8270    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8271      # If it failed, the variable was not from the command line. Ignore it,
8272      # but warn the user (except for BASH, which is always set by the calling BASH).
8273      if test "xHEAD" != xBASH; then
8274        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8275$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8276      fi
8277      # Try to locate tool using the code snippet
8278      for ac_prog in head
8279do
8280  # Extract the first word of "$ac_prog", so it can be a program name with args.
8281set dummy $ac_prog; ac_word=$2
8282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8283$as_echo_n "checking for $ac_word... " >&6; }
8284if ${ac_cv_path_HEAD+:} false; then :
8285  $as_echo_n "(cached) " >&6
8286else
8287  case $HEAD in
8288  [\\/]* | ?:[\\/]*)
8289  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8290  ;;
8291  *)
8292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8293for as_dir in $PATH
8294do
8295  IFS=$as_save_IFS
8296  test -z "$as_dir" && as_dir=.
8297    for ac_exec_ext in '' $ac_executable_extensions; do
8298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8299    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8301    break 2
8302  fi
8303done
8304  done
8305IFS=$as_save_IFS
8306
8307  ;;
8308esac
8309fi
8310HEAD=$ac_cv_path_HEAD
8311if test -n "$HEAD"; then
8312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8313$as_echo "$HEAD" >&6; }
8314else
8315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8316$as_echo "no" >&6; }
8317fi
8318
8319
8320  test -n "$HEAD" && break
8321done
8322
8323    else
8324      # If it succeeded, then it was overridden by the user. We will use it
8325      # for the tool.
8326
8327      # First remove it from the list of overridden variables, so we can test
8328      # for unknown variables in the end.
8329      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8330
8331      # Check if we try to supply an empty value
8332      if test "x$HEAD" = x; then
8333        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8334$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8335        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8336$as_echo_n "checking for HEAD... " >&6; }
8337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8338$as_echo "disabled" >&6; }
8339      else
8340        # Check if the provided tool contains a complete path.
8341        tool_specified="$HEAD"
8342        tool_basename="${tool_specified##*/}"
8343        if test "x$tool_basename" = "x$tool_specified"; then
8344          # A command without a complete path is provided, search $PATH.
8345          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8346$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8347          # Extract the first word of "$tool_basename", so it can be a program name with args.
8348set dummy $tool_basename; ac_word=$2
8349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8350$as_echo_n "checking for $ac_word... " >&6; }
8351if ${ac_cv_path_HEAD+:} false; then :
8352  $as_echo_n "(cached) " >&6
8353else
8354  case $HEAD in
8355  [\\/]* | ?:[\\/]*)
8356  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8357  ;;
8358  *)
8359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8360for as_dir in $PATH
8361do
8362  IFS=$as_save_IFS
8363  test -z "$as_dir" && as_dir=.
8364    for ac_exec_ext in '' $ac_executable_extensions; do
8365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8366    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8368    break 2
8369  fi
8370done
8371  done
8372IFS=$as_save_IFS
8373
8374  ;;
8375esac
8376fi
8377HEAD=$ac_cv_path_HEAD
8378if test -n "$HEAD"; then
8379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8380$as_echo "$HEAD" >&6; }
8381else
8382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8383$as_echo "no" >&6; }
8384fi
8385
8386
8387          if test "x$HEAD" = x; then
8388            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8389          fi
8390        else
8391          # Otherwise we believe it is a complete path. Use it as it is.
8392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8393$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8394          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8395$as_echo_n "checking for HEAD... " >&6; }
8396          if test ! -x "$tool_specified"; then
8397            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8398$as_echo "not found" >&6; }
8399            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8400          fi
8401          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8402$as_echo "$tool_specified" >&6; }
8403        fi
8404      fi
8405    fi
8406
8407  fi
8408
8409
8410
8411  if test "x$HEAD" = x; then
8412    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8413  fi
8414
8415
8416
8417
8418
8419  # Publish this variable in the help.
8420
8421
8422  if [ -z "${GUNZIP+x}" ]; then
8423    # The variable is not set by user, try to locate tool using the code snippet
8424    for ac_prog in gunzip
8425do
8426  # Extract the first word of "$ac_prog", so it can be a program name with args.
8427set dummy $ac_prog; ac_word=$2
8428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8429$as_echo_n "checking for $ac_word... " >&6; }
8430if ${ac_cv_path_GUNZIP+:} false; then :
8431  $as_echo_n "(cached) " >&6
8432else
8433  case $GUNZIP in
8434  [\\/]* | ?:[\\/]*)
8435  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8436  ;;
8437  *)
8438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8439for as_dir in $PATH
8440do
8441  IFS=$as_save_IFS
8442  test -z "$as_dir" && as_dir=.
8443    for ac_exec_ext in '' $ac_executable_extensions; do
8444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8445    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8447    break 2
8448  fi
8449done
8450  done
8451IFS=$as_save_IFS
8452
8453  ;;
8454esac
8455fi
8456GUNZIP=$ac_cv_path_GUNZIP
8457if test -n "$GUNZIP"; then
8458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8459$as_echo "$GUNZIP" >&6; }
8460else
8461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8462$as_echo "no" >&6; }
8463fi
8464
8465
8466  test -n "$GUNZIP" && break
8467done
8468
8469  else
8470    # The variable is set, but is it from the command line or the environment?
8471
8472    # Try to remove the string !GUNZIP! from our list.
8473    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8474    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8475      # If it failed, the variable was not from the command line. Ignore it,
8476      # but warn the user (except for BASH, which is always set by the calling BASH).
8477      if test "xGUNZIP" != xBASH; then
8478        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8479$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8480      fi
8481      # Try to locate tool using the code snippet
8482      for ac_prog in gunzip
8483do
8484  # Extract the first word of "$ac_prog", so it can be a program name with args.
8485set dummy $ac_prog; ac_word=$2
8486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8487$as_echo_n "checking for $ac_word... " >&6; }
8488if ${ac_cv_path_GUNZIP+:} false; then :
8489  $as_echo_n "(cached) " >&6
8490else
8491  case $GUNZIP in
8492  [\\/]* | ?:[\\/]*)
8493  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8494  ;;
8495  *)
8496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8497for as_dir in $PATH
8498do
8499  IFS=$as_save_IFS
8500  test -z "$as_dir" && as_dir=.
8501    for ac_exec_ext in '' $ac_executable_extensions; do
8502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8503    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8505    break 2
8506  fi
8507done
8508  done
8509IFS=$as_save_IFS
8510
8511  ;;
8512esac
8513fi
8514GUNZIP=$ac_cv_path_GUNZIP
8515if test -n "$GUNZIP"; then
8516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8517$as_echo "$GUNZIP" >&6; }
8518else
8519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8520$as_echo "no" >&6; }
8521fi
8522
8523
8524  test -n "$GUNZIP" && break
8525done
8526
8527    else
8528      # If it succeeded, then it was overridden by the user. We will use it
8529      # for the tool.
8530
8531      # First remove it from the list of overridden variables, so we can test
8532      # for unknown variables in the end.
8533      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8534
8535      # Check if we try to supply an empty value
8536      if test "x$GUNZIP" = x; then
8537        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8538$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8539        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8540$as_echo_n "checking for GUNZIP... " >&6; }
8541        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8542$as_echo "disabled" >&6; }
8543      else
8544        # Check if the provided tool contains a complete path.
8545        tool_specified="$GUNZIP"
8546        tool_basename="${tool_specified##*/}"
8547        if test "x$tool_basename" = "x$tool_specified"; then
8548          # A command without a complete path is provided, search $PATH.
8549          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8550$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8551          # Extract the first word of "$tool_basename", so it can be a program name with args.
8552set dummy $tool_basename; ac_word=$2
8553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8554$as_echo_n "checking for $ac_word... " >&6; }
8555if ${ac_cv_path_GUNZIP+:} false; then :
8556  $as_echo_n "(cached) " >&6
8557else
8558  case $GUNZIP in
8559  [\\/]* | ?:[\\/]*)
8560  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8561  ;;
8562  *)
8563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8564for as_dir in $PATH
8565do
8566  IFS=$as_save_IFS
8567  test -z "$as_dir" && as_dir=.
8568    for ac_exec_ext in '' $ac_executable_extensions; do
8569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8570    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8572    break 2
8573  fi
8574done
8575  done
8576IFS=$as_save_IFS
8577
8578  ;;
8579esac
8580fi
8581GUNZIP=$ac_cv_path_GUNZIP
8582if test -n "$GUNZIP"; then
8583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8584$as_echo "$GUNZIP" >&6; }
8585else
8586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8587$as_echo "no" >&6; }
8588fi
8589
8590
8591          if test "x$GUNZIP" = x; then
8592            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8593          fi
8594        else
8595          # Otherwise we believe it is a complete path. Use it as it is.
8596          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8597$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8598          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8599$as_echo_n "checking for GUNZIP... " >&6; }
8600          if test ! -x "$tool_specified"; then
8601            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8602$as_echo "not found" >&6; }
8603            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8604          fi
8605          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8606$as_echo "$tool_specified" >&6; }
8607        fi
8608      fi
8609    fi
8610
8611  fi
8612
8613
8614
8615  if test "x$GUNZIP" = x; then
8616    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8617  fi
8618
8619
8620
8621
8622
8623  # Publish this variable in the help.
8624
8625
8626  if [ -z "${GZIP+x}" ]; then
8627    # The variable is not set by user, try to locate tool using the code snippet
8628    for ac_prog in pigz gzip
8629do
8630  # Extract the first word of "$ac_prog", so it can be a program name with args.
8631set dummy $ac_prog; ac_word=$2
8632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8633$as_echo_n "checking for $ac_word... " >&6; }
8634if ${ac_cv_path_GZIP+:} false; then :
8635  $as_echo_n "(cached) " >&6
8636else
8637  case $GZIP in
8638  [\\/]* | ?:[\\/]*)
8639  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8640  ;;
8641  *)
8642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8643for as_dir in $PATH
8644do
8645  IFS=$as_save_IFS
8646  test -z "$as_dir" && as_dir=.
8647    for ac_exec_ext in '' $ac_executable_extensions; do
8648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8649    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8651    break 2
8652  fi
8653done
8654  done
8655IFS=$as_save_IFS
8656
8657  ;;
8658esac
8659fi
8660GZIP=$ac_cv_path_GZIP
8661if test -n "$GZIP"; then
8662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8663$as_echo "$GZIP" >&6; }
8664else
8665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8666$as_echo "no" >&6; }
8667fi
8668
8669
8670  test -n "$GZIP" && break
8671done
8672
8673  else
8674    # The variable is set, but is it from the command line or the environment?
8675
8676    # Try to remove the string !GZIP! from our list.
8677    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8678    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8679      # If it failed, the variable was not from the command line. Ignore it,
8680      # but warn the user (except for BASH, which is always set by the calling BASH).
8681      if test "xGZIP" != xBASH; then
8682        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8683$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8684      fi
8685      # Try to locate tool using the code snippet
8686      for ac_prog in pigz gzip
8687do
8688  # Extract the first word of "$ac_prog", so it can be a program name with args.
8689set dummy $ac_prog; ac_word=$2
8690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8691$as_echo_n "checking for $ac_word... " >&6; }
8692if ${ac_cv_path_GZIP+:} false; then :
8693  $as_echo_n "(cached) " >&6
8694else
8695  case $GZIP in
8696  [\\/]* | ?:[\\/]*)
8697  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8698  ;;
8699  *)
8700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8701for as_dir in $PATH
8702do
8703  IFS=$as_save_IFS
8704  test -z "$as_dir" && as_dir=.
8705    for ac_exec_ext in '' $ac_executable_extensions; do
8706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8707    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8709    break 2
8710  fi
8711done
8712  done
8713IFS=$as_save_IFS
8714
8715  ;;
8716esac
8717fi
8718GZIP=$ac_cv_path_GZIP
8719if test -n "$GZIP"; then
8720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8721$as_echo "$GZIP" >&6; }
8722else
8723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8724$as_echo "no" >&6; }
8725fi
8726
8727
8728  test -n "$GZIP" && break
8729done
8730
8731    else
8732      # If it succeeded, then it was overridden by the user. We will use it
8733      # for the tool.
8734
8735      # First remove it from the list of overridden variables, so we can test
8736      # for unknown variables in the end.
8737      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8738
8739      # Check if we try to supply an empty value
8740      if test "x$GZIP" = x; then
8741        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8742$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8743        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8744$as_echo_n "checking for GZIP... " >&6; }
8745        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8746$as_echo "disabled" >&6; }
8747      else
8748        # Check if the provided tool contains a complete path.
8749        tool_specified="$GZIP"
8750        tool_basename="${tool_specified##*/}"
8751        if test "x$tool_basename" = "x$tool_specified"; then
8752          # A command without a complete path is provided, search $PATH.
8753          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8754$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8755          # Extract the first word of "$tool_basename", so it can be a program name with args.
8756set dummy $tool_basename; ac_word=$2
8757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8758$as_echo_n "checking for $ac_word... " >&6; }
8759if ${ac_cv_path_GZIP+:} false; then :
8760  $as_echo_n "(cached) " >&6
8761else
8762  case $GZIP in
8763  [\\/]* | ?:[\\/]*)
8764  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8765  ;;
8766  *)
8767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8768for as_dir in $PATH
8769do
8770  IFS=$as_save_IFS
8771  test -z "$as_dir" && as_dir=.
8772    for ac_exec_ext in '' $ac_executable_extensions; do
8773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8774    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8776    break 2
8777  fi
8778done
8779  done
8780IFS=$as_save_IFS
8781
8782  ;;
8783esac
8784fi
8785GZIP=$ac_cv_path_GZIP
8786if test -n "$GZIP"; then
8787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8788$as_echo "$GZIP" >&6; }
8789else
8790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8791$as_echo "no" >&6; }
8792fi
8793
8794
8795          if test "x$GZIP" = x; then
8796            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8797          fi
8798        else
8799          # Otherwise we believe it is a complete path. Use it as it is.
8800          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8801$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8802          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8803$as_echo_n "checking for GZIP... " >&6; }
8804          if test ! -x "$tool_specified"; then
8805            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8806$as_echo "not found" >&6; }
8807            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8808          fi
8809          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8810$as_echo "$tool_specified" >&6; }
8811        fi
8812      fi
8813    fi
8814
8815  fi
8816
8817
8818
8819  if test "x$GZIP" = x; then
8820    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8821  fi
8822
8823
8824
8825
8826
8827  # Publish this variable in the help.
8828
8829
8830  if [ -z "${LN+x}" ]; then
8831    # The variable is not set by user, try to locate tool using the code snippet
8832    for ac_prog in ln
8833do
8834  # Extract the first word of "$ac_prog", so it can be a program name with args.
8835set dummy $ac_prog; ac_word=$2
8836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8837$as_echo_n "checking for $ac_word... " >&6; }
8838if ${ac_cv_path_LN+:} false; then :
8839  $as_echo_n "(cached) " >&6
8840else
8841  case $LN in
8842  [\\/]* | ?:[\\/]*)
8843  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8844  ;;
8845  *)
8846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8847for as_dir in $PATH
8848do
8849  IFS=$as_save_IFS
8850  test -z "$as_dir" && as_dir=.
8851    for ac_exec_ext in '' $ac_executable_extensions; do
8852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8853    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8855    break 2
8856  fi
8857done
8858  done
8859IFS=$as_save_IFS
8860
8861  ;;
8862esac
8863fi
8864LN=$ac_cv_path_LN
8865if test -n "$LN"; then
8866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8867$as_echo "$LN" >&6; }
8868else
8869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8870$as_echo "no" >&6; }
8871fi
8872
8873
8874  test -n "$LN" && break
8875done
8876
8877  else
8878    # The variable is set, but is it from the command line or the environment?
8879
8880    # Try to remove the string !LN! from our list.
8881    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8882    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8883      # If it failed, the variable was not from the command line. Ignore it,
8884      # but warn the user (except for BASH, which is always set by the calling BASH).
8885      if test "xLN" != xBASH; then
8886        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8887$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8888      fi
8889      # Try to locate tool using the code snippet
8890      for ac_prog in ln
8891do
8892  # Extract the first word of "$ac_prog", so it can be a program name with args.
8893set dummy $ac_prog; ac_word=$2
8894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8895$as_echo_n "checking for $ac_word... " >&6; }
8896if ${ac_cv_path_LN+:} false; then :
8897  $as_echo_n "(cached) " >&6
8898else
8899  case $LN in
8900  [\\/]* | ?:[\\/]*)
8901  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8902  ;;
8903  *)
8904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8905for as_dir in $PATH
8906do
8907  IFS=$as_save_IFS
8908  test -z "$as_dir" && as_dir=.
8909    for ac_exec_ext in '' $ac_executable_extensions; do
8910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8911    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8913    break 2
8914  fi
8915done
8916  done
8917IFS=$as_save_IFS
8918
8919  ;;
8920esac
8921fi
8922LN=$ac_cv_path_LN
8923if test -n "$LN"; then
8924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8925$as_echo "$LN" >&6; }
8926else
8927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8928$as_echo "no" >&6; }
8929fi
8930
8931
8932  test -n "$LN" && break
8933done
8934
8935    else
8936      # If it succeeded, then it was overridden by the user. We will use it
8937      # for the tool.
8938
8939      # First remove it from the list of overridden variables, so we can test
8940      # for unknown variables in the end.
8941      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8942
8943      # Check if we try to supply an empty value
8944      if test "x$LN" = x; then
8945        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8946$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8947        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8948$as_echo_n "checking for LN... " >&6; }
8949        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8950$as_echo "disabled" >&6; }
8951      else
8952        # Check if the provided tool contains a complete path.
8953        tool_specified="$LN"
8954        tool_basename="${tool_specified##*/}"
8955        if test "x$tool_basename" = "x$tool_specified"; then
8956          # A command without a complete path is provided, search $PATH.
8957          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8958$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8959          # Extract the first word of "$tool_basename", so it can be a program name with args.
8960set dummy $tool_basename; ac_word=$2
8961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8962$as_echo_n "checking for $ac_word... " >&6; }
8963if ${ac_cv_path_LN+:} false; then :
8964  $as_echo_n "(cached) " >&6
8965else
8966  case $LN in
8967  [\\/]* | ?:[\\/]*)
8968  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8969  ;;
8970  *)
8971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8972for as_dir in $PATH
8973do
8974  IFS=$as_save_IFS
8975  test -z "$as_dir" && as_dir=.
8976    for ac_exec_ext in '' $ac_executable_extensions; do
8977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8978    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8980    break 2
8981  fi
8982done
8983  done
8984IFS=$as_save_IFS
8985
8986  ;;
8987esac
8988fi
8989LN=$ac_cv_path_LN
8990if test -n "$LN"; then
8991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8992$as_echo "$LN" >&6; }
8993else
8994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8995$as_echo "no" >&6; }
8996fi
8997
8998
8999          if test "x$LN" = x; then
9000            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9001          fi
9002        else
9003          # Otherwise we believe it is a complete path. Use it as it is.
9004          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9005$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9006          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9007$as_echo_n "checking for LN... " >&6; }
9008          if test ! -x "$tool_specified"; then
9009            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9010$as_echo "not found" >&6; }
9011            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9012          fi
9013          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9014$as_echo "$tool_specified" >&6; }
9015        fi
9016      fi
9017    fi
9018
9019  fi
9020
9021
9022
9023  if test "x$LN" = x; then
9024    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9025  fi
9026
9027
9028
9029
9030
9031  # Publish this variable in the help.
9032
9033
9034  if [ -z "${LS+x}" ]; then
9035    # The variable is not set by user, try to locate tool using the code snippet
9036    for ac_prog in ls
9037do
9038  # Extract the first word of "$ac_prog", so it can be a program name with args.
9039set dummy $ac_prog; ac_word=$2
9040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9041$as_echo_n "checking for $ac_word... " >&6; }
9042if ${ac_cv_path_LS+:} false; then :
9043  $as_echo_n "(cached) " >&6
9044else
9045  case $LS in
9046  [\\/]* | ?:[\\/]*)
9047  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9048  ;;
9049  *)
9050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9051for as_dir in $PATH
9052do
9053  IFS=$as_save_IFS
9054  test -z "$as_dir" && as_dir=.
9055    for ac_exec_ext in '' $ac_executable_extensions; do
9056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9057    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9059    break 2
9060  fi
9061done
9062  done
9063IFS=$as_save_IFS
9064
9065  ;;
9066esac
9067fi
9068LS=$ac_cv_path_LS
9069if test -n "$LS"; then
9070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9071$as_echo "$LS" >&6; }
9072else
9073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9074$as_echo "no" >&6; }
9075fi
9076
9077
9078  test -n "$LS" && break
9079done
9080
9081  else
9082    # The variable is set, but is it from the command line or the environment?
9083
9084    # Try to remove the string !LS! from our list.
9085    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9086    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9087      # If it failed, the variable was not from the command line. Ignore it,
9088      # but warn the user (except for BASH, which is always set by the calling BASH).
9089      if test "xLS" != xBASH; then
9090        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9091$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9092      fi
9093      # Try to locate tool using the code snippet
9094      for ac_prog in ls
9095do
9096  # Extract the first word of "$ac_prog", so it can be a program name with args.
9097set dummy $ac_prog; ac_word=$2
9098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9099$as_echo_n "checking for $ac_word... " >&6; }
9100if ${ac_cv_path_LS+:} false; then :
9101  $as_echo_n "(cached) " >&6
9102else
9103  case $LS in
9104  [\\/]* | ?:[\\/]*)
9105  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9106  ;;
9107  *)
9108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9109for as_dir in $PATH
9110do
9111  IFS=$as_save_IFS
9112  test -z "$as_dir" && as_dir=.
9113    for ac_exec_ext in '' $ac_executable_extensions; do
9114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9115    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9117    break 2
9118  fi
9119done
9120  done
9121IFS=$as_save_IFS
9122
9123  ;;
9124esac
9125fi
9126LS=$ac_cv_path_LS
9127if test -n "$LS"; then
9128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9129$as_echo "$LS" >&6; }
9130else
9131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9132$as_echo "no" >&6; }
9133fi
9134
9135
9136  test -n "$LS" && break
9137done
9138
9139    else
9140      # If it succeeded, then it was overridden by the user. We will use it
9141      # for the tool.
9142
9143      # First remove it from the list of overridden variables, so we can test
9144      # for unknown variables in the end.
9145      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9146
9147      # Check if we try to supply an empty value
9148      if test "x$LS" = x; then
9149        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9150$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9151        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9152$as_echo_n "checking for LS... " >&6; }
9153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9154$as_echo "disabled" >&6; }
9155      else
9156        # Check if the provided tool contains a complete path.
9157        tool_specified="$LS"
9158        tool_basename="${tool_specified##*/}"
9159        if test "x$tool_basename" = "x$tool_specified"; then
9160          # A command without a complete path is provided, search $PATH.
9161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9162$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9163          # Extract the first word of "$tool_basename", so it can be a program name with args.
9164set dummy $tool_basename; ac_word=$2
9165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9166$as_echo_n "checking for $ac_word... " >&6; }
9167if ${ac_cv_path_LS+:} false; then :
9168  $as_echo_n "(cached) " >&6
9169else
9170  case $LS in
9171  [\\/]* | ?:[\\/]*)
9172  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9173  ;;
9174  *)
9175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9176for as_dir in $PATH
9177do
9178  IFS=$as_save_IFS
9179  test -z "$as_dir" && as_dir=.
9180    for ac_exec_ext in '' $ac_executable_extensions; do
9181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9182    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9184    break 2
9185  fi
9186done
9187  done
9188IFS=$as_save_IFS
9189
9190  ;;
9191esac
9192fi
9193LS=$ac_cv_path_LS
9194if test -n "$LS"; then
9195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9196$as_echo "$LS" >&6; }
9197else
9198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9199$as_echo "no" >&6; }
9200fi
9201
9202
9203          if test "x$LS" = x; then
9204            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9205          fi
9206        else
9207          # Otherwise we believe it is a complete path. Use it as it is.
9208          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9209$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9210          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9211$as_echo_n "checking for LS... " >&6; }
9212          if test ! -x "$tool_specified"; then
9213            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9214$as_echo "not found" >&6; }
9215            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9216          fi
9217          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9218$as_echo "$tool_specified" >&6; }
9219        fi
9220      fi
9221    fi
9222
9223  fi
9224
9225
9226
9227  if test "x$LS" = x; then
9228    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9229  fi
9230
9231
9232
9233
9234
9235  # Publish this variable in the help.
9236
9237
9238  if [ -z "${MKDIR+x}" ]; then
9239    # The variable is not set by user, try to locate tool using the code snippet
9240    for ac_prog in mkdir
9241do
9242  # Extract the first word of "$ac_prog", so it can be a program name with args.
9243set dummy $ac_prog; ac_word=$2
9244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9245$as_echo_n "checking for $ac_word... " >&6; }
9246if ${ac_cv_path_MKDIR+:} false; then :
9247  $as_echo_n "(cached) " >&6
9248else
9249  case $MKDIR in
9250  [\\/]* | ?:[\\/]*)
9251  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9252  ;;
9253  *)
9254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9255for as_dir in $PATH
9256do
9257  IFS=$as_save_IFS
9258  test -z "$as_dir" && as_dir=.
9259    for ac_exec_ext in '' $ac_executable_extensions; do
9260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9261    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9263    break 2
9264  fi
9265done
9266  done
9267IFS=$as_save_IFS
9268
9269  ;;
9270esac
9271fi
9272MKDIR=$ac_cv_path_MKDIR
9273if test -n "$MKDIR"; then
9274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9275$as_echo "$MKDIR" >&6; }
9276else
9277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9278$as_echo "no" >&6; }
9279fi
9280
9281
9282  test -n "$MKDIR" && break
9283done
9284
9285  else
9286    # The variable is set, but is it from the command line or the environment?
9287
9288    # Try to remove the string !MKDIR! from our list.
9289    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9290    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9291      # If it failed, the variable was not from the command line. Ignore it,
9292      # but warn the user (except for BASH, which is always set by the calling BASH).
9293      if test "xMKDIR" != xBASH; then
9294        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9295$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9296      fi
9297      # Try to locate tool using the code snippet
9298      for ac_prog in mkdir
9299do
9300  # Extract the first word of "$ac_prog", so it can be a program name with args.
9301set dummy $ac_prog; ac_word=$2
9302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9303$as_echo_n "checking for $ac_word... " >&6; }
9304if ${ac_cv_path_MKDIR+:} false; then :
9305  $as_echo_n "(cached) " >&6
9306else
9307  case $MKDIR in
9308  [\\/]* | ?:[\\/]*)
9309  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9310  ;;
9311  *)
9312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9313for as_dir in $PATH
9314do
9315  IFS=$as_save_IFS
9316  test -z "$as_dir" && as_dir=.
9317    for ac_exec_ext in '' $ac_executable_extensions; do
9318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9319    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9321    break 2
9322  fi
9323done
9324  done
9325IFS=$as_save_IFS
9326
9327  ;;
9328esac
9329fi
9330MKDIR=$ac_cv_path_MKDIR
9331if test -n "$MKDIR"; then
9332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9333$as_echo "$MKDIR" >&6; }
9334else
9335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9336$as_echo "no" >&6; }
9337fi
9338
9339
9340  test -n "$MKDIR" && break
9341done
9342
9343    else
9344      # If it succeeded, then it was overridden by the user. We will use it
9345      # for the tool.
9346
9347      # First remove it from the list of overridden variables, so we can test
9348      # for unknown variables in the end.
9349      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9350
9351      # Check if we try to supply an empty value
9352      if test "x$MKDIR" = x; then
9353        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9354$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9355        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9356$as_echo_n "checking for MKDIR... " >&6; }
9357        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9358$as_echo "disabled" >&6; }
9359      else
9360        # Check if the provided tool contains a complete path.
9361        tool_specified="$MKDIR"
9362        tool_basename="${tool_specified##*/}"
9363        if test "x$tool_basename" = "x$tool_specified"; then
9364          # A command without a complete path is provided, search $PATH.
9365          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9366$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9367          # Extract the first word of "$tool_basename", so it can be a program name with args.
9368set dummy $tool_basename; ac_word=$2
9369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9370$as_echo_n "checking for $ac_word... " >&6; }
9371if ${ac_cv_path_MKDIR+:} false; then :
9372  $as_echo_n "(cached) " >&6
9373else
9374  case $MKDIR in
9375  [\\/]* | ?:[\\/]*)
9376  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9377  ;;
9378  *)
9379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9380for as_dir in $PATH
9381do
9382  IFS=$as_save_IFS
9383  test -z "$as_dir" && as_dir=.
9384    for ac_exec_ext in '' $ac_executable_extensions; do
9385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9386    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9388    break 2
9389  fi
9390done
9391  done
9392IFS=$as_save_IFS
9393
9394  ;;
9395esac
9396fi
9397MKDIR=$ac_cv_path_MKDIR
9398if test -n "$MKDIR"; then
9399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9400$as_echo "$MKDIR" >&6; }
9401else
9402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9403$as_echo "no" >&6; }
9404fi
9405
9406
9407          if test "x$MKDIR" = x; then
9408            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9409          fi
9410        else
9411          # Otherwise we believe it is a complete path. Use it as it is.
9412          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9413$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9414          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9415$as_echo_n "checking for MKDIR... " >&6; }
9416          if test ! -x "$tool_specified"; then
9417            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9418$as_echo "not found" >&6; }
9419            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9420          fi
9421          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9422$as_echo "$tool_specified" >&6; }
9423        fi
9424      fi
9425    fi
9426
9427  fi
9428
9429
9430
9431  if test "x$MKDIR" = x; then
9432    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9433  fi
9434
9435
9436
9437
9438
9439  # Publish this variable in the help.
9440
9441
9442  if [ -z "${MKTEMP+x}" ]; then
9443    # The variable is not set by user, try to locate tool using the code snippet
9444    for ac_prog in mktemp
9445do
9446  # Extract the first word of "$ac_prog", so it can be a program name with args.
9447set dummy $ac_prog; ac_word=$2
9448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9449$as_echo_n "checking for $ac_word... " >&6; }
9450if ${ac_cv_path_MKTEMP+:} false; then :
9451  $as_echo_n "(cached) " >&6
9452else
9453  case $MKTEMP in
9454  [\\/]* | ?:[\\/]*)
9455  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9456  ;;
9457  *)
9458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9459for as_dir in $PATH
9460do
9461  IFS=$as_save_IFS
9462  test -z "$as_dir" && as_dir=.
9463    for ac_exec_ext in '' $ac_executable_extensions; do
9464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9465    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9467    break 2
9468  fi
9469done
9470  done
9471IFS=$as_save_IFS
9472
9473  ;;
9474esac
9475fi
9476MKTEMP=$ac_cv_path_MKTEMP
9477if test -n "$MKTEMP"; then
9478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9479$as_echo "$MKTEMP" >&6; }
9480else
9481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9482$as_echo "no" >&6; }
9483fi
9484
9485
9486  test -n "$MKTEMP" && break
9487done
9488
9489  else
9490    # The variable is set, but is it from the command line or the environment?
9491
9492    # Try to remove the string !MKTEMP! from our list.
9493    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9494    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9495      # If it failed, the variable was not from the command line. Ignore it,
9496      # but warn the user (except for BASH, which is always set by the calling BASH).
9497      if test "xMKTEMP" != xBASH; then
9498        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9499$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9500      fi
9501      # Try to locate tool using the code snippet
9502      for ac_prog in mktemp
9503do
9504  # Extract the first word of "$ac_prog", so it can be a program name with args.
9505set dummy $ac_prog; ac_word=$2
9506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9507$as_echo_n "checking for $ac_word... " >&6; }
9508if ${ac_cv_path_MKTEMP+:} false; then :
9509  $as_echo_n "(cached) " >&6
9510else
9511  case $MKTEMP in
9512  [\\/]* | ?:[\\/]*)
9513  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9514  ;;
9515  *)
9516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9517for as_dir in $PATH
9518do
9519  IFS=$as_save_IFS
9520  test -z "$as_dir" && as_dir=.
9521    for ac_exec_ext in '' $ac_executable_extensions; do
9522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9523    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9525    break 2
9526  fi
9527done
9528  done
9529IFS=$as_save_IFS
9530
9531  ;;
9532esac
9533fi
9534MKTEMP=$ac_cv_path_MKTEMP
9535if test -n "$MKTEMP"; then
9536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9537$as_echo "$MKTEMP" >&6; }
9538else
9539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9540$as_echo "no" >&6; }
9541fi
9542
9543
9544  test -n "$MKTEMP" && break
9545done
9546
9547    else
9548      # If it succeeded, then it was overridden by the user. We will use it
9549      # for the tool.
9550
9551      # First remove it from the list of overridden variables, so we can test
9552      # for unknown variables in the end.
9553      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9554
9555      # Check if we try to supply an empty value
9556      if test "x$MKTEMP" = x; then
9557        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9558$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9559        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9560$as_echo_n "checking for MKTEMP... " >&6; }
9561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9562$as_echo "disabled" >&6; }
9563      else
9564        # Check if the provided tool contains a complete path.
9565        tool_specified="$MKTEMP"
9566        tool_basename="${tool_specified##*/}"
9567        if test "x$tool_basename" = "x$tool_specified"; then
9568          # A command without a complete path is provided, search $PATH.
9569          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9570$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9571          # Extract the first word of "$tool_basename", so it can be a program name with args.
9572set dummy $tool_basename; ac_word=$2
9573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9574$as_echo_n "checking for $ac_word... " >&6; }
9575if ${ac_cv_path_MKTEMP+:} false; then :
9576  $as_echo_n "(cached) " >&6
9577else
9578  case $MKTEMP in
9579  [\\/]* | ?:[\\/]*)
9580  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9581  ;;
9582  *)
9583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9584for as_dir in $PATH
9585do
9586  IFS=$as_save_IFS
9587  test -z "$as_dir" && as_dir=.
9588    for ac_exec_ext in '' $ac_executable_extensions; do
9589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9590    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9592    break 2
9593  fi
9594done
9595  done
9596IFS=$as_save_IFS
9597
9598  ;;
9599esac
9600fi
9601MKTEMP=$ac_cv_path_MKTEMP
9602if test -n "$MKTEMP"; then
9603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9604$as_echo "$MKTEMP" >&6; }
9605else
9606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9607$as_echo "no" >&6; }
9608fi
9609
9610
9611          if test "x$MKTEMP" = x; then
9612            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9613          fi
9614        else
9615          # Otherwise we believe it is a complete path. Use it as it is.
9616          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9617$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9618          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9619$as_echo_n "checking for MKTEMP... " >&6; }
9620          if test ! -x "$tool_specified"; then
9621            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9622$as_echo "not found" >&6; }
9623            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9624          fi
9625          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9626$as_echo "$tool_specified" >&6; }
9627        fi
9628      fi
9629    fi
9630
9631  fi
9632
9633
9634
9635  if test "x$MKTEMP" = x; then
9636    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9637  fi
9638
9639
9640
9641
9642
9643  # Publish this variable in the help.
9644
9645
9646  if [ -z "${MV+x}" ]; then
9647    # The variable is not set by user, try to locate tool using the code snippet
9648    for ac_prog in mv
9649do
9650  # Extract the first word of "$ac_prog", so it can be a program name with args.
9651set dummy $ac_prog; ac_word=$2
9652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9653$as_echo_n "checking for $ac_word... " >&6; }
9654if ${ac_cv_path_MV+:} false; then :
9655  $as_echo_n "(cached) " >&6
9656else
9657  case $MV in
9658  [\\/]* | ?:[\\/]*)
9659  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9660  ;;
9661  *)
9662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9663for as_dir in $PATH
9664do
9665  IFS=$as_save_IFS
9666  test -z "$as_dir" && as_dir=.
9667    for ac_exec_ext in '' $ac_executable_extensions; do
9668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9669    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9671    break 2
9672  fi
9673done
9674  done
9675IFS=$as_save_IFS
9676
9677  ;;
9678esac
9679fi
9680MV=$ac_cv_path_MV
9681if test -n "$MV"; then
9682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9683$as_echo "$MV" >&6; }
9684else
9685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9686$as_echo "no" >&6; }
9687fi
9688
9689
9690  test -n "$MV" && break
9691done
9692
9693  else
9694    # The variable is set, but is it from the command line or the environment?
9695
9696    # Try to remove the string !MV! from our list.
9697    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9698    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9699      # If it failed, the variable was not from the command line. Ignore it,
9700      # but warn the user (except for BASH, which is always set by the calling BASH).
9701      if test "xMV" != xBASH; then
9702        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9703$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9704      fi
9705      # Try to locate tool using the code snippet
9706      for ac_prog in mv
9707do
9708  # Extract the first word of "$ac_prog", so it can be a program name with args.
9709set dummy $ac_prog; ac_word=$2
9710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9711$as_echo_n "checking for $ac_word... " >&6; }
9712if ${ac_cv_path_MV+:} false; then :
9713  $as_echo_n "(cached) " >&6
9714else
9715  case $MV in
9716  [\\/]* | ?:[\\/]*)
9717  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9718  ;;
9719  *)
9720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9721for as_dir in $PATH
9722do
9723  IFS=$as_save_IFS
9724  test -z "$as_dir" && as_dir=.
9725    for ac_exec_ext in '' $ac_executable_extensions; do
9726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9727    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9729    break 2
9730  fi
9731done
9732  done
9733IFS=$as_save_IFS
9734
9735  ;;
9736esac
9737fi
9738MV=$ac_cv_path_MV
9739if test -n "$MV"; then
9740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9741$as_echo "$MV" >&6; }
9742else
9743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9744$as_echo "no" >&6; }
9745fi
9746
9747
9748  test -n "$MV" && break
9749done
9750
9751    else
9752      # If it succeeded, then it was overridden by the user. We will use it
9753      # for the tool.
9754
9755      # First remove it from the list of overridden variables, so we can test
9756      # for unknown variables in the end.
9757      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9758
9759      # Check if we try to supply an empty value
9760      if test "x$MV" = x; then
9761        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9762$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9763        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9764$as_echo_n "checking for MV... " >&6; }
9765        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9766$as_echo "disabled" >&6; }
9767      else
9768        # Check if the provided tool contains a complete path.
9769        tool_specified="$MV"
9770        tool_basename="${tool_specified##*/}"
9771        if test "x$tool_basename" = "x$tool_specified"; then
9772          # A command without a complete path is provided, search $PATH.
9773          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9774$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9775          # Extract the first word of "$tool_basename", so it can be a program name with args.
9776set dummy $tool_basename; ac_word=$2
9777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9778$as_echo_n "checking for $ac_word... " >&6; }
9779if ${ac_cv_path_MV+:} false; then :
9780  $as_echo_n "(cached) " >&6
9781else
9782  case $MV in
9783  [\\/]* | ?:[\\/]*)
9784  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9785  ;;
9786  *)
9787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9788for as_dir in $PATH
9789do
9790  IFS=$as_save_IFS
9791  test -z "$as_dir" && as_dir=.
9792    for ac_exec_ext in '' $ac_executable_extensions; do
9793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9794    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9796    break 2
9797  fi
9798done
9799  done
9800IFS=$as_save_IFS
9801
9802  ;;
9803esac
9804fi
9805MV=$ac_cv_path_MV
9806if test -n "$MV"; then
9807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9808$as_echo "$MV" >&6; }
9809else
9810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9811$as_echo "no" >&6; }
9812fi
9813
9814
9815          if test "x$MV" = x; then
9816            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9817          fi
9818        else
9819          # Otherwise we believe it is a complete path. Use it as it is.
9820          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9821$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9822          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9823$as_echo_n "checking for MV... " >&6; }
9824          if test ! -x "$tool_specified"; then
9825            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9826$as_echo "not found" >&6; }
9827            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9828          fi
9829          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9830$as_echo "$tool_specified" >&6; }
9831        fi
9832      fi
9833    fi
9834
9835  fi
9836
9837
9838
9839  if test "x$MV" = x; then
9840    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9841  fi
9842
9843
9844
9845
9846
9847  # Publish this variable in the help.
9848
9849
9850  if [ -z "${NAWK+x}" ]; then
9851    # The variable is not set by user, try to locate tool using the code snippet
9852    for ac_prog in nawk gawk awk
9853do
9854  # Extract the first word of "$ac_prog", so it can be a program name with args.
9855set dummy $ac_prog; ac_word=$2
9856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9857$as_echo_n "checking for $ac_word... " >&6; }
9858if ${ac_cv_path_NAWK+:} false; then :
9859  $as_echo_n "(cached) " >&6
9860else
9861  case $NAWK in
9862  [\\/]* | ?:[\\/]*)
9863  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9864  ;;
9865  *)
9866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9867for as_dir in $PATH
9868do
9869  IFS=$as_save_IFS
9870  test -z "$as_dir" && as_dir=.
9871    for ac_exec_ext in '' $ac_executable_extensions; do
9872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9873    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9875    break 2
9876  fi
9877done
9878  done
9879IFS=$as_save_IFS
9880
9881  ;;
9882esac
9883fi
9884NAWK=$ac_cv_path_NAWK
9885if test -n "$NAWK"; then
9886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9887$as_echo "$NAWK" >&6; }
9888else
9889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9890$as_echo "no" >&6; }
9891fi
9892
9893
9894  test -n "$NAWK" && break
9895done
9896
9897  else
9898    # The variable is set, but is it from the command line or the environment?
9899
9900    # Try to remove the string !NAWK! from our list.
9901    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9902    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9903      # If it failed, the variable was not from the command line. Ignore it,
9904      # but warn the user (except for BASH, which is always set by the calling BASH).
9905      if test "xNAWK" != xBASH; then
9906        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9907$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9908      fi
9909      # Try to locate tool using the code snippet
9910      for ac_prog in nawk gawk awk
9911do
9912  # Extract the first word of "$ac_prog", so it can be a program name with args.
9913set dummy $ac_prog; ac_word=$2
9914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9915$as_echo_n "checking for $ac_word... " >&6; }
9916if ${ac_cv_path_NAWK+:} false; then :
9917  $as_echo_n "(cached) " >&6
9918else
9919  case $NAWK in
9920  [\\/]* | ?:[\\/]*)
9921  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9922  ;;
9923  *)
9924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9925for as_dir in $PATH
9926do
9927  IFS=$as_save_IFS
9928  test -z "$as_dir" && as_dir=.
9929    for ac_exec_ext in '' $ac_executable_extensions; do
9930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9931    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9933    break 2
9934  fi
9935done
9936  done
9937IFS=$as_save_IFS
9938
9939  ;;
9940esac
9941fi
9942NAWK=$ac_cv_path_NAWK
9943if test -n "$NAWK"; then
9944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9945$as_echo "$NAWK" >&6; }
9946else
9947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9948$as_echo "no" >&6; }
9949fi
9950
9951
9952  test -n "$NAWK" && break
9953done
9954
9955    else
9956      # If it succeeded, then it was overridden by the user. We will use it
9957      # for the tool.
9958
9959      # First remove it from the list of overridden variables, so we can test
9960      # for unknown variables in the end.
9961      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9962
9963      # Check if we try to supply an empty value
9964      if test "x$NAWK" = x; then
9965        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9966$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9967        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9968$as_echo_n "checking for NAWK... " >&6; }
9969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9970$as_echo "disabled" >&6; }
9971      else
9972        # Check if the provided tool contains a complete path.
9973        tool_specified="$NAWK"
9974        tool_basename="${tool_specified##*/}"
9975        if test "x$tool_basename" = "x$tool_specified"; then
9976          # A command without a complete path is provided, search $PATH.
9977          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9978$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9979          # Extract the first word of "$tool_basename", so it can be a program name with args.
9980set dummy $tool_basename; ac_word=$2
9981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9982$as_echo_n "checking for $ac_word... " >&6; }
9983if ${ac_cv_path_NAWK+:} false; then :
9984  $as_echo_n "(cached) " >&6
9985else
9986  case $NAWK in
9987  [\\/]* | ?:[\\/]*)
9988  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9989  ;;
9990  *)
9991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9992for as_dir in $PATH
9993do
9994  IFS=$as_save_IFS
9995  test -z "$as_dir" && as_dir=.
9996    for ac_exec_ext in '' $ac_executable_extensions; do
9997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9998    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10000    break 2
10001  fi
10002done
10003  done
10004IFS=$as_save_IFS
10005
10006  ;;
10007esac
10008fi
10009NAWK=$ac_cv_path_NAWK
10010if test -n "$NAWK"; then
10011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10012$as_echo "$NAWK" >&6; }
10013else
10014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10015$as_echo "no" >&6; }
10016fi
10017
10018
10019          if test "x$NAWK" = x; then
10020            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10021          fi
10022        else
10023          # Otherwise we believe it is a complete path. Use it as it is.
10024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10025$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10026          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10027$as_echo_n "checking for NAWK... " >&6; }
10028          if test ! -x "$tool_specified"; then
10029            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10030$as_echo "not found" >&6; }
10031            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10032          fi
10033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10034$as_echo "$tool_specified" >&6; }
10035        fi
10036      fi
10037    fi
10038
10039  fi
10040
10041
10042
10043  if test "x$NAWK" = x; then
10044    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10045  fi
10046
10047
10048
10049
10050
10051  # Publish this variable in the help.
10052
10053
10054  if [ -z "${PRINTF+x}" ]; then
10055    # The variable is not set by user, try to locate tool using the code snippet
10056    for ac_prog in printf
10057do
10058  # Extract the first word of "$ac_prog", so it can be a program name with args.
10059set dummy $ac_prog; ac_word=$2
10060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10061$as_echo_n "checking for $ac_word... " >&6; }
10062if ${ac_cv_path_PRINTF+:} false; then :
10063  $as_echo_n "(cached) " >&6
10064else
10065  case $PRINTF in
10066  [\\/]* | ?:[\\/]*)
10067  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10068  ;;
10069  *)
10070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10071for as_dir in $PATH
10072do
10073  IFS=$as_save_IFS
10074  test -z "$as_dir" && as_dir=.
10075    for ac_exec_ext in '' $ac_executable_extensions; do
10076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10077    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10079    break 2
10080  fi
10081done
10082  done
10083IFS=$as_save_IFS
10084
10085  ;;
10086esac
10087fi
10088PRINTF=$ac_cv_path_PRINTF
10089if test -n "$PRINTF"; then
10090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10091$as_echo "$PRINTF" >&6; }
10092else
10093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10094$as_echo "no" >&6; }
10095fi
10096
10097
10098  test -n "$PRINTF" && break
10099done
10100
10101  else
10102    # The variable is set, but is it from the command line or the environment?
10103
10104    # Try to remove the string !PRINTF! from our list.
10105    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10106    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10107      # If it failed, the variable was not from the command line. Ignore it,
10108      # but warn the user (except for BASH, which is always set by the calling BASH).
10109      if test "xPRINTF" != xBASH; then
10110        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10111$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10112      fi
10113      # Try to locate tool using the code snippet
10114      for ac_prog in printf
10115do
10116  # Extract the first word of "$ac_prog", so it can be a program name with args.
10117set dummy $ac_prog; ac_word=$2
10118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10119$as_echo_n "checking for $ac_word... " >&6; }
10120if ${ac_cv_path_PRINTF+:} false; then :
10121  $as_echo_n "(cached) " >&6
10122else
10123  case $PRINTF in
10124  [\\/]* | ?:[\\/]*)
10125  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10126  ;;
10127  *)
10128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10129for as_dir in $PATH
10130do
10131  IFS=$as_save_IFS
10132  test -z "$as_dir" && as_dir=.
10133    for ac_exec_ext in '' $ac_executable_extensions; do
10134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10135    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10137    break 2
10138  fi
10139done
10140  done
10141IFS=$as_save_IFS
10142
10143  ;;
10144esac
10145fi
10146PRINTF=$ac_cv_path_PRINTF
10147if test -n "$PRINTF"; then
10148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10149$as_echo "$PRINTF" >&6; }
10150else
10151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10152$as_echo "no" >&6; }
10153fi
10154
10155
10156  test -n "$PRINTF" && break
10157done
10158
10159    else
10160      # If it succeeded, then it was overridden by the user. We will use it
10161      # for the tool.
10162
10163      # First remove it from the list of overridden variables, so we can test
10164      # for unknown variables in the end.
10165      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10166
10167      # Check if we try to supply an empty value
10168      if test "x$PRINTF" = x; then
10169        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10170$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10171        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10172$as_echo_n "checking for PRINTF... " >&6; }
10173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10174$as_echo "disabled" >&6; }
10175      else
10176        # Check if the provided tool contains a complete path.
10177        tool_specified="$PRINTF"
10178        tool_basename="${tool_specified##*/}"
10179        if test "x$tool_basename" = "x$tool_specified"; then
10180          # A command without a complete path is provided, search $PATH.
10181          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10182$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10183          # Extract the first word of "$tool_basename", so it can be a program name with args.
10184set dummy $tool_basename; ac_word=$2
10185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10186$as_echo_n "checking for $ac_word... " >&6; }
10187if ${ac_cv_path_PRINTF+:} false; then :
10188  $as_echo_n "(cached) " >&6
10189else
10190  case $PRINTF in
10191  [\\/]* | ?:[\\/]*)
10192  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10193  ;;
10194  *)
10195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10196for as_dir in $PATH
10197do
10198  IFS=$as_save_IFS
10199  test -z "$as_dir" && as_dir=.
10200    for ac_exec_ext in '' $ac_executable_extensions; do
10201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10202    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10204    break 2
10205  fi
10206done
10207  done
10208IFS=$as_save_IFS
10209
10210  ;;
10211esac
10212fi
10213PRINTF=$ac_cv_path_PRINTF
10214if test -n "$PRINTF"; then
10215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10216$as_echo "$PRINTF" >&6; }
10217else
10218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10219$as_echo "no" >&6; }
10220fi
10221
10222
10223          if test "x$PRINTF" = x; then
10224            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10225          fi
10226        else
10227          # Otherwise we believe it is a complete path. Use it as it is.
10228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10229$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10230          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10231$as_echo_n "checking for PRINTF... " >&6; }
10232          if test ! -x "$tool_specified"; then
10233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10234$as_echo "not found" >&6; }
10235            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10236          fi
10237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10238$as_echo "$tool_specified" >&6; }
10239        fi
10240      fi
10241    fi
10242
10243  fi
10244
10245
10246
10247  if test "x$PRINTF" = x; then
10248    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10249  fi
10250
10251
10252
10253
10254
10255  # Publish this variable in the help.
10256
10257
10258  if [ -z "${RM+x}" ]; then
10259    # The variable is not set by user, try to locate tool using the code snippet
10260    for ac_prog in rm
10261do
10262  # Extract the first word of "$ac_prog", so it can be a program name with args.
10263set dummy $ac_prog; ac_word=$2
10264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10265$as_echo_n "checking for $ac_word... " >&6; }
10266if ${ac_cv_path_RM+:} false; then :
10267  $as_echo_n "(cached) " >&6
10268else
10269  case $RM in
10270  [\\/]* | ?:[\\/]*)
10271  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10272  ;;
10273  *)
10274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10275for as_dir in $PATH
10276do
10277  IFS=$as_save_IFS
10278  test -z "$as_dir" && as_dir=.
10279    for ac_exec_ext in '' $ac_executable_extensions; do
10280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10281    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10283    break 2
10284  fi
10285done
10286  done
10287IFS=$as_save_IFS
10288
10289  ;;
10290esac
10291fi
10292RM=$ac_cv_path_RM
10293if test -n "$RM"; then
10294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10295$as_echo "$RM" >&6; }
10296else
10297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10298$as_echo "no" >&6; }
10299fi
10300
10301
10302  test -n "$RM" && break
10303done
10304
10305  else
10306    # The variable is set, but is it from the command line or the environment?
10307
10308    # Try to remove the string !RM! from our list.
10309    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10310    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10311      # If it failed, the variable was not from the command line. Ignore it,
10312      # but warn the user (except for BASH, which is always set by the calling BASH).
10313      if test "xRM" != xBASH; then
10314        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10315$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10316      fi
10317      # Try to locate tool using the code snippet
10318      for ac_prog in rm
10319do
10320  # Extract the first word of "$ac_prog", so it can be a program name with args.
10321set dummy $ac_prog; ac_word=$2
10322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10323$as_echo_n "checking for $ac_word... " >&6; }
10324if ${ac_cv_path_RM+:} false; then :
10325  $as_echo_n "(cached) " >&6
10326else
10327  case $RM in
10328  [\\/]* | ?:[\\/]*)
10329  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10330  ;;
10331  *)
10332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10333for as_dir in $PATH
10334do
10335  IFS=$as_save_IFS
10336  test -z "$as_dir" && as_dir=.
10337    for ac_exec_ext in '' $ac_executable_extensions; do
10338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10339    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10341    break 2
10342  fi
10343done
10344  done
10345IFS=$as_save_IFS
10346
10347  ;;
10348esac
10349fi
10350RM=$ac_cv_path_RM
10351if test -n "$RM"; then
10352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10353$as_echo "$RM" >&6; }
10354else
10355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10356$as_echo "no" >&6; }
10357fi
10358
10359
10360  test -n "$RM" && break
10361done
10362
10363    else
10364      # If it succeeded, then it was overridden by the user. We will use it
10365      # for the tool.
10366
10367      # First remove it from the list of overridden variables, so we can test
10368      # for unknown variables in the end.
10369      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10370
10371      # Check if we try to supply an empty value
10372      if test "x$RM" = x; then
10373        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10374$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10376$as_echo_n "checking for RM... " >&6; }
10377        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10378$as_echo "disabled" >&6; }
10379      else
10380        # Check if the provided tool contains a complete path.
10381        tool_specified="$RM"
10382        tool_basename="${tool_specified##*/}"
10383        if test "x$tool_basename" = "x$tool_specified"; then
10384          # A command without a complete path is provided, search $PATH.
10385          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10386$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10387          # Extract the first word of "$tool_basename", so it can be a program name with args.
10388set dummy $tool_basename; ac_word=$2
10389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10390$as_echo_n "checking for $ac_word... " >&6; }
10391if ${ac_cv_path_RM+:} false; then :
10392  $as_echo_n "(cached) " >&6
10393else
10394  case $RM in
10395  [\\/]* | ?:[\\/]*)
10396  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10397  ;;
10398  *)
10399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10400for as_dir in $PATH
10401do
10402  IFS=$as_save_IFS
10403  test -z "$as_dir" && as_dir=.
10404    for ac_exec_ext in '' $ac_executable_extensions; do
10405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10406    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10408    break 2
10409  fi
10410done
10411  done
10412IFS=$as_save_IFS
10413
10414  ;;
10415esac
10416fi
10417RM=$ac_cv_path_RM
10418if test -n "$RM"; then
10419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10420$as_echo "$RM" >&6; }
10421else
10422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10423$as_echo "no" >&6; }
10424fi
10425
10426
10427          if test "x$RM" = x; then
10428            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10429          fi
10430        else
10431          # Otherwise we believe it is a complete path. Use it as it is.
10432          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10433$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10434          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10435$as_echo_n "checking for RM... " >&6; }
10436          if test ! -x "$tool_specified"; then
10437            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10438$as_echo "not found" >&6; }
10439            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10440          fi
10441          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10442$as_echo "$tool_specified" >&6; }
10443        fi
10444      fi
10445    fi
10446
10447  fi
10448
10449
10450
10451  if test "x$RM" = x; then
10452    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10453  fi
10454
10455
10456
10457
10458
10459  # Publish this variable in the help.
10460
10461
10462  if [ -z "${RMDIR+x}" ]; then
10463    # The variable is not set by user, try to locate tool using the code snippet
10464    for ac_prog in rmdir
10465do
10466  # Extract the first word of "$ac_prog", so it can be a program name with args.
10467set dummy $ac_prog; ac_word=$2
10468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10469$as_echo_n "checking for $ac_word... " >&6; }
10470if ${ac_cv_path_RMDIR+:} false; then :
10471  $as_echo_n "(cached) " >&6
10472else
10473  case $RMDIR in
10474  [\\/]* | ?:[\\/]*)
10475  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10476  ;;
10477  *)
10478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10479for as_dir in $PATH
10480do
10481  IFS=$as_save_IFS
10482  test -z "$as_dir" && as_dir=.
10483    for ac_exec_ext in '' $ac_executable_extensions; do
10484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10485    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10487    break 2
10488  fi
10489done
10490  done
10491IFS=$as_save_IFS
10492
10493  ;;
10494esac
10495fi
10496RMDIR=$ac_cv_path_RMDIR
10497if test -n "$RMDIR"; then
10498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10499$as_echo "$RMDIR" >&6; }
10500else
10501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10502$as_echo "no" >&6; }
10503fi
10504
10505
10506  test -n "$RMDIR" && break
10507done
10508
10509  else
10510    # The variable is set, but is it from the command line or the environment?
10511
10512    # Try to remove the string !RMDIR! from our list.
10513    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10514    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10515      # If it failed, the variable was not from the command line. Ignore it,
10516      # but warn the user (except for BASH, which is always set by the calling BASH).
10517      if test "xRMDIR" != xBASH; then
10518        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10519$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10520      fi
10521      # Try to locate tool using the code snippet
10522      for ac_prog in rmdir
10523do
10524  # Extract the first word of "$ac_prog", so it can be a program name with args.
10525set dummy $ac_prog; ac_word=$2
10526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10527$as_echo_n "checking for $ac_word... " >&6; }
10528if ${ac_cv_path_RMDIR+:} false; then :
10529  $as_echo_n "(cached) " >&6
10530else
10531  case $RMDIR in
10532  [\\/]* | ?:[\\/]*)
10533  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10534  ;;
10535  *)
10536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10537for as_dir in $PATH
10538do
10539  IFS=$as_save_IFS
10540  test -z "$as_dir" && as_dir=.
10541    for ac_exec_ext in '' $ac_executable_extensions; do
10542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10543    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10545    break 2
10546  fi
10547done
10548  done
10549IFS=$as_save_IFS
10550
10551  ;;
10552esac
10553fi
10554RMDIR=$ac_cv_path_RMDIR
10555if test -n "$RMDIR"; then
10556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10557$as_echo "$RMDIR" >&6; }
10558else
10559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10560$as_echo "no" >&6; }
10561fi
10562
10563
10564  test -n "$RMDIR" && break
10565done
10566
10567    else
10568      # If it succeeded, then it was overridden by the user. We will use it
10569      # for the tool.
10570
10571      # First remove it from the list of overridden variables, so we can test
10572      # for unknown variables in the end.
10573      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10574
10575      # Check if we try to supply an empty value
10576      if test "x$RMDIR" = x; then
10577        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10578$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10579        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10580$as_echo_n "checking for RMDIR... " >&6; }
10581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10582$as_echo "disabled" >&6; }
10583      else
10584        # Check if the provided tool contains a complete path.
10585        tool_specified="$RMDIR"
10586        tool_basename="${tool_specified##*/}"
10587        if test "x$tool_basename" = "x$tool_specified"; then
10588          # A command without a complete path is provided, search $PATH.
10589          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10590$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10591          # Extract the first word of "$tool_basename", so it can be a program name with args.
10592set dummy $tool_basename; ac_word=$2
10593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10594$as_echo_n "checking for $ac_word... " >&6; }
10595if ${ac_cv_path_RMDIR+:} false; then :
10596  $as_echo_n "(cached) " >&6
10597else
10598  case $RMDIR in
10599  [\\/]* | ?:[\\/]*)
10600  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10601  ;;
10602  *)
10603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10604for as_dir in $PATH
10605do
10606  IFS=$as_save_IFS
10607  test -z "$as_dir" && as_dir=.
10608    for ac_exec_ext in '' $ac_executable_extensions; do
10609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10610    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10612    break 2
10613  fi
10614done
10615  done
10616IFS=$as_save_IFS
10617
10618  ;;
10619esac
10620fi
10621RMDIR=$ac_cv_path_RMDIR
10622if test -n "$RMDIR"; then
10623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10624$as_echo "$RMDIR" >&6; }
10625else
10626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10627$as_echo "no" >&6; }
10628fi
10629
10630
10631          if test "x$RMDIR" = x; then
10632            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10633          fi
10634        else
10635          # Otherwise we believe it is a complete path. Use it as it is.
10636          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10637$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10638          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10639$as_echo_n "checking for RMDIR... " >&6; }
10640          if test ! -x "$tool_specified"; then
10641            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10642$as_echo "not found" >&6; }
10643            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10644          fi
10645          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10646$as_echo "$tool_specified" >&6; }
10647        fi
10648      fi
10649    fi
10650
10651  fi
10652
10653
10654
10655  if test "x$RMDIR" = x; then
10656    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10657  fi
10658
10659
10660
10661
10662
10663  # Publish this variable in the help.
10664
10665
10666  if [ -z "${SH+x}" ]; then
10667    # The variable is not set by user, try to locate tool using the code snippet
10668    for ac_prog in sh
10669do
10670  # Extract the first word of "$ac_prog", so it can be a program name with args.
10671set dummy $ac_prog; ac_word=$2
10672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10673$as_echo_n "checking for $ac_word... " >&6; }
10674if ${ac_cv_path_SH+:} false; then :
10675  $as_echo_n "(cached) " >&6
10676else
10677  case $SH in
10678  [\\/]* | ?:[\\/]*)
10679  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10680  ;;
10681  *)
10682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10683for as_dir in $PATH
10684do
10685  IFS=$as_save_IFS
10686  test -z "$as_dir" && as_dir=.
10687    for ac_exec_ext in '' $ac_executable_extensions; do
10688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10689    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10691    break 2
10692  fi
10693done
10694  done
10695IFS=$as_save_IFS
10696
10697  ;;
10698esac
10699fi
10700SH=$ac_cv_path_SH
10701if test -n "$SH"; then
10702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10703$as_echo "$SH" >&6; }
10704else
10705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10706$as_echo "no" >&6; }
10707fi
10708
10709
10710  test -n "$SH" && break
10711done
10712
10713  else
10714    # The variable is set, but is it from the command line or the environment?
10715
10716    # Try to remove the string !SH! from our list.
10717    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10718    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10719      # If it failed, the variable was not from the command line. Ignore it,
10720      # but warn the user (except for BASH, which is always set by the calling BASH).
10721      if test "xSH" != xBASH; then
10722        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10723$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10724      fi
10725      # Try to locate tool using the code snippet
10726      for ac_prog in sh
10727do
10728  # Extract the first word of "$ac_prog", so it can be a program name with args.
10729set dummy $ac_prog; ac_word=$2
10730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10731$as_echo_n "checking for $ac_word... " >&6; }
10732if ${ac_cv_path_SH+:} false; then :
10733  $as_echo_n "(cached) " >&6
10734else
10735  case $SH in
10736  [\\/]* | ?:[\\/]*)
10737  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10738  ;;
10739  *)
10740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10741for as_dir in $PATH
10742do
10743  IFS=$as_save_IFS
10744  test -z "$as_dir" && as_dir=.
10745    for ac_exec_ext in '' $ac_executable_extensions; do
10746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10747    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10749    break 2
10750  fi
10751done
10752  done
10753IFS=$as_save_IFS
10754
10755  ;;
10756esac
10757fi
10758SH=$ac_cv_path_SH
10759if test -n "$SH"; then
10760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10761$as_echo "$SH" >&6; }
10762else
10763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10764$as_echo "no" >&6; }
10765fi
10766
10767
10768  test -n "$SH" && break
10769done
10770
10771    else
10772      # If it succeeded, then it was overridden by the user. We will use it
10773      # for the tool.
10774
10775      # First remove it from the list of overridden variables, so we can test
10776      # for unknown variables in the end.
10777      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10778
10779      # Check if we try to supply an empty value
10780      if test "x$SH" = x; then
10781        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10782$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10783        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10784$as_echo_n "checking for SH... " >&6; }
10785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10786$as_echo "disabled" >&6; }
10787      else
10788        # Check if the provided tool contains a complete path.
10789        tool_specified="$SH"
10790        tool_basename="${tool_specified##*/}"
10791        if test "x$tool_basename" = "x$tool_specified"; then
10792          # A command without a complete path is provided, search $PATH.
10793          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10794$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10795          # Extract the first word of "$tool_basename", so it can be a program name with args.
10796set dummy $tool_basename; ac_word=$2
10797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10798$as_echo_n "checking for $ac_word... " >&6; }
10799if ${ac_cv_path_SH+:} false; then :
10800  $as_echo_n "(cached) " >&6
10801else
10802  case $SH in
10803  [\\/]* | ?:[\\/]*)
10804  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10805  ;;
10806  *)
10807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10808for as_dir in $PATH
10809do
10810  IFS=$as_save_IFS
10811  test -z "$as_dir" && as_dir=.
10812    for ac_exec_ext in '' $ac_executable_extensions; do
10813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10814    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10816    break 2
10817  fi
10818done
10819  done
10820IFS=$as_save_IFS
10821
10822  ;;
10823esac
10824fi
10825SH=$ac_cv_path_SH
10826if test -n "$SH"; then
10827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10828$as_echo "$SH" >&6; }
10829else
10830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10831$as_echo "no" >&6; }
10832fi
10833
10834
10835          if test "x$SH" = x; then
10836            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10837          fi
10838        else
10839          # Otherwise we believe it is a complete path. Use it as it is.
10840          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10841$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10842          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10843$as_echo_n "checking for SH... " >&6; }
10844          if test ! -x "$tool_specified"; then
10845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10846$as_echo "not found" >&6; }
10847            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10848          fi
10849          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10850$as_echo "$tool_specified" >&6; }
10851        fi
10852      fi
10853    fi
10854
10855  fi
10856
10857
10858
10859  if test "x$SH" = x; then
10860    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10861  fi
10862
10863
10864
10865
10866
10867  # Publish this variable in the help.
10868
10869
10870  if [ -z "${SORT+x}" ]; then
10871    # The variable is not set by user, try to locate tool using the code snippet
10872    for ac_prog in sort
10873do
10874  # Extract the first word of "$ac_prog", so it can be a program name with args.
10875set dummy $ac_prog; ac_word=$2
10876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10877$as_echo_n "checking for $ac_word... " >&6; }
10878if ${ac_cv_path_SORT+:} false; then :
10879  $as_echo_n "(cached) " >&6
10880else
10881  case $SORT in
10882  [\\/]* | ?:[\\/]*)
10883  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10884  ;;
10885  *)
10886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10887for as_dir in $PATH
10888do
10889  IFS=$as_save_IFS
10890  test -z "$as_dir" && as_dir=.
10891    for ac_exec_ext in '' $ac_executable_extensions; do
10892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10893    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10895    break 2
10896  fi
10897done
10898  done
10899IFS=$as_save_IFS
10900
10901  ;;
10902esac
10903fi
10904SORT=$ac_cv_path_SORT
10905if test -n "$SORT"; then
10906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10907$as_echo "$SORT" >&6; }
10908else
10909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10910$as_echo "no" >&6; }
10911fi
10912
10913
10914  test -n "$SORT" && break
10915done
10916
10917  else
10918    # The variable is set, but is it from the command line or the environment?
10919
10920    # Try to remove the string !SORT! from our list.
10921    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10922    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10923      # If it failed, the variable was not from the command line. Ignore it,
10924      # but warn the user (except for BASH, which is always set by the calling BASH).
10925      if test "xSORT" != xBASH; then
10926        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10927$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10928      fi
10929      # Try to locate tool using the code snippet
10930      for ac_prog in sort
10931do
10932  # Extract the first word of "$ac_prog", so it can be a program name with args.
10933set dummy $ac_prog; ac_word=$2
10934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10935$as_echo_n "checking for $ac_word... " >&6; }
10936if ${ac_cv_path_SORT+:} false; then :
10937  $as_echo_n "(cached) " >&6
10938else
10939  case $SORT in
10940  [\\/]* | ?:[\\/]*)
10941  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10942  ;;
10943  *)
10944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10945for as_dir in $PATH
10946do
10947  IFS=$as_save_IFS
10948  test -z "$as_dir" && as_dir=.
10949    for ac_exec_ext in '' $ac_executable_extensions; do
10950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10951    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10953    break 2
10954  fi
10955done
10956  done
10957IFS=$as_save_IFS
10958
10959  ;;
10960esac
10961fi
10962SORT=$ac_cv_path_SORT
10963if test -n "$SORT"; then
10964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10965$as_echo "$SORT" >&6; }
10966else
10967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10968$as_echo "no" >&6; }
10969fi
10970
10971
10972  test -n "$SORT" && break
10973done
10974
10975    else
10976      # If it succeeded, then it was overridden by the user. We will use it
10977      # for the tool.
10978
10979      # First remove it from the list of overridden variables, so we can test
10980      # for unknown variables in the end.
10981      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10982
10983      # Check if we try to supply an empty value
10984      if test "x$SORT" = x; then
10985        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10986$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10987        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10988$as_echo_n "checking for SORT... " >&6; }
10989        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10990$as_echo "disabled" >&6; }
10991      else
10992        # Check if the provided tool contains a complete path.
10993        tool_specified="$SORT"
10994        tool_basename="${tool_specified##*/}"
10995        if test "x$tool_basename" = "x$tool_specified"; then
10996          # A command without a complete path is provided, search $PATH.
10997          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10998$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10999          # Extract the first word of "$tool_basename", so it can be a program name with args.
11000set dummy $tool_basename; ac_word=$2
11001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11002$as_echo_n "checking for $ac_word... " >&6; }
11003if ${ac_cv_path_SORT+:} false; then :
11004  $as_echo_n "(cached) " >&6
11005else
11006  case $SORT in
11007  [\\/]* | ?:[\\/]*)
11008  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11009  ;;
11010  *)
11011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11012for as_dir in $PATH
11013do
11014  IFS=$as_save_IFS
11015  test -z "$as_dir" && as_dir=.
11016    for ac_exec_ext in '' $ac_executable_extensions; do
11017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11018    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11020    break 2
11021  fi
11022done
11023  done
11024IFS=$as_save_IFS
11025
11026  ;;
11027esac
11028fi
11029SORT=$ac_cv_path_SORT
11030if test -n "$SORT"; then
11031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11032$as_echo "$SORT" >&6; }
11033else
11034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11035$as_echo "no" >&6; }
11036fi
11037
11038
11039          if test "x$SORT" = x; then
11040            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11041          fi
11042        else
11043          # Otherwise we believe it is a complete path. Use it as it is.
11044          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11045$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11046          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11047$as_echo_n "checking for SORT... " >&6; }
11048          if test ! -x "$tool_specified"; then
11049            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11050$as_echo "not found" >&6; }
11051            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11052          fi
11053          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11054$as_echo "$tool_specified" >&6; }
11055        fi
11056      fi
11057    fi
11058
11059  fi
11060
11061
11062
11063  if test "x$SORT" = x; then
11064    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11065  fi
11066
11067
11068
11069
11070
11071  # Publish this variable in the help.
11072
11073
11074  if [ -z "${TAIL+x}" ]; then
11075    # The variable is not set by user, try to locate tool using the code snippet
11076    for ac_prog in tail
11077do
11078  # Extract the first word of "$ac_prog", so it can be a program name with args.
11079set dummy $ac_prog; ac_word=$2
11080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11081$as_echo_n "checking for $ac_word... " >&6; }
11082if ${ac_cv_path_TAIL+:} false; then :
11083  $as_echo_n "(cached) " >&6
11084else
11085  case $TAIL in
11086  [\\/]* | ?:[\\/]*)
11087  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11088  ;;
11089  *)
11090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11091for as_dir in $PATH
11092do
11093  IFS=$as_save_IFS
11094  test -z "$as_dir" && as_dir=.
11095    for ac_exec_ext in '' $ac_executable_extensions; do
11096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11097    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11099    break 2
11100  fi
11101done
11102  done
11103IFS=$as_save_IFS
11104
11105  ;;
11106esac
11107fi
11108TAIL=$ac_cv_path_TAIL
11109if test -n "$TAIL"; then
11110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11111$as_echo "$TAIL" >&6; }
11112else
11113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11114$as_echo "no" >&6; }
11115fi
11116
11117
11118  test -n "$TAIL" && break
11119done
11120
11121  else
11122    # The variable is set, but is it from the command line or the environment?
11123
11124    # Try to remove the string !TAIL! from our list.
11125    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11126    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11127      # If it failed, the variable was not from the command line. Ignore it,
11128      # but warn the user (except for BASH, which is always set by the calling BASH).
11129      if test "xTAIL" != xBASH; then
11130        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11131$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11132      fi
11133      # Try to locate tool using the code snippet
11134      for ac_prog in tail
11135do
11136  # Extract the first word of "$ac_prog", so it can be a program name with args.
11137set dummy $ac_prog; ac_word=$2
11138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11139$as_echo_n "checking for $ac_word... " >&6; }
11140if ${ac_cv_path_TAIL+:} false; then :
11141  $as_echo_n "(cached) " >&6
11142else
11143  case $TAIL in
11144  [\\/]* | ?:[\\/]*)
11145  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11146  ;;
11147  *)
11148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11149for as_dir in $PATH
11150do
11151  IFS=$as_save_IFS
11152  test -z "$as_dir" && as_dir=.
11153    for ac_exec_ext in '' $ac_executable_extensions; do
11154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11155    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11157    break 2
11158  fi
11159done
11160  done
11161IFS=$as_save_IFS
11162
11163  ;;
11164esac
11165fi
11166TAIL=$ac_cv_path_TAIL
11167if test -n "$TAIL"; then
11168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11169$as_echo "$TAIL" >&6; }
11170else
11171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11172$as_echo "no" >&6; }
11173fi
11174
11175
11176  test -n "$TAIL" && break
11177done
11178
11179    else
11180      # If it succeeded, then it was overridden by the user. We will use it
11181      # for the tool.
11182
11183      # First remove it from the list of overridden variables, so we can test
11184      # for unknown variables in the end.
11185      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11186
11187      # Check if we try to supply an empty value
11188      if test "x$TAIL" = x; then
11189        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11190$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11191        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11192$as_echo_n "checking for TAIL... " >&6; }
11193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11194$as_echo "disabled" >&6; }
11195      else
11196        # Check if the provided tool contains a complete path.
11197        tool_specified="$TAIL"
11198        tool_basename="${tool_specified##*/}"
11199        if test "x$tool_basename" = "x$tool_specified"; then
11200          # A command without a complete path is provided, search $PATH.
11201          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11202$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11203          # Extract the first word of "$tool_basename", so it can be a program name with args.
11204set dummy $tool_basename; ac_word=$2
11205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11206$as_echo_n "checking for $ac_word... " >&6; }
11207if ${ac_cv_path_TAIL+:} false; then :
11208  $as_echo_n "(cached) " >&6
11209else
11210  case $TAIL in
11211  [\\/]* | ?:[\\/]*)
11212  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11213  ;;
11214  *)
11215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11216for as_dir in $PATH
11217do
11218  IFS=$as_save_IFS
11219  test -z "$as_dir" && as_dir=.
11220    for ac_exec_ext in '' $ac_executable_extensions; do
11221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11222    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11224    break 2
11225  fi
11226done
11227  done
11228IFS=$as_save_IFS
11229
11230  ;;
11231esac
11232fi
11233TAIL=$ac_cv_path_TAIL
11234if test -n "$TAIL"; then
11235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11236$as_echo "$TAIL" >&6; }
11237else
11238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11239$as_echo "no" >&6; }
11240fi
11241
11242
11243          if test "x$TAIL" = x; then
11244            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11245          fi
11246        else
11247          # Otherwise we believe it is a complete path. Use it as it is.
11248          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11249$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11250          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11251$as_echo_n "checking for TAIL... " >&6; }
11252          if test ! -x "$tool_specified"; then
11253            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11254$as_echo "not found" >&6; }
11255            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11256          fi
11257          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11258$as_echo "$tool_specified" >&6; }
11259        fi
11260      fi
11261    fi
11262
11263  fi
11264
11265
11266
11267  if test "x$TAIL" = x; then
11268    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11269  fi
11270
11271
11272
11273
11274
11275  # Publish this variable in the help.
11276
11277
11278  if [ -z "${TAR+x}" ]; then
11279    # The variable is not set by user, try to locate tool using the code snippet
11280    for ac_prog in gtar tar
11281do
11282  # Extract the first word of "$ac_prog", so it can be a program name with args.
11283set dummy $ac_prog; ac_word=$2
11284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11285$as_echo_n "checking for $ac_word... " >&6; }
11286if ${ac_cv_path_TAR+:} false; then :
11287  $as_echo_n "(cached) " >&6
11288else
11289  case $TAR in
11290  [\\/]* | ?:[\\/]*)
11291  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11292  ;;
11293  *)
11294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11295for as_dir in $PATH
11296do
11297  IFS=$as_save_IFS
11298  test -z "$as_dir" && as_dir=.
11299    for ac_exec_ext in '' $ac_executable_extensions; do
11300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11301    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11303    break 2
11304  fi
11305done
11306  done
11307IFS=$as_save_IFS
11308
11309  ;;
11310esac
11311fi
11312TAR=$ac_cv_path_TAR
11313if test -n "$TAR"; then
11314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11315$as_echo "$TAR" >&6; }
11316else
11317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11318$as_echo "no" >&6; }
11319fi
11320
11321
11322  test -n "$TAR" && break
11323done
11324
11325  else
11326    # The variable is set, but is it from the command line or the environment?
11327
11328    # Try to remove the string !TAR! from our list.
11329    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11330    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11331      # If it failed, the variable was not from the command line. Ignore it,
11332      # but warn the user (except for BASH, which is always set by the calling BASH).
11333      if test "xTAR" != xBASH; then
11334        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11335$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11336      fi
11337      # Try to locate tool using the code snippet
11338      for ac_prog in gtar tar
11339do
11340  # Extract the first word of "$ac_prog", so it can be a program name with args.
11341set dummy $ac_prog; ac_word=$2
11342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11343$as_echo_n "checking for $ac_word... " >&6; }
11344if ${ac_cv_path_TAR+:} false; then :
11345  $as_echo_n "(cached) " >&6
11346else
11347  case $TAR in
11348  [\\/]* | ?:[\\/]*)
11349  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11350  ;;
11351  *)
11352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11353for as_dir in $PATH
11354do
11355  IFS=$as_save_IFS
11356  test -z "$as_dir" && as_dir=.
11357    for ac_exec_ext in '' $ac_executable_extensions; do
11358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11359    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11361    break 2
11362  fi
11363done
11364  done
11365IFS=$as_save_IFS
11366
11367  ;;
11368esac
11369fi
11370TAR=$ac_cv_path_TAR
11371if test -n "$TAR"; then
11372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11373$as_echo "$TAR" >&6; }
11374else
11375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11376$as_echo "no" >&6; }
11377fi
11378
11379
11380  test -n "$TAR" && break
11381done
11382
11383    else
11384      # If it succeeded, then it was overridden by the user. We will use it
11385      # for the tool.
11386
11387      # First remove it from the list of overridden variables, so we can test
11388      # for unknown variables in the end.
11389      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11390
11391      # Check if we try to supply an empty value
11392      if test "x$TAR" = x; then
11393        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11394$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11395        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11396$as_echo_n "checking for TAR... " >&6; }
11397        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11398$as_echo "disabled" >&6; }
11399      else
11400        # Check if the provided tool contains a complete path.
11401        tool_specified="$TAR"
11402        tool_basename="${tool_specified##*/}"
11403        if test "x$tool_basename" = "x$tool_specified"; then
11404          # A command without a complete path is provided, search $PATH.
11405          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11406$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11407          # Extract the first word of "$tool_basename", so it can be a program name with args.
11408set dummy $tool_basename; ac_word=$2
11409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11410$as_echo_n "checking for $ac_word... " >&6; }
11411if ${ac_cv_path_TAR+:} false; then :
11412  $as_echo_n "(cached) " >&6
11413else
11414  case $TAR in
11415  [\\/]* | ?:[\\/]*)
11416  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11417  ;;
11418  *)
11419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11420for as_dir in $PATH
11421do
11422  IFS=$as_save_IFS
11423  test -z "$as_dir" && as_dir=.
11424    for ac_exec_ext in '' $ac_executable_extensions; do
11425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11426    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11428    break 2
11429  fi
11430done
11431  done
11432IFS=$as_save_IFS
11433
11434  ;;
11435esac
11436fi
11437TAR=$ac_cv_path_TAR
11438if test -n "$TAR"; then
11439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11440$as_echo "$TAR" >&6; }
11441else
11442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11443$as_echo "no" >&6; }
11444fi
11445
11446
11447          if test "x$TAR" = x; then
11448            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11449          fi
11450        else
11451          # Otherwise we believe it is a complete path. Use it as it is.
11452          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11453$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11454          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11455$as_echo_n "checking for TAR... " >&6; }
11456          if test ! -x "$tool_specified"; then
11457            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11458$as_echo "not found" >&6; }
11459            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11460          fi
11461          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11462$as_echo "$tool_specified" >&6; }
11463        fi
11464      fi
11465    fi
11466
11467  fi
11468
11469
11470
11471  if test "x$TAR" = x; then
11472    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11473  fi
11474
11475
11476
11477
11478
11479  # Publish this variable in the help.
11480
11481
11482  if [ -z "${TEE+x}" ]; then
11483    # The variable is not set by user, try to locate tool using the code snippet
11484    for ac_prog in tee
11485do
11486  # Extract the first word of "$ac_prog", so it can be a program name with args.
11487set dummy $ac_prog; ac_word=$2
11488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11489$as_echo_n "checking for $ac_word... " >&6; }
11490if ${ac_cv_path_TEE+:} false; then :
11491  $as_echo_n "(cached) " >&6
11492else
11493  case $TEE in
11494  [\\/]* | ?:[\\/]*)
11495  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11496  ;;
11497  *)
11498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11499for as_dir in $PATH
11500do
11501  IFS=$as_save_IFS
11502  test -z "$as_dir" && as_dir=.
11503    for ac_exec_ext in '' $ac_executable_extensions; do
11504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11505    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11507    break 2
11508  fi
11509done
11510  done
11511IFS=$as_save_IFS
11512
11513  ;;
11514esac
11515fi
11516TEE=$ac_cv_path_TEE
11517if test -n "$TEE"; then
11518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11519$as_echo "$TEE" >&6; }
11520else
11521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11522$as_echo "no" >&6; }
11523fi
11524
11525
11526  test -n "$TEE" && break
11527done
11528
11529  else
11530    # The variable is set, but is it from the command line or the environment?
11531
11532    # Try to remove the string !TEE! from our list.
11533    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11534    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11535      # If it failed, the variable was not from the command line. Ignore it,
11536      # but warn the user (except for BASH, which is always set by the calling BASH).
11537      if test "xTEE" != xBASH; then
11538        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11539$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11540      fi
11541      # Try to locate tool using the code snippet
11542      for ac_prog in tee
11543do
11544  # Extract the first word of "$ac_prog", so it can be a program name with args.
11545set dummy $ac_prog; ac_word=$2
11546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11547$as_echo_n "checking for $ac_word... " >&6; }
11548if ${ac_cv_path_TEE+:} false; then :
11549  $as_echo_n "(cached) " >&6
11550else
11551  case $TEE in
11552  [\\/]* | ?:[\\/]*)
11553  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11554  ;;
11555  *)
11556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11557for as_dir in $PATH
11558do
11559  IFS=$as_save_IFS
11560  test -z "$as_dir" && as_dir=.
11561    for ac_exec_ext in '' $ac_executable_extensions; do
11562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11563    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11565    break 2
11566  fi
11567done
11568  done
11569IFS=$as_save_IFS
11570
11571  ;;
11572esac
11573fi
11574TEE=$ac_cv_path_TEE
11575if test -n "$TEE"; then
11576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11577$as_echo "$TEE" >&6; }
11578else
11579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11580$as_echo "no" >&6; }
11581fi
11582
11583
11584  test -n "$TEE" && break
11585done
11586
11587    else
11588      # If it succeeded, then it was overridden by the user. We will use it
11589      # for the tool.
11590
11591      # First remove it from the list of overridden variables, so we can test
11592      # for unknown variables in the end.
11593      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11594
11595      # Check if we try to supply an empty value
11596      if test "x$TEE" = x; then
11597        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11598$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11599        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11600$as_echo_n "checking for TEE... " >&6; }
11601        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11602$as_echo "disabled" >&6; }
11603      else
11604        # Check if the provided tool contains a complete path.
11605        tool_specified="$TEE"
11606        tool_basename="${tool_specified##*/}"
11607        if test "x$tool_basename" = "x$tool_specified"; then
11608          # A command without a complete path is provided, search $PATH.
11609          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11610$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11611          # Extract the first word of "$tool_basename", so it can be a program name with args.
11612set dummy $tool_basename; ac_word=$2
11613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11614$as_echo_n "checking for $ac_word... " >&6; }
11615if ${ac_cv_path_TEE+:} false; then :
11616  $as_echo_n "(cached) " >&6
11617else
11618  case $TEE in
11619  [\\/]* | ?:[\\/]*)
11620  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11621  ;;
11622  *)
11623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11624for as_dir in $PATH
11625do
11626  IFS=$as_save_IFS
11627  test -z "$as_dir" && as_dir=.
11628    for ac_exec_ext in '' $ac_executable_extensions; do
11629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11630    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11632    break 2
11633  fi
11634done
11635  done
11636IFS=$as_save_IFS
11637
11638  ;;
11639esac
11640fi
11641TEE=$ac_cv_path_TEE
11642if test -n "$TEE"; then
11643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11644$as_echo "$TEE" >&6; }
11645else
11646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11647$as_echo "no" >&6; }
11648fi
11649
11650
11651          if test "x$TEE" = x; then
11652            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11653          fi
11654        else
11655          # Otherwise we believe it is a complete path. Use it as it is.
11656          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11657$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11658          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11659$as_echo_n "checking for TEE... " >&6; }
11660          if test ! -x "$tool_specified"; then
11661            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11662$as_echo "not found" >&6; }
11663            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11664          fi
11665          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11666$as_echo "$tool_specified" >&6; }
11667        fi
11668      fi
11669    fi
11670
11671  fi
11672
11673
11674
11675  if test "x$TEE" = x; then
11676    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11677  fi
11678
11679
11680
11681
11682
11683  # Publish this variable in the help.
11684
11685
11686  if [ -z "${TOUCH+x}" ]; then
11687    # The variable is not set by user, try to locate tool using the code snippet
11688    for ac_prog in touch
11689do
11690  # Extract the first word of "$ac_prog", so it can be a program name with args.
11691set dummy $ac_prog; ac_word=$2
11692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11693$as_echo_n "checking for $ac_word... " >&6; }
11694if ${ac_cv_path_TOUCH+:} false; then :
11695  $as_echo_n "(cached) " >&6
11696else
11697  case $TOUCH in
11698  [\\/]* | ?:[\\/]*)
11699  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11700  ;;
11701  *)
11702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11703for as_dir in $PATH
11704do
11705  IFS=$as_save_IFS
11706  test -z "$as_dir" && as_dir=.
11707    for ac_exec_ext in '' $ac_executable_extensions; do
11708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11709    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11711    break 2
11712  fi
11713done
11714  done
11715IFS=$as_save_IFS
11716
11717  ;;
11718esac
11719fi
11720TOUCH=$ac_cv_path_TOUCH
11721if test -n "$TOUCH"; then
11722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11723$as_echo "$TOUCH" >&6; }
11724else
11725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11726$as_echo "no" >&6; }
11727fi
11728
11729
11730  test -n "$TOUCH" && break
11731done
11732
11733  else
11734    # The variable is set, but is it from the command line or the environment?
11735
11736    # Try to remove the string !TOUCH! from our list.
11737    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11738    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11739      # If it failed, the variable was not from the command line. Ignore it,
11740      # but warn the user (except for BASH, which is always set by the calling BASH).
11741      if test "xTOUCH" != xBASH; then
11742        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11743$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11744      fi
11745      # Try to locate tool using the code snippet
11746      for ac_prog in touch
11747do
11748  # Extract the first word of "$ac_prog", so it can be a program name with args.
11749set dummy $ac_prog; ac_word=$2
11750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11751$as_echo_n "checking for $ac_word... " >&6; }
11752if ${ac_cv_path_TOUCH+:} false; then :
11753  $as_echo_n "(cached) " >&6
11754else
11755  case $TOUCH in
11756  [\\/]* | ?:[\\/]*)
11757  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11758  ;;
11759  *)
11760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11761for as_dir in $PATH
11762do
11763  IFS=$as_save_IFS
11764  test -z "$as_dir" && as_dir=.
11765    for ac_exec_ext in '' $ac_executable_extensions; do
11766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11767    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11769    break 2
11770  fi
11771done
11772  done
11773IFS=$as_save_IFS
11774
11775  ;;
11776esac
11777fi
11778TOUCH=$ac_cv_path_TOUCH
11779if test -n "$TOUCH"; then
11780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11781$as_echo "$TOUCH" >&6; }
11782else
11783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11784$as_echo "no" >&6; }
11785fi
11786
11787
11788  test -n "$TOUCH" && break
11789done
11790
11791    else
11792      # If it succeeded, then it was overridden by the user. We will use it
11793      # for the tool.
11794
11795      # First remove it from the list of overridden variables, so we can test
11796      # for unknown variables in the end.
11797      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11798
11799      # Check if we try to supply an empty value
11800      if test "x$TOUCH" = x; then
11801        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11802$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11803        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11804$as_echo_n "checking for TOUCH... " >&6; }
11805        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11806$as_echo "disabled" >&6; }
11807      else
11808        # Check if the provided tool contains a complete path.
11809        tool_specified="$TOUCH"
11810        tool_basename="${tool_specified##*/}"
11811        if test "x$tool_basename" = "x$tool_specified"; then
11812          # A command without a complete path is provided, search $PATH.
11813          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11814$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11815          # Extract the first word of "$tool_basename", so it can be a program name with args.
11816set dummy $tool_basename; ac_word=$2
11817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11818$as_echo_n "checking for $ac_word... " >&6; }
11819if ${ac_cv_path_TOUCH+:} false; then :
11820  $as_echo_n "(cached) " >&6
11821else
11822  case $TOUCH in
11823  [\\/]* | ?:[\\/]*)
11824  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11825  ;;
11826  *)
11827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11828for as_dir in $PATH
11829do
11830  IFS=$as_save_IFS
11831  test -z "$as_dir" && as_dir=.
11832    for ac_exec_ext in '' $ac_executable_extensions; do
11833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11834    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11836    break 2
11837  fi
11838done
11839  done
11840IFS=$as_save_IFS
11841
11842  ;;
11843esac
11844fi
11845TOUCH=$ac_cv_path_TOUCH
11846if test -n "$TOUCH"; then
11847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11848$as_echo "$TOUCH" >&6; }
11849else
11850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11851$as_echo "no" >&6; }
11852fi
11853
11854
11855          if test "x$TOUCH" = x; then
11856            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11857          fi
11858        else
11859          # Otherwise we believe it is a complete path. Use it as it is.
11860          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11861$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11862          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11863$as_echo_n "checking for TOUCH... " >&6; }
11864          if test ! -x "$tool_specified"; then
11865            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11866$as_echo "not found" >&6; }
11867            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11868          fi
11869          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11870$as_echo "$tool_specified" >&6; }
11871        fi
11872      fi
11873    fi
11874
11875  fi
11876
11877
11878
11879  if test "x$TOUCH" = x; then
11880    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11881  fi
11882
11883
11884
11885
11886
11887  # Publish this variable in the help.
11888
11889
11890  if [ -z "${TR+x}" ]; then
11891    # The variable is not set by user, try to locate tool using the code snippet
11892    for ac_prog in tr
11893do
11894  # Extract the first word of "$ac_prog", so it can be a program name with args.
11895set dummy $ac_prog; ac_word=$2
11896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11897$as_echo_n "checking for $ac_word... " >&6; }
11898if ${ac_cv_path_TR+:} false; then :
11899  $as_echo_n "(cached) " >&6
11900else
11901  case $TR in
11902  [\\/]* | ?:[\\/]*)
11903  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11904  ;;
11905  *)
11906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11907for as_dir in $PATH
11908do
11909  IFS=$as_save_IFS
11910  test -z "$as_dir" && as_dir=.
11911    for ac_exec_ext in '' $ac_executable_extensions; do
11912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11913    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11915    break 2
11916  fi
11917done
11918  done
11919IFS=$as_save_IFS
11920
11921  ;;
11922esac
11923fi
11924TR=$ac_cv_path_TR
11925if test -n "$TR"; then
11926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11927$as_echo "$TR" >&6; }
11928else
11929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11930$as_echo "no" >&6; }
11931fi
11932
11933
11934  test -n "$TR" && break
11935done
11936
11937  else
11938    # The variable is set, but is it from the command line or the environment?
11939
11940    # Try to remove the string !TR! from our list.
11941    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11942    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11943      # If it failed, the variable was not from the command line. Ignore it,
11944      # but warn the user (except for BASH, which is always set by the calling BASH).
11945      if test "xTR" != xBASH; then
11946        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11947$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11948      fi
11949      # Try to locate tool using the code snippet
11950      for ac_prog in tr
11951do
11952  # Extract the first word of "$ac_prog", so it can be a program name with args.
11953set dummy $ac_prog; ac_word=$2
11954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11955$as_echo_n "checking for $ac_word... " >&6; }
11956if ${ac_cv_path_TR+:} false; then :
11957  $as_echo_n "(cached) " >&6
11958else
11959  case $TR in
11960  [\\/]* | ?:[\\/]*)
11961  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11962  ;;
11963  *)
11964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11965for as_dir in $PATH
11966do
11967  IFS=$as_save_IFS
11968  test -z "$as_dir" && as_dir=.
11969    for ac_exec_ext in '' $ac_executable_extensions; do
11970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11971    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11973    break 2
11974  fi
11975done
11976  done
11977IFS=$as_save_IFS
11978
11979  ;;
11980esac
11981fi
11982TR=$ac_cv_path_TR
11983if test -n "$TR"; then
11984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11985$as_echo "$TR" >&6; }
11986else
11987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11988$as_echo "no" >&6; }
11989fi
11990
11991
11992  test -n "$TR" && break
11993done
11994
11995    else
11996      # If it succeeded, then it was overridden by the user. We will use it
11997      # for the tool.
11998
11999      # First remove it from the list of overridden variables, so we can test
12000      # for unknown variables in the end.
12001      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12002
12003      # Check if we try to supply an empty value
12004      if test "x$TR" = x; then
12005        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12006$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12007        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12008$as_echo_n "checking for TR... " >&6; }
12009        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12010$as_echo "disabled" >&6; }
12011      else
12012        # Check if the provided tool contains a complete path.
12013        tool_specified="$TR"
12014        tool_basename="${tool_specified##*/}"
12015        if test "x$tool_basename" = "x$tool_specified"; then
12016          # A command without a complete path is provided, search $PATH.
12017          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12018$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12019          # Extract the first word of "$tool_basename", so it can be a program name with args.
12020set dummy $tool_basename; ac_word=$2
12021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12022$as_echo_n "checking for $ac_word... " >&6; }
12023if ${ac_cv_path_TR+:} false; then :
12024  $as_echo_n "(cached) " >&6
12025else
12026  case $TR in
12027  [\\/]* | ?:[\\/]*)
12028  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12029  ;;
12030  *)
12031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12032for as_dir in $PATH
12033do
12034  IFS=$as_save_IFS
12035  test -z "$as_dir" && as_dir=.
12036    for ac_exec_ext in '' $ac_executable_extensions; do
12037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12038    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12040    break 2
12041  fi
12042done
12043  done
12044IFS=$as_save_IFS
12045
12046  ;;
12047esac
12048fi
12049TR=$ac_cv_path_TR
12050if test -n "$TR"; then
12051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12052$as_echo "$TR" >&6; }
12053else
12054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12055$as_echo "no" >&6; }
12056fi
12057
12058
12059          if test "x$TR" = x; then
12060            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12061          fi
12062        else
12063          # Otherwise we believe it is a complete path. Use it as it is.
12064          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12065$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12066          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12067$as_echo_n "checking for TR... " >&6; }
12068          if test ! -x "$tool_specified"; then
12069            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12070$as_echo "not found" >&6; }
12071            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12072          fi
12073          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12074$as_echo "$tool_specified" >&6; }
12075        fi
12076      fi
12077    fi
12078
12079  fi
12080
12081
12082
12083  if test "x$TR" = x; then
12084    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12085  fi
12086
12087
12088
12089
12090
12091  # Publish this variable in the help.
12092
12093
12094  if [ -z "${UNAME+x}" ]; then
12095    # The variable is not set by user, try to locate tool using the code snippet
12096    for ac_prog in uname
12097do
12098  # Extract the first word of "$ac_prog", so it can be a program name with args.
12099set dummy $ac_prog; ac_word=$2
12100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12101$as_echo_n "checking for $ac_word... " >&6; }
12102if ${ac_cv_path_UNAME+:} false; then :
12103  $as_echo_n "(cached) " >&6
12104else
12105  case $UNAME in
12106  [\\/]* | ?:[\\/]*)
12107  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12108  ;;
12109  *)
12110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12111for as_dir in $PATH
12112do
12113  IFS=$as_save_IFS
12114  test -z "$as_dir" && as_dir=.
12115    for ac_exec_ext in '' $ac_executable_extensions; do
12116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12117    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12119    break 2
12120  fi
12121done
12122  done
12123IFS=$as_save_IFS
12124
12125  ;;
12126esac
12127fi
12128UNAME=$ac_cv_path_UNAME
12129if test -n "$UNAME"; then
12130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12131$as_echo "$UNAME" >&6; }
12132else
12133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12134$as_echo "no" >&6; }
12135fi
12136
12137
12138  test -n "$UNAME" && break
12139done
12140
12141  else
12142    # The variable is set, but is it from the command line or the environment?
12143
12144    # Try to remove the string !UNAME! from our list.
12145    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12146    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12147      # If it failed, the variable was not from the command line. Ignore it,
12148      # but warn the user (except for BASH, which is always set by the calling BASH).
12149      if test "xUNAME" != xBASH; then
12150        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12151$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12152      fi
12153      # Try to locate tool using the code snippet
12154      for ac_prog in uname
12155do
12156  # Extract the first word of "$ac_prog", so it can be a program name with args.
12157set dummy $ac_prog; ac_word=$2
12158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12159$as_echo_n "checking for $ac_word... " >&6; }
12160if ${ac_cv_path_UNAME+:} false; then :
12161  $as_echo_n "(cached) " >&6
12162else
12163  case $UNAME in
12164  [\\/]* | ?:[\\/]*)
12165  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12166  ;;
12167  *)
12168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12169for as_dir in $PATH
12170do
12171  IFS=$as_save_IFS
12172  test -z "$as_dir" && as_dir=.
12173    for ac_exec_ext in '' $ac_executable_extensions; do
12174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12175    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12177    break 2
12178  fi
12179done
12180  done
12181IFS=$as_save_IFS
12182
12183  ;;
12184esac
12185fi
12186UNAME=$ac_cv_path_UNAME
12187if test -n "$UNAME"; then
12188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12189$as_echo "$UNAME" >&6; }
12190else
12191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12192$as_echo "no" >&6; }
12193fi
12194
12195
12196  test -n "$UNAME" && break
12197done
12198
12199    else
12200      # If it succeeded, then it was overridden by the user. We will use it
12201      # for the tool.
12202
12203      # First remove it from the list of overridden variables, so we can test
12204      # for unknown variables in the end.
12205      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12206
12207      # Check if we try to supply an empty value
12208      if test "x$UNAME" = x; then
12209        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12210$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12211        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12212$as_echo_n "checking for UNAME... " >&6; }
12213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12214$as_echo "disabled" >&6; }
12215      else
12216        # Check if the provided tool contains a complete path.
12217        tool_specified="$UNAME"
12218        tool_basename="${tool_specified##*/}"
12219        if test "x$tool_basename" = "x$tool_specified"; then
12220          # A command without a complete path is provided, search $PATH.
12221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12222$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12223          # Extract the first word of "$tool_basename", so it can be a program name with args.
12224set dummy $tool_basename; ac_word=$2
12225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12226$as_echo_n "checking for $ac_word... " >&6; }
12227if ${ac_cv_path_UNAME+:} false; then :
12228  $as_echo_n "(cached) " >&6
12229else
12230  case $UNAME in
12231  [\\/]* | ?:[\\/]*)
12232  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12233  ;;
12234  *)
12235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12236for as_dir in $PATH
12237do
12238  IFS=$as_save_IFS
12239  test -z "$as_dir" && as_dir=.
12240    for ac_exec_ext in '' $ac_executable_extensions; do
12241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12242    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12244    break 2
12245  fi
12246done
12247  done
12248IFS=$as_save_IFS
12249
12250  ;;
12251esac
12252fi
12253UNAME=$ac_cv_path_UNAME
12254if test -n "$UNAME"; then
12255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12256$as_echo "$UNAME" >&6; }
12257else
12258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12259$as_echo "no" >&6; }
12260fi
12261
12262
12263          if test "x$UNAME" = x; then
12264            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12265          fi
12266        else
12267          # Otherwise we believe it is a complete path. Use it as it is.
12268          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12269$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12270          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12271$as_echo_n "checking for UNAME... " >&6; }
12272          if test ! -x "$tool_specified"; then
12273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12274$as_echo "not found" >&6; }
12275            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12276          fi
12277          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12278$as_echo "$tool_specified" >&6; }
12279        fi
12280      fi
12281    fi
12282
12283  fi
12284
12285
12286
12287  if test "x$UNAME" = x; then
12288    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12289  fi
12290
12291
12292
12293
12294
12295  # Publish this variable in the help.
12296
12297
12298  if [ -z "${UNIQ+x}" ]; then
12299    # The variable is not set by user, try to locate tool using the code snippet
12300    for ac_prog in uniq
12301do
12302  # Extract the first word of "$ac_prog", so it can be a program name with args.
12303set dummy $ac_prog; ac_word=$2
12304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12305$as_echo_n "checking for $ac_word... " >&6; }
12306if ${ac_cv_path_UNIQ+:} false; then :
12307  $as_echo_n "(cached) " >&6
12308else
12309  case $UNIQ in
12310  [\\/]* | ?:[\\/]*)
12311  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12312  ;;
12313  *)
12314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12315for as_dir in $PATH
12316do
12317  IFS=$as_save_IFS
12318  test -z "$as_dir" && as_dir=.
12319    for ac_exec_ext in '' $ac_executable_extensions; do
12320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12321    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12323    break 2
12324  fi
12325done
12326  done
12327IFS=$as_save_IFS
12328
12329  ;;
12330esac
12331fi
12332UNIQ=$ac_cv_path_UNIQ
12333if test -n "$UNIQ"; then
12334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12335$as_echo "$UNIQ" >&6; }
12336else
12337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12338$as_echo "no" >&6; }
12339fi
12340
12341
12342  test -n "$UNIQ" && break
12343done
12344
12345  else
12346    # The variable is set, but is it from the command line or the environment?
12347
12348    # Try to remove the string !UNIQ! from our list.
12349    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12350    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12351      # If it failed, the variable was not from the command line. Ignore it,
12352      # but warn the user (except for BASH, which is always set by the calling BASH).
12353      if test "xUNIQ" != xBASH; then
12354        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12355$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12356      fi
12357      # Try to locate tool using the code snippet
12358      for ac_prog in uniq
12359do
12360  # Extract the first word of "$ac_prog", so it can be a program name with args.
12361set dummy $ac_prog; ac_word=$2
12362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12363$as_echo_n "checking for $ac_word... " >&6; }
12364if ${ac_cv_path_UNIQ+:} false; then :
12365  $as_echo_n "(cached) " >&6
12366else
12367  case $UNIQ in
12368  [\\/]* | ?:[\\/]*)
12369  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12370  ;;
12371  *)
12372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12373for as_dir in $PATH
12374do
12375  IFS=$as_save_IFS
12376  test -z "$as_dir" && as_dir=.
12377    for ac_exec_ext in '' $ac_executable_extensions; do
12378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12379    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12381    break 2
12382  fi
12383done
12384  done
12385IFS=$as_save_IFS
12386
12387  ;;
12388esac
12389fi
12390UNIQ=$ac_cv_path_UNIQ
12391if test -n "$UNIQ"; then
12392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12393$as_echo "$UNIQ" >&6; }
12394else
12395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12396$as_echo "no" >&6; }
12397fi
12398
12399
12400  test -n "$UNIQ" && break
12401done
12402
12403    else
12404      # If it succeeded, then it was overridden by the user. We will use it
12405      # for the tool.
12406
12407      # First remove it from the list of overridden variables, so we can test
12408      # for unknown variables in the end.
12409      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12410
12411      # Check if we try to supply an empty value
12412      if test "x$UNIQ" = x; then
12413        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12414$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12415        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12416$as_echo_n "checking for UNIQ... " >&6; }
12417        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12418$as_echo "disabled" >&6; }
12419      else
12420        # Check if the provided tool contains a complete path.
12421        tool_specified="$UNIQ"
12422        tool_basename="${tool_specified##*/}"
12423        if test "x$tool_basename" = "x$tool_specified"; then
12424          # A command without a complete path is provided, search $PATH.
12425          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12426$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12427          # Extract the first word of "$tool_basename", so it can be a program name with args.
12428set dummy $tool_basename; ac_word=$2
12429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12430$as_echo_n "checking for $ac_word... " >&6; }
12431if ${ac_cv_path_UNIQ+:} false; then :
12432  $as_echo_n "(cached) " >&6
12433else
12434  case $UNIQ in
12435  [\\/]* | ?:[\\/]*)
12436  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12437  ;;
12438  *)
12439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12440for as_dir in $PATH
12441do
12442  IFS=$as_save_IFS
12443  test -z "$as_dir" && as_dir=.
12444    for ac_exec_ext in '' $ac_executable_extensions; do
12445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12446    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12448    break 2
12449  fi
12450done
12451  done
12452IFS=$as_save_IFS
12453
12454  ;;
12455esac
12456fi
12457UNIQ=$ac_cv_path_UNIQ
12458if test -n "$UNIQ"; then
12459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12460$as_echo "$UNIQ" >&6; }
12461else
12462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12463$as_echo "no" >&6; }
12464fi
12465
12466
12467          if test "x$UNIQ" = x; then
12468            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12469          fi
12470        else
12471          # Otherwise we believe it is a complete path. Use it as it is.
12472          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12473$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12474          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12475$as_echo_n "checking for UNIQ... " >&6; }
12476          if test ! -x "$tool_specified"; then
12477            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12478$as_echo "not found" >&6; }
12479            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12480          fi
12481          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12482$as_echo "$tool_specified" >&6; }
12483        fi
12484      fi
12485    fi
12486
12487  fi
12488
12489
12490
12491  if test "x$UNIQ" = x; then
12492    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12493  fi
12494
12495
12496
12497
12498
12499  # Publish this variable in the help.
12500
12501
12502  if [ -z "${WC+x}" ]; then
12503    # The variable is not set by user, try to locate tool using the code snippet
12504    for ac_prog in wc
12505do
12506  # Extract the first word of "$ac_prog", so it can be a program name with args.
12507set dummy $ac_prog; ac_word=$2
12508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12509$as_echo_n "checking for $ac_word... " >&6; }
12510if ${ac_cv_path_WC+:} false; then :
12511  $as_echo_n "(cached) " >&6
12512else
12513  case $WC in
12514  [\\/]* | ?:[\\/]*)
12515  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12516  ;;
12517  *)
12518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12519for as_dir in $PATH
12520do
12521  IFS=$as_save_IFS
12522  test -z "$as_dir" && as_dir=.
12523    for ac_exec_ext in '' $ac_executable_extensions; do
12524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12525    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12527    break 2
12528  fi
12529done
12530  done
12531IFS=$as_save_IFS
12532
12533  ;;
12534esac
12535fi
12536WC=$ac_cv_path_WC
12537if test -n "$WC"; then
12538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12539$as_echo "$WC" >&6; }
12540else
12541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12542$as_echo "no" >&6; }
12543fi
12544
12545
12546  test -n "$WC" && break
12547done
12548
12549  else
12550    # The variable is set, but is it from the command line or the environment?
12551
12552    # Try to remove the string !WC! from our list.
12553    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12554    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12555      # If it failed, the variable was not from the command line. Ignore it,
12556      # but warn the user (except for BASH, which is always set by the calling BASH).
12557      if test "xWC" != xBASH; then
12558        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12559$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12560      fi
12561      # Try to locate tool using the code snippet
12562      for ac_prog in wc
12563do
12564  # Extract the first word of "$ac_prog", so it can be a program name with args.
12565set dummy $ac_prog; ac_word=$2
12566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12567$as_echo_n "checking for $ac_word... " >&6; }
12568if ${ac_cv_path_WC+:} false; then :
12569  $as_echo_n "(cached) " >&6
12570else
12571  case $WC in
12572  [\\/]* | ?:[\\/]*)
12573  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12574  ;;
12575  *)
12576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12577for as_dir in $PATH
12578do
12579  IFS=$as_save_IFS
12580  test -z "$as_dir" && as_dir=.
12581    for ac_exec_ext in '' $ac_executable_extensions; do
12582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12583    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12585    break 2
12586  fi
12587done
12588  done
12589IFS=$as_save_IFS
12590
12591  ;;
12592esac
12593fi
12594WC=$ac_cv_path_WC
12595if test -n "$WC"; then
12596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12597$as_echo "$WC" >&6; }
12598else
12599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12600$as_echo "no" >&6; }
12601fi
12602
12603
12604  test -n "$WC" && break
12605done
12606
12607    else
12608      # If it succeeded, then it was overridden by the user. We will use it
12609      # for the tool.
12610
12611      # First remove it from the list of overridden variables, so we can test
12612      # for unknown variables in the end.
12613      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12614
12615      # Check if we try to supply an empty value
12616      if test "x$WC" = x; then
12617        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12618$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12619        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12620$as_echo_n "checking for WC... " >&6; }
12621        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12622$as_echo "disabled" >&6; }
12623      else
12624        # Check if the provided tool contains a complete path.
12625        tool_specified="$WC"
12626        tool_basename="${tool_specified##*/}"
12627        if test "x$tool_basename" = "x$tool_specified"; then
12628          # A command without a complete path is provided, search $PATH.
12629          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12630$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12631          # Extract the first word of "$tool_basename", so it can be a program name with args.
12632set dummy $tool_basename; ac_word=$2
12633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12634$as_echo_n "checking for $ac_word... " >&6; }
12635if ${ac_cv_path_WC+:} false; then :
12636  $as_echo_n "(cached) " >&6
12637else
12638  case $WC in
12639  [\\/]* | ?:[\\/]*)
12640  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12641  ;;
12642  *)
12643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12644for as_dir in $PATH
12645do
12646  IFS=$as_save_IFS
12647  test -z "$as_dir" && as_dir=.
12648    for ac_exec_ext in '' $ac_executable_extensions; do
12649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12650    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12652    break 2
12653  fi
12654done
12655  done
12656IFS=$as_save_IFS
12657
12658  ;;
12659esac
12660fi
12661WC=$ac_cv_path_WC
12662if test -n "$WC"; then
12663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12664$as_echo "$WC" >&6; }
12665else
12666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12667$as_echo "no" >&6; }
12668fi
12669
12670
12671          if test "x$WC" = x; then
12672            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12673          fi
12674        else
12675          # Otherwise we believe it is a complete path. Use it as it is.
12676          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12677$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12678          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12679$as_echo_n "checking for WC... " >&6; }
12680          if test ! -x "$tool_specified"; then
12681            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12682$as_echo "not found" >&6; }
12683            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12684          fi
12685          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12686$as_echo "$tool_specified" >&6; }
12687        fi
12688      fi
12689    fi
12690
12691  fi
12692
12693
12694
12695  if test "x$WC" = x; then
12696    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12697  fi
12698
12699
12700
12701
12702
12703  # Publish this variable in the help.
12704
12705
12706  if [ -z "${WHICH+x}" ]; then
12707    # The variable is not set by user, try to locate tool using the code snippet
12708    for ac_prog in which
12709do
12710  # Extract the first word of "$ac_prog", so it can be a program name with args.
12711set dummy $ac_prog; ac_word=$2
12712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12713$as_echo_n "checking for $ac_word... " >&6; }
12714if ${ac_cv_path_WHICH+:} false; then :
12715  $as_echo_n "(cached) " >&6
12716else
12717  case $WHICH in
12718  [\\/]* | ?:[\\/]*)
12719  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12720  ;;
12721  *)
12722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12723for as_dir in $PATH
12724do
12725  IFS=$as_save_IFS
12726  test -z "$as_dir" && as_dir=.
12727    for ac_exec_ext in '' $ac_executable_extensions; do
12728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12729    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12731    break 2
12732  fi
12733done
12734  done
12735IFS=$as_save_IFS
12736
12737  ;;
12738esac
12739fi
12740WHICH=$ac_cv_path_WHICH
12741if test -n "$WHICH"; then
12742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12743$as_echo "$WHICH" >&6; }
12744else
12745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12746$as_echo "no" >&6; }
12747fi
12748
12749
12750  test -n "$WHICH" && break
12751done
12752
12753  else
12754    # The variable is set, but is it from the command line or the environment?
12755
12756    # Try to remove the string !WHICH! from our list.
12757    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12758    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12759      # If it failed, the variable was not from the command line. Ignore it,
12760      # but warn the user (except for BASH, which is always set by the calling BASH).
12761      if test "xWHICH" != xBASH; then
12762        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12763$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12764      fi
12765      # Try to locate tool using the code snippet
12766      for ac_prog in which
12767do
12768  # Extract the first word of "$ac_prog", so it can be a program name with args.
12769set dummy $ac_prog; ac_word=$2
12770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12771$as_echo_n "checking for $ac_word... " >&6; }
12772if ${ac_cv_path_WHICH+:} false; then :
12773  $as_echo_n "(cached) " >&6
12774else
12775  case $WHICH in
12776  [\\/]* | ?:[\\/]*)
12777  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12778  ;;
12779  *)
12780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12781for as_dir in $PATH
12782do
12783  IFS=$as_save_IFS
12784  test -z "$as_dir" && as_dir=.
12785    for ac_exec_ext in '' $ac_executable_extensions; do
12786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12787    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12789    break 2
12790  fi
12791done
12792  done
12793IFS=$as_save_IFS
12794
12795  ;;
12796esac
12797fi
12798WHICH=$ac_cv_path_WHICH
12799if test -n "$WHICH"; then
12800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12801$as_echo "$WHICH" >&6; }
12802else
12803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12804$as_echo "no" >&6; }
12805fi
12806
12807
12808  test -n "$WHICH" && break
12809done
12810
12811    else
12812      # If it succeeded, then it was overridden by the user. We will use it
12813      # for the tool.
12814
12815      # First remove it from the list of overridden variables, so we can test
12816      # for unknown variables in the end.
12817      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12818
12819      # Check if we try to supply an empty value
12820      if test "x$WHICH" = x; then
12821        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12822$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12823        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12824$as_echo_n "checking for WHICH... " >&6; }
12825        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12826$as_echo "disabled" >&6; }
12827      else
12828        # Check if the provided tool contains a complete path.
12829        tool_specified="$WHICH"
12830        tool_basename="${tool_specified##*/}"
12831        if test "x$tool_basename" = "x$tool_specified"; then
12832          # A command without a complete path is provided, search $PATH.
12833          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12834$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12835          # Extract the first word of "$tool_basename", so it can be a program name with args.
12836set dummy $tool_basename; ac_word=$2
12837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12838$as_echo_n "checking for $ac_word... " >&6; }
12839if ${ac_cv_path_WHICH+:} false; then :
12840  $as_echo_n "(cached) " >&6
12841else
12842  case $WHICH in
12843  [\\/]* | ?:[\\/]*)
12844  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12845  ;;
12846  *)
12847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12848for as_dir in $PATH
12849do
12850  IFS=$as_save_IFS
12851  test -z "$as_dir" && as_dir=.
12852    for ac_exec_ext in '' $ac_executable_extensions; do
12853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12854    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12856    break 2
12857  fi
12858done
12859  done
12860IFS=$as_save_IFS
12861
12862  ;;
12863esac
12864fi
12865WHICH=$ac_cv_path_WHICH
12866if test -n "$WHICH"; then
12867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12868$as_echo "$WHICH" >&6; }
12869else
12870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12871$as_echo "no" >&6; }
12872fi
12873
12874
12875          if test "x$WHICH" = x; then
12876            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12877          fi
12878        else
12879          # Otherwise we believe it is a complete path. Use it as it is.
12880          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12881$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12882          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12883$as_echo_n "checking for WHICH... " >&6; }
12884          if test ! -x "$tool_specified"; then
12885            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12886$as_echo "not found" >&6; }
12887            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12888          fi
12889          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12890$as_echo "$tool_specified" >&6; }
12891        fi
12892      fi
12893    fi
12894
12895  fi
12896
12897
12898
12899  if test "x$WHICH" = x; then
12900    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12901  fi
12902
12903
12904
12905
12906
12907  # Publish this variable in the help.
12908
12909
12910  if [ -z "${XARGS+x}" ]; then
12911    # The variable is not set by user, try to locate tool using the code snippet
12912    for ac_prog in xargs
12913do
12914  # Extract the first word of "$ac_prog", so it can be a program name with args.
12915set dummy $ac_prog; ac_word=$2
12916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12917$as_echo_n "checking for $ac_word... " >&6; }
12918if ${ac_cv_path_XARGS+:} false; then :
12919  $as_echo_n "(cached) " >&6
12920else
12921  case $XARGS in
12922  [\\/]* | ?:[\\/]*)
12923  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12924  ;;
12925  *)
12926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12927for as_dir in $PATH
12928do
12929  IFS=$as_save_IFS
12930  test -z "$as_dir" && as_dir=.
12931    for ac_exec_ext in '' $ac_executable_extensions; do
12932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12933    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12935    break 2
12936  fi
12937done
12938  done
12939IFS=$as_save_IFS
12940
12941  ;;
12942esac
12943fi
12944XARGS=$ac_cv_path_XARGS
12945if test -n "$XARGS"; then
12946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12947$as_echo "$XARGS" >&6; }
12948else
12949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12950$as_echo "no" >&6; }
12951fi
12952
12953
12954  test -n "$XARGS" && break
12955done
12956
12957  else
12958    # The variable is set, but is it from the command line or the environment?
12959
12960    # Try to remove the string !XARGS! from our list.
12961    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12962    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12963      # If it failed, the variable was not from the command line. Ignore it,
12964      # but warn the user (except for BASH, which is always set by the calling BASH).
12965      if test "xXARGS" != xBASH; then
12966        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12967$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12968      fi
12969      # Try to locate tool using the code snippet
12970      for ac_prog in xargs
12971do
12972  # Extract the first word of "$ac_prog", so it can be a program name with args.
12973set dummy $ac_prog; ac_word=$2
12974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12975$as_echo_n "checking for $ac_word... " >&6; }
12976if ${ac_cv_path_XARGS+:} false; then :
12977  $as_echo_n "(cached) " >&6
12978else
12979  case $XARGS in
12980  [\\/]* | ?:[\\/]*)
12981  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12982  ;;
12983  *)
12984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12985for as_dir in $PATH
12986do
12987  IFS=$as_save_IFS
12988  test -z "$as_dir" && as_dir=.
12989    for ac_exec_ext in '' $ac_executable_extensions; do
12990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12991    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12993    break 2
12994  fi
12995done
12996  done
12997IFS=$as_save_IFS
12998
12999  ;;
13000esac
13001fi
13002XARGS=$ac_cv_path_XARGS
13003if test -n "$XARGS"; then
13004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13005$as_echo "$XARGS" >&6; }
13006else
13007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13008$as_echo "no" >&6; }
13009fi
13010
13011
13012  test -n "$XARGS" && break
13013done
13014
13015    else
13016      # If it succeeded, then it was overridden by the user. We will use it
13017      # for the tool.
13018
13019      # First remove it from the list of overridden variables, so we can test
13020      # for unknown variables in the end.
13021      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13022
13023      # Check if we try to supply an empty value
13024      if test "x$XARGS" = x; then
13025        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13026$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13027        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13028$as_echo_n "checking for XARGS... " >&6; }
13029        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13030$as_echo "disabled" >&6; }
13031      else
13032        # Check if the provided tool contains a complete path.
13033        tool_specified="$XARGS"
13034        tool_basename="${tool_specified##*/}"
13035        if test "x$tool_basename" = "x$tool_specified"; then
13036          # A command without a complete path is provided, search $PATH.
13037          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13038$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13039          # Extract the first word of "$tool_basename", so it can be a program name with args.
13040set dummy $tool_basename; ac_word=$2
13041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13042$as_echo_n "checking for $ac_word... " >&6; }
13043if ${ac_cv_path_XARGS+:} false; then :
13044  $as_echo_n "(cached) " >&6
13045else
13046  case $XARGS in
13047  [\\/]* | ?:[\\/]*)
13048  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13049  ;;
13050  *)
13051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13052for as_dir in $PATH
13053do
13054  IFS=$as_save_IFS
13055  test -z "$as_dir" && as_dir=.
13056    for ac_exec_ext in '' $ac_executable_extensions; do
13057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13058    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13060    break 2
13061  fi
13062done
13063  done
13064IFS=$as_save_IFS
13065
13066  ;;
13067esac
13068fi
13069XARGS=$ac_cv_path_XARGS
13070if test -n "$XARGS"; then
13071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13072$as_echo "$XARGS" >&6; }
13073else
13074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13075$as_echo "no" >&6; }
13076fi
13077
13078
13079          if test "x$XARGS" = x; then
13080            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13081          fi
13082        else
13083          # Otherwise we believe it is a complete path. Use it as it is.
13084          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13085$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13086          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13087$as_echo_n "checking for XARGS... " >&6; }
13088          if test ! -x "$tool_specified"; then
13089            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13090$as_echo "not found" >&6; }
13091            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13092          fi
13093          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13094$as_echo "$tool_specified" >&6; }
13095        fi
13096      fi
13097    fi
13098
13099  fi
13100
13101
13102
13103  if test "x$XARGS" = x; then
13104    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13105  fi
13106
13107
13108
13109  # Then required tools that require some special treatment.
13110
13111
13112  # Publish this variable in the help.
13113
13114
13115  if [ -z "${AWK+x}" ]; then
13116    # The variable is not set by user, try to locate tool using the code snippet
13117    for ac_prog in gawk mawk nawk awk
13118do
13119  # Extract the first word of "$ac_prog", so it can be a program name with args.
13120set dummy $ac_prog; ac_word=$2
13121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13122$as_echo_n "checking for $ac_word... " >&6; }
13123if ${ac_cv_prog_AWK+:} false; then :
13124  $as_echo_n "(cached) " >&6
13125else
13126  if test -n "$AWK"; then
13127  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13128else
13129as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13130for as_dir in $PATH
13131do
13132  IFS=$as_save_IFS
13133  test -z "$as_dir" && as_dir=.
13134    for ac_exec_ext in '' $ac_executable_extensions; do
13135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13136    ac_cv_prog_AWK="$ac_prog"
13137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13138    break 2
13139  fi
13140done
13141  done
13142IFS=$as_save_IFS
13143
13144fi
13145fi
13146AWK=$ac_cv_prog_AWK
13147if test -n "$AWK"; then
13148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13149$as_echo "$AWK" >&6; }
13150else
13151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13152$as_echo "no" >&6; }
13153fi
13154
13155
13156  test -n "$AWK" && break
13157done
13158
13159  else
13160    # The variable is set, but is it from the command line or the environment?
13161
13162    # Try to remove the string !AWK! from our list.
13163    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13164    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13165      # If it failed, the variable was not from the command line. Ignore it,
13166      # but warn the user (except for BASH, which is always set by the calling BASH).
13167      if test "xAWK" != xBASH; then
13168        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13169$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13170      fi
13171      # Try to locate tool using the code snippet
13172      for ac_prog in gawk mawk nawk awk
13173do
13174  # Extract the first word of "$ac_prog", so it can be a program name with args.
13175set dummy $ac_prog; ac_word=$2
13176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13177$as_echo_n "checking for $ac_word... " >&6; }
13178if ${ac_cv_prog_AWK+:} false; then :
13179  $as_echo_n "(cached) " >&6
13180else
13181  if test -n "$AWK"; then
13182  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13183else
13184as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13185for as_dir in $PATH
13186do
13187  IFS=$as_save_IFS
13188  test -z "$as_dir" && as_dir=.
13189    for ac_exec_ext in '' $ac_executable_extensions; do
13190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13191    ac_cv_prog_AWK="$ac_prog"
13192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13193    break 2
13194  fi
13195done
13196  done
13197IFS=$as_save_IFS
13198
13199fi
13200fi
13201AWK=$ac_cv_prog_AWK
13202if test -n "$AWK"; then
13203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13204$as_echo "$AWK" >&6; }
13205else
13206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13207$as_echo "no" >&6; }
13208fi
13209
13210
13211  test -n "$AWK" && break
13212done
13213
13214    else
13215      # If it succeeded, then it was overridden by the user. We will use it
13216      # for the tool.
13217
13218      # First remove it from the list of overridden variables, so we can test
13219      # for unknown variables in the end.
13220      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13221
13222      # Check if we try to supply an empty value
13223      if test "x$AWK" = x; then
13224        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13225$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13226        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13227$as_echo_n "checking for AWK... " >&6; }
13228        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13229$as_echo "disabled" >&6; }
13230      else
13231        # Check if the provided tool contains a complete path.
13232        tool_specified="$AWK"
13233        tool_basename="${tool_specified##*/}"
13234        if test "x$tool_basename" = "x$tool_specified"; then
13235          # A command without a complete path is provided, search $PATH.
13236          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13237$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13238          # Extract the first word of "$tool_basename", so it can be a program name with args.
13239set dummy $tool_basename; ac_word=$2
13240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13241$as_echo_n "checking for $ac_word... " >&6; }
13242if ${ac_cv_path_AWK+:} false; then :
13243  $as_echo_n "(cached) " >&6
13244else
13245  case $AWK in
13246  [\\/]* | ?:[\\/]*)
13247  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13248  ;;
13249  *)
13250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13251for as_dir in $PATH
13252do
13253  IFS=$as_save_IFS
13254  test -z "$as_dir" && as_dir=.
13255    for ac_exec_ext in '' $ac_executable_extensions; do
13256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13257    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13259    break 2
13260  fi
13261done
13262  done
13263IFS=$as_save_IFS
13264
13265  ;;
13266esac
13267fi
13268AWK=$ac_cv_path_AWK
13269if test -n "$AWK"; then
13270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13271$as_echo "$AWK" >&6; }
13272else
13273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13274$as_echo "no" >&6; }
13275fi
13276
13277
13278          if test "x$AWK" = x; then
13279            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13280          fi
13281        else
13282          # Otherwise we believe it is a complete path. Use it as it is.
13283          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13284$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13285          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13286$as_echo_n "checking for AWK... " >&6; }
13287          if test ! -x "$tool_specified"; then
13288            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13289$as_echo "not found" >&6; }
13290            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13291          fi
13292          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13293$as_echo "$tool_specified" >&6; }
13294        fi
13295      fi
13296    fi
13297
13298  fi
13299
13300
13301  if test "x$AWK" = x; then
13302    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13303  fi
13304
13305
13306
13307
13308  # Publish this variable in the help.
13309
13310
13311  if [ -z "${GREP+x}" ]; then
13312    # The variable is not set by user, try to locate tool using the code snippet
13313    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13314$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13315if ${ac_cv_path_GREP+:} false; then :
13316  $as_echo_n "(cached) " >&6
13317else
13318  if test -z "$GREP"; then
13319  ac_path_GREP_found=false
13320  # Loop through the user's path and test for each of PROGNAME-LIST
13321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13322for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13323do
13324  IFS=$as_save_IFS
13325  test -z "$as_dir" && as_dir=.
13326    for ac_prog in grep ggrep; do
13327    for ac_exec_ext in '' $ac_executable_extensions; do
13328      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13329      as_fn_executable_p "$ac_path_GREP" || continue
13330# Check for GNU ac_path_GREP and select it if it is found.
13331  # Check for GNU $ac_path_GREP
13332case `"$ac_path_GREP" --version 2>&1` in
13333*GNU*)
13334  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13335*)
13336  ac_count=0
13337  $as_echo_n 0123456789 >"conftest.in"
13338  while :
13339  do
13340    cat "conftest.in" "conftest.in" >"conftest.tmp"
13341    mv "conftest.tmp" "conftest.in"
13342    cp "conftest.in" "conftest.nl"
13343    $as_echo 'GREP' >> "conftest.nl"
13344    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13345    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13346    as_fn_arith $ac_count + 1 && ac_count=$as_val
13347    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13348      # Best one so far, save it but keep looking for a better one
13349      ac_cv_path_GREP="$ac_path_GREP"
13350      ac_path_GREP_max=$ac_count
13351    fi
13352    # 10*(2^10) chars as input seems more than enough
13353    test $ac_count -gt 10 && break
13354  done
13355  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13356esac
13357
13358      $ac_path_GREP_found && break 3
13359    done
13360  done
13361  done
13362IFS=$as_save_IFS
13363  if test -z "$ac_cv_path_GREP"; then
13364    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13365  fi
13366else
13367  ac_cv_path_GREP=$GREP
13368fi
13369
13370fi
13371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13372$as_echo "$ac_cv_path_GREP" >&6; }
13373 GREP="$ac_cv_path_GREP"
13374
13375
13376  else
13377    # The variable is set, but is it from the command line or the environment?
13378
13379    # Try to remove the string !GREP! from our list.
13380    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13381    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13382      # If it failed, the variable was not from the command line. Ignore it,
13383      # but warn the user (except for BASH, which is always set by the calling BASH).
13384      if test "xGREP" != xBASH; then
13385        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13386$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13387      fi
13388      # Try to locate tool using the code snippet
13389      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13390$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13391if ${ac_cv_path_GREP+:} false; then :
13392  $as_echo_n "(cached) " >&6
13393else
13394  if test -z "$GREP"; then
13395  ac_path_GREP_found=false
13396  # Loop through the user's path and test for each of PROGNAME-LIST
13397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13398for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13399do
13400  IFS=$as_save_IFS
13401  test -z "$as_dir" && as_dir=.
13402    for ac_prog in grep ggrep; do
13403    for ac_exec_ext in '' $ac_executable_extensions; do
13404      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13405      as_fn_executable_p "$ac_path_GREP" || continue
13406# Check for GNU ac_path_GREP and select it if it is found.
13407  # Check for GNU $ac_path_GREP
13408case `"$ac_path_GREP" --version 2>&1` in
13409*GNU*)
13410  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13411*)
13412  ac_count=0
13413  $as_echo_n 0123456789 >"conftest.in"
13414  while :
13415  do
13416    cat "conftest.in" "conftest.in" >"conftest.tmp"
13417    mv "conftest.tmp" "conftest.in"
13418    cp "conftest.in" "conftest.nl"
13419    $as_echo 'GREP' >> "conftest.nl"
13420    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13421    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13422    as_fn_arith $ac_count + 1 && ac_count=$as_val
13423    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13424      # Best one so far, save it but keep looking for a better one
13425      ac_cv_path_GREP="$ac_path_GREP"
13426      ac_path_GREP_max=$ac_count
13427    fi
13428    # 10*(2^10) chars as input seems more than enough
13429    test $ac_count -gt 10 && break
13430  done
13431  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13432esac
13433
13434      $ac_path_GREP_found && break 3
13435    done
13436  done
13437  done
13438IFS=$as_save_IFS
13439  if test -z "$ac_cv_path_GREP"; then
13440    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13441  fi
13442else
13443  ac_cv_path_GREP=$GREP
13444fi
13445
13446fi
13447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13448$as_echo "$ac_cv_path_GREP" >&6; }
13449 GREP="$ac_cv_path_GREP"
13450
13451
13452    else
13453      # If it succeeded, then it was overridden by the user. We will use it
13454      # for the tool.
13455
13456      # First remove it from the list of overridden variables, so we can test
13457      # for unknown variables in the end.
13458      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13459
13460      # Check if we try to supply an empty value
13461      if test "x$GREP" = x; then
13462        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13463$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13464        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13465$as_echo_n "checking for GREP... " >&6; }
13466        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13467$as_echo "disabled" >&6; }
13468      else
13469        # Check if the provided tool contains a complete path.
13470        tool_specified="$GREP"
13471        tool_basename="${tool_specified##*/}"
13472        if test "x$tool_basename" = "x$tool_specified"; then
13473          # A command without a complete path is provided, search $PATH.
13474          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13475$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13476          # Extract the first word of "$tool_basename", so it can be a program name with args.
13477set dummy $tool_basename; ac_word=$2
13478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13479$as_echo_n "checking for $ac_word... " >&6; }
13480if ${ac_cv_path_GREP+:} false; then :
13481  $as_echo_n "(cached) " >&6
13482else
13483  case $GREP in
13484  [\\/]* | ?:[\\/]*)
13485  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13486  ;;
13487  *)
13488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13489for as_dir in $PATH
13490do
13491  IFS=$as_save_IFS
13492  test -z "$as_dir" && as_dir=.
13493    for ac_exec_ext in '' $ac_executable_extensions; do
13494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13495    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13497    break 2
13498  fi
13499done
13500  done
13501IFS=$as_save_IFS
13502
13503  ;;
13504esac
13505fi
13506GREP=$ac_cv_path_GREP
13507if test -n "$GREP"; then
13508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13509$as_echo "$GREP" >&6; }
13510else
13511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13512$as_echo "no" >&6; }
13513fi
13514
13515
13516          if test "x$GREP" = x; then
13517            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13518          fi
13519        else
13520          # Otherwise we believe it is a complete path. Use it as it is.
13521          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13522$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13523          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13524$as_echo_n "checking for GREP... " >&6; }
13525          if test ! -x "$tool_specified"; then
13526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13527$as_echo "not found" >&6; }
13528            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13529          fi
13530          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13531$as_echo "$tool_specified" >&6; }
13532        fi
13533      fi
13534    fi
13535
13536  fi
13537
13538
13539  if test "x$GREP" = x; then
13540    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13541  fi
13542
13543
13544
13545
13546  # Publish this variable in the help.
13547
13548
13549  if [ -z "${EGREP+x}" ]; then
13550    # The variable is not set by user, try to locate tool using the code snippet
13551    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13552$as_echo_n "checking for egrep... " >&6; }
13553if ${ac_cv_path_EGREP+:} false; then :
13554  $as_echo_n "(cached) " >&6
13555else
13556  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13557   then ac_cv_path_EGREP="$GREP -E"
13558   else
13559     if test -z "$EGREP"; then
13560  ac_path_EGREP_found=false
13561  # Loop through the user's path and test for each of PROGNAME-LIST
13562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13563for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13564do
13565  IFS=$as_save_IFS
13566  test -z "$as_dir" && as_dir=.
13567    for ac_prog in egrep; do
13568    for ac_exec_ext in '' $ac_executable_extensions; do
13569      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13570      as_fn_executable_p "$ac_path_EGREP" || continue
13571# Check for GNU ac_path_EGREP and select it if it is found.
13572  # Check for GNU $ac_path_EGREP
13573case `"$ac_path_EGREP" --version 2>&1` in
13574*GNU*)
13575  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13576*)
13577  ac_count=0
13578  $as_echo_n 0123456789 >"conftest.in"
13579  while :
13580  do
13581    cat "conftest.in" "conftest.in" >"conftest.tmp"
13582    mv "conftest.tmp" "conftest.in"
13583    cp "conftest.in" "conftest.nl"
13584    $as_echo 'EGREP' >> "conftest.nl"
13585    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13586    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13587    as_fn_arith $ac_count + 1 && ac_count=$as_val
13588    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13589      # Best one so far, save it but keep looking for a better one
13590      ac_cv_path_EGREP="$ac_path_EGREP"
13591      ac_path_EGREP_max=$ac_count
13592    fi
13593    # 10*(2^10) chars as input seems more than enough
13594    test $ac_count -gt 10 && break
13595  done
13596  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13597esac
13598
13599      $ac_path_EGREP_found && break 3
13600    done
13601  done
13602  done
13603IFS=$as_save_IFS
13604  if test -z "$ac_cv_path_EGREP"; then
13605    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13606  fi
13607else
13608  ac_cv_path_EGREP=$EGREP
13609fi
13610
13611   fi
13612fi
13613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13614$as_echo "$ac_cv_path_EGREP" >&6; }
13615 EGREP="$ac_cv_path_EGREP"
13616
13617
13618  else
13619    # The variable is set, but is it from the command line or the environment?
13620
13621    # Try to remove the string !EGREP! from our list.
13622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13624      # If it failed, the variable was not from the command line. Ignore it,
13625      # but warn the user (except for BASH, which is always set by the calling BASH).
13626      if test "xEGREP" != xBASH; then
13627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13628$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13629      fi
13630      # Try to locate tool using the code snippet
13631      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13632$as_echo_n "checking for egrep... " >&6; }
13633if ${ac_cv_path_EGREP+:} false; then :
13634  $as_echo_n "(cached) " >&6
13635else
13636  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13637   then ac_cv_path_EGREP="$GREP -E"
13638   else
13639     if test -z "$EGREP"; then
13640  ac_path_EGREP_found=false
13641  # Loop through the user's path and test for each of PROGNAME-LIST
13642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13643for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13644do
13645  IFS=$as_save_IFS
13646  test -z "$as_dir" && as_dir=.
13647    for ac_prog in egrep; do
13648    for ac_exec_ext in '' $ac_executable_extensions; do
13649      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13650      as_fn_executable_p "$ac_path_EGREP" || continue
13651# Check for GNU ac_path_EGREP and select it if it is found.
13652  # Check for GNU $ac_path_EGREP
13653case `"$ac_path_EGREP" --version 2>&1` in
13654*GNU*)
13655  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13656*)
13657  ac_count=0
13658  $as_echo_n 0123456789 >"conftest.in"
13659  while :
13660  do
13661    cat "conftest.in" "conftest.in" >"conftest.tmp"
13662    mv "conftest.tmp" "conftest.in"
13663    cp "conftest.in" "conftest.nl"
13664    $as_echo 'EGREP' >> "conftest.nl"
13665    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13666    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13667    as_fn_arith $ac_count + 1 && ac_count=$as_val
13668    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13669      # Best one so far, save it but keep looking for a better one
13670      ac_cv_path_EGREP="$ac_path_EGREP"
13671      ac_path_EGREP_max=$ac_count
13672    fi
13673    # 10*(2^10) chars as input seems more than enough
13674    test $ac_count -gt 10 && break
13675  done
13676  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13677esac
13678
13679      $ac_path_EGREP_found && break 3
13680    done
13681  done
13682  done
13683IFS=$as_save_IFS
13684  if test -z "$ac_cv_path_EGREP"; then
13685    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13686  fi
13687else
13688  ac_cv_path_EGREP=$EGREP
13689fi
13690
13691   fi
13692fi
13693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13694$as_echo "$ac_cv_path_EGREP" >&6; }
13695 EGREP="$ac_cv_path_EGREP"
13696
13697
13698    else
13699      # If it succeeded, then it was overridden by the user. We will use it
13700      # for the tool.
13701
13702      # First remove it from the list of overridden variables, so we can test
13703      # for unknown variables in the end.
13704      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13705
13706      # Check if we try to supply an empty value
13707      if test "x$EGREP" = x; then
13708        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13709$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13710        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13711$as_echo_n "checking for EGREP... " >&6; }
13712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13713$as_echo "disabled" >&6; }
13714      else
13715        # Check if the provided tool contains a complete path.
13716        tool_specified="$EGREP"
13717        tool_basename="${tool_specified##*/}"
13718        if test "x$tool_basename" = "x$tool_specified"; then
13719          # A command without a complete path is provided, search $PATH.
13720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13721$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13722          # Extract the first word of "$tool_basename", so it can be a program name with args.
13723set dummy $tool_basename; ac_word=$2
13724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13725$as_echo_n "checking for $ac_word... " >&6; }
13726if ${ac_cv_path_EGREP+:} false; then :
13727  $as_echo_n "(cached) " >&6
13728else
13729  case $EGREP in
13730  [\\/]* | ?:[\\/]*)
13731  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13732  ;;
13733  *)
13734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13735for as_dir in $PATH
13736do
13737  IFS=$as_save_IFS
13738  test -z "$as_dir" && as_dir=.
13739    for ac_exec_ext in '' $ac_executable_extensions; do
13740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13741    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13743    break 2
13744  fi
13745done
13746  done
13747IFS=$as_save_IFS
13748
13749  ;;
13750esac
13751fi
13752EGREP=$ac_cv_path_EGREP
13753if test -n "$EGREP"; then
13754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13755$as_echo "$EGREP" >&6; }
13756else
13757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13758$as_echo "no" >&6; }
13759fi
13760
13761
13762          if test "x$EGREP" = x; then
13763            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13764          fi
13765        else
13766          # Otherwise we believe it is a complete path. Use it as it is.
13767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13768$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13769          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13770$as_echo_n "checking for EGREP... " >&6; }
13771          if test ! -x "$tool_specified"; then
13772            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13773$as_echo "not found" >&6; }
13774            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13775          fi
13776          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13777$as_echo "$tool_specified" >&6; }
13778        fi
13779      fi
13780    fi
13781
13782  fi
13783
13784
13785  if test "x$EGREP" = x; then
13786    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13787  fi
13788
13789
13790
13791
13792  # Publish this variable in the help.
13793
13794
13795  if [ -z "${FGREP+x}" ]; then
13796    # The variable is not set by user, try to locate tool using the code snippet
13797    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13798$as_echo_n "checking for fgrep... " >&6; }
13799if ${ac_cv_path_FGREP+:} false; then :
13800  $as_echo_n "(cached) " >&6
13801else
13802  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13803   then ac_cv_path_FGREP="$GREP -F"
13804   else
13805     if test -z "$FGREP"; then
13806  ac_path_FGREP_found=false
13807  # Loop through the user's path and test for each of PROGNAME-LIST
13808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13809for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13810do
13811  IFS=$as_save_IFS
13812  test -z "$as_dir" && as_dir=.
13813    for ac_prog in fgrep; do
13814    for ac_exec_ext in '' $ac_executable_extensions; do
13815      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13816      as_fn_executable_p "$ac_path_FGREP" || continue
13817# Check for GNU ac_path_FGREP and select it if it is found.
13818  # Check for GNU $ac_path_FGREP
13819case `"$ac_path_FGREP" --version 2>&1` in
13820*GNU*)
13821  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13822*)
13823  ac_count=0
13824  $as_echo_n 0123456789 >"conftest.in"
13825  while :
13826  do
13827    cat "conftest.in" "conftest.in" >"conftest.tmp"
13828    mv "conftest.tmp" "conftest.in"
13829    cp "conftest.in" "conftest.nl"
13830    $as_echo 'FGREP' >> "conftest.nl"
13831    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13832    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13833    as_fn_arith $ac_count + 1 && ac_count=$as_val
13834    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13835      # Best one so far, save it but keep looking for a better one
13836      ac_cv_path_FGREP="$ac_path_FGREP"
13837      ac_path_FGREP_max=$ac_count
13838    fi
13839    # 10*(2^10) chars as input seems more than enough
13840    test $ac_count -gt 10 && break
13841  done
13842  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13843esac
13844
13845      $ac_path_FGREP_found && break 3
13846    done
13847  done
13848  done
13849IFS=$as_save_IFS
13850  if test -z "$ac_cv_path_FGREP"; then
13851    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13852  fi
13853else
13854  ac_cv_path_FGREP=$FGREP
13855fi
13856
13857   fi
13858fi
13859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13860$as_echo "$ac_cv_path_FGREP" >&6; }
13861 FGREP="$ac_cv_path_FGREP"
13862
13863
13864  else
13865    # The variable is set, but is it from the command line or the environment?
13866
13867    # Try to remove the string !FGREP! from our list.
13868    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13869    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13870      # If it failed, the variable was not from the command line. Ignore it,
13871      # but warn the user (except for BASH, which is always set by the calling BASH).
13872      if test "xFGREP" != xBASH; then
13873        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13874$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13875      fi
13876      # Try to locate tool using the code snippet
13877      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13878$as_echo_n "checking for fgrep... " >&6; }
13879if ${ac_cv_path_FGREP+:} false; then :
13880  $as_echo_n "(cached) " >&6
13881else
13882  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13883   then ac_cv_path_FGREP="$GREP -F"
13884   else
13885     if test -z "$FGREP"; then
13886  ac_path_FGREP_found=false
13887  # Loop through the user's path and test for each of PROGNAME-LIST
13888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13889for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13890do
13891  IFS=$as_save_IFS
13892  test -z "$as_dir" && as_dir=.
13893    for ac_prog in fgrep; do
13894    for ac_exec_ext in '' $ac_executable_extensions; do
13895      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13896      as_fn_executable_p "$ac_path_FGREP" || continue
13897# Check for GNU ac_path_FGREP and select it if it is found.
13898  # Check for GNU $ac_path_FGREP
13899case `"$ac_path_FGREP" --version 2>&1` in
13900*GNU*)
13901  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13902*)
13903  ac_count=0
13904  $as_echo_n 0123456789 >"conftest.in"
13905  while :
13906  do
13907    cat "conftest.in" "conftest.in" >"conftest.tmp"
13908    mv "conftest.tmp" "conftest.in"
13909    cp "conftest.in" "conftest.nl"
13910    $as_echo 'FGREP' >> "conftest.nl"
13911    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13912    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13913    as_fn_arith $ac_count + 1 && ac_count=$as_val
13914    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13915      # Best one so far, save it but keep looking for a better one
13916      ac_cv_path_FGREP="$ac_path_FGREP"
13917      ac_path_FGREP_max=$ac_count
13918    fi
13919    # 10*(2^10) chars as input seems more than enough
13920    test $ac_count -gt 10 && break
13921  done
13922  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13923esac
13924
13925      $ac_path_FGREP_found && break 3
13926    done
13927  done
13928  done
13929IFS=$as_save_IFS
13930  if test -z "$ac_cv_path_FGREP"; then
13931    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13932  fi
13933else
13934  ac_cv_path_FGREP=$FGREP
13935fi
13936
13937   fi
13938fi
13939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13940$as_echo "$ac_cv_path_FGREP" >&6; }
13941 FGREP="$ac_cv_path_FGREP"
13942
13943
13944    else
13945      # If it succeeded, then it was overridden by the user. We will use it
13946      # for the tool.
13947
13948      # First remove it from the list of overridden variables, so we can test
13949      # for unknown variables in the end.
13950      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13951
13952      # Check if we try to supply an empty value
13953      if test "x$FGREP" = x; then
13954        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13955$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13956        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13957$as_echo_n "checking for FGREP... " >&6; }
13958        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13959$as_echo "disabled" >&6; }
13960      else
13961        # Check if the provided tool contains a complete path.
13962        tool_specified="$FGREP"
13963        tool_basename="${tool_specified##*/}"
13964        if test "x$tool_basename" = "x$tool_specified"; then
13965          # A command without a complete path is provided, search $PATH.
13966          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13967$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13968          # Extract the first word of "$tool_basename", so it can be a program name with args.
13969set dummy $tool_basename; ac_word=$2
13970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13971$as_echo_n "checking for $ac_word... " >&6; }
13972if ${ac_cv_path_FGREP+:} false; then :
13973  $as_echo_n "(cached) " >&6
13974else
13975  case $FGREP in
13976  [\\/]* | ?:[\\/]*)
13977  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13978  ;;
13979  *)
13980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13981for as_dir in $PATH
13982do
13983  IFS=$as_save_IFS
13984  test -z "$as_dir" && as_dir=.
13985    for ac_exec_ext in '' $ac_executable_extensions; do
13986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13987    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13989    break 2
13990  fi
13991done
13992  done
13993IFS=$as_save_IFS
13994
13995  ;;
13996esac
13997fi
13998FGREP=$ac_cv_path_FGREP
13999if test -n "$FGREP"; then
14000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14001$as_echo "$FGREP" >&6; }
14002else
14003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14004$as_echo "no" >&6; }
14005fi
14006
14007
14008          if test "x$FGREP" = x; then
14009            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14010          fi
14011        else
14012          # Otherwise we believe it is a complete path. Use it as it is.
14013          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14014$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14015          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14016$as_echo_n "checking for FGREP... " >&6; }
14017          if test ! -x "$tool_specified"; then
14018            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14019$as_echo "not found" >&6; }
14020            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14021          fi
14022          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14023$as_echo "$tool_specified" >&6; }
14024        fi
14025      fi
14026    fi
14027
14028  fi
14029
14030
14031  if test "x$FGREP" = x; then
14032    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14033  fi
14034
14035
14036
14037
14038  # Publish this variable in the help.
14039
14040
14041  if [ -z "${SED+x}" ]; then
14042    # The variable is not set by user, try to locate tool using the code snippet
14043    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14044$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14045if ${ac_cv_path_SED+:} false; then :
14046  $as_echo_n "(cached) " >&6
14047else
14048            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14049     for ac_i in 1 2 3 4 5 6 7; do
14050       ac_script="$ac_script$as_nl$ac_script"
14051     done
14052     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14053     { ac_script=; unset ac_script;}
14054     if test -z "$SED"; then
14055  ac_path_SED_found=false
14056  # Loop through the user's path and test for each of PROGNAME-LIST
14057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14058for as_dir in $PATH
14059do
14060  IFS=$as_save_IFS
14061  test -z "$as_dir" && as_dir=.
14062    for ac_prog in sed gsed; do
14063    for ac_exec_ext in '' $ac_executable_extensions; do
14064      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14065      as_fn_executable_p "$ac_path_SED" || continue
14066# Check for GNU ac_path_SED and select it if it is found.
14067  # Check for GNU $ac_path_SED
14068case `"$ac_path_SED" --version 2>&1` in
14069*GNU*)
14070  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14071*)
14072  ac_count=0
14073  $as_echo_n 0123456789 >"conftest.in"
14074  while :
14075  do
14076    cat "conftest.in" "conftest.in" >"conftest.tmp"
14077    mv "conftest.tmp" "conftest.in"
14078    cp "conftest.in" "conftest.nl"
14079    $as_echo '' >> "conftest.nl"
14080    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14081    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14082    as_fn_arith $ac_count + 1 && ac_count=$as_val
14083    if test $ac_count -gt ${ac_path_SED_max-0}; then
14084      # Best one so far, save it but keep looking for a better one
14085      ac_cv_path_SED="$ac_path_SED"
14086      ac_path_SED_max=$ac_count
14087    fi
14088    # 10*(2^10) chars as input seems more than enough
14089    test $ac_count -gt 10 && break
14090  done
14091  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14092esac
14093
14094      $ac_path_SED_found && break 3
14095    done
14096  done
14097  done
14098IFS=$as_save_IFS
14099  if test -z "$ac_cv_path_SED"; then
14100    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14101  fi
14102else
14103  ac_cv_path_SED=$SED
14104fi
14105
14106fi
14107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14108$as_echo "$ac_cv_path_SED" >&6; }
14109 SED="$ac_cv_path_SED"
14110  rm -f conftest.sed
14111
14112  else
14113    # The variable is set, but is it from the command line or the environment?
14114
14115    # Try to remove the string !SED! from our list.
14116    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14117    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14118      # If it failed, the variable was not from the command line. Ignore it,
14119      # but warn the user (except for BASH, which is always set by the calling BASH).
14120      if test "xSED" != xBASH; then
14121        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14122$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14123      fi
14124      # Try to locate tool using the code snippet
14125      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14126$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14127if ${ac_cv_path_SED+:} false; then :
14128  $as_echo_n "(cached) " >&6
14129else
14130            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14131     for ac_i in 1 2 3 4 5 6 7; do
14132       ac_script="$ac_script$as_nl$ac_script"
14133     done
14134     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14135     { ac_script=; unset ac_script;}
14136     if test -z "$SED"; then
14137  ac_path_SED_found=false
14138  # Loop through the user's path and test for each of PROGNAME-LIST
14139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14140for as_dir in $PATH
14141do
14142  IFS=$as_save_IFS
14143  test -z "$as_dir" && as_dir=.
14144    for ac_prog in sed gsed; do
14145    for ac_exec_ext in '' $ac_executable_extensions; do
14146      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14147      as_fn_executable_p "$ac_path_SED" || continue
14148# Check for GNU ac_path_SED and select it if it is found.
14149  # Check for GNU $ac_path_SED
14150case `"$ac_path_SED" --version 2>&1` in
14151*GNU*)
14152  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14153*)
14154  ac_count=0
14155  $as_echo_n 0123456789 >"conftest.in"
14156  while :
14157  do
14158    cat "conftest.in" "conftest.in" >"conftest.tmp"
14159    mv "conftest.tmp" "conftest.in"
14160    cp "conftest.in" "conftest.nl"
14161    $as_echo '' >> "conftest.nl"
14162    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14163    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14164    as_fn_arith $ac_count + 1 && ac_count=$as_val
14165    if test $ac_count -gt ${ac_path_SED_max-0}; then
14166      # Best one so far, save it but keep looking for a better one
14167      ac_cv_path_SED="$ac_path_SED"
14168      ac_path_SED_max=$ac_count
14169    fi
14170    # 10*(2^10) chars as input seems more than enough
14171    test $ac_count -gt 10 && break
14172  done
14173  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14174esac
14175
14176      $ac_path_SED_found && break 3
14177    done
14178  done
14179  done
14180IFS=$as_save_IFS
14181  if test -z "$ac_cv_path_SED"; then
14182    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14183  fi
14184else
14185  ac_cv_path_SED=$SED
14186fi
14187
14188fi
14189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14190$as_echo "$ac_cv_path_SED" >&6; }
14191 SED="$ac_cv_path_SED"
14192  rm -f conftest.sed
14193
14194    else
14195      # If it succeeded, then it was overridden by the user. We will use it
14196      # for the tool.
14197
14198      # First remove it from the list of overridden variables, so we can test
14199      # for unknown variables in the end.
14200      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14201
14202      # Check if we try to supply an empty value
14203      if test "x$SED" = x; then
14204        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14205$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14206        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14207$as_echo_n "checking for SED... " >&6; }
14208        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14209$as_echo "disabled" >&6; }
14210      else
14211        # Check if the provided tool contains a complete path.
14212        tool_specified="$SED"
14213        tool_basename="${tool_specified##*/}"
14214        if test "x$tool_basename" = "x$tool_specified"; then
14215          # A command without a complete path is provided, search $PATH.
14216          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14217$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14218          # Extract the first word of "$tool_basename", so it can be a program name with args.
14219set dummy $tool_basename; ac_word=$2
14220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14221$as_echo_n "checking for $ac_word... " >&6; }
14222if ${ac_cv_path_SED+:} false; then :
14223  $as_echo_n "(cached) " >&6
14224else
14225  case $SED in
14226  [\\/]* | ?:[\\/]*)
14227  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14228  ;;
14229  *)
14230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14231for as_dir in $PATH
14232do
14233  IFS=$as_save_IFS
14234  test -z "$as_dir" && as_dir=.
14235    for ac_exec_ext in '' $ac_executable_extensions; do
14236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14237    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14239    break 2
14240  fi
14241done
14242  done
14243IFS=$as_save_IFS
14244
14245  ;;
14246esac
14247fi
14248SED=$ac_cv_path_SED
14249if test -n "$SED"; then
14250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14251$as_echo "$SED" >&6; }
14252else
14253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14254$as_echo "no" >&6; }
14255fi
14256
14257
14258          if test "x$SED" = x; then
14259            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14260          fi
14261        else
14262          # Otherwise we believe it is a complete path. Use it as it is.
14263          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14264$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14265          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14266$as_echo_n "checking for SED... " >&6; }
14267          if test ! -x "$tool_specified"; then
14268            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14269$as_echo "not found" >&6; }
14270            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14271          fi
14272          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14273$as_echo "$tool_specified" >&6; }
14274        fi
14275      fi
14276    fi
14277
14278  fi
14279
14280
14281  if test "x$SED" = x; then
14282    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14283  fi
14284
14285
14286
14287  # Always force rm.
14288  RM="$RM -f"
14289
14290  # pwd behaves differently on various platforms and some don't support the -L flag.
14291  # Always use the bash builtin pwd to get uniform behavior.
14292  THEPWDCMD=pwd
14293
14294  # These are not required on all platforms
14295
14296
14297  # Publish this variable in the help.
14298
14299
14300  if [ -z "${CYGPATH+x}" ]; then
14301    # The variable is not set by user, try to locate tool using the code snippet
14302    for ac_prog in cygpath
14303do
14304  # Extract the first word of "$ac_prog", so it can be a program name with args.
14305set dummy $ac_prog; ac_word=$2
14306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14307$as_echo_n "checking for $ac_word... " >&6; }
14308if ${ac_cv_path_CYGPATH+:} false; then :
14309  $as_echo_n "(cached) " >&6
14310else
14311  case $CYGPATH in
14312  [\\/]* | ?:[\\/]*)
14313  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14314  ;;
14315  *)
14316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14317for as_dir in $PATH
14318do
14319  IFS=$as_save_IFS
14320  test -z "$as_dir" && as_dir=.
14321    for ac_exec_ext in '' $ac_executable_extensions; do
14322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14323    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14325    break 2
14326  fi
14327done
14328  done
14329IFS=$as_save_IFS
14330
14331  ;;
14332esac
14333fi
14334CYGPATH=$ac_cv_path_CYGPATH
14335if test -n "$CYGPATH"; then
14336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14337$as_echo "$CYGPATH" >&6; }
14338else
14339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14340$as_echo "no" >&6; }
14341fi
14342
14343
14344  test -n "$CYGPATH" && break
14345done
14346
14347  else
14348    # The variable is set, but is it from the command line or the environment?
14349
14350    # Try to remove the string !CYGPATH! from our list.
14351    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14352    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14353      # If it failed, the variable was not from the command line. Ignore it,
14354      # but warn the user (except for BASH, which is always set by the calling BASH).
14355      if test "xCYGPATH" != xBASH; then
14356        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14357$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14358      fi
14359      # Try to locate tool using the code snippet
14360      for ac_prog in cygpath
14361do
14362  # Extract the first word of "$ac_prog", so it can be a program name with args.
14363set dummy $ac_prog; ac_word=$2
14364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14365$as_echo_n "checking for $ac_word... " >&6; }
14366if ${ac_cv_path_CYGPATH+:} false; then :
14367  $as_echo_n "(cached) " >&6
14368else
14369  case $CYGPATH in
14370  [\\/]* | ?:[\\/]*)
14371  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14372  ;;
14373  *)
14374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14375for as_dir in $PATH
14376do
14377  IFS=$as_save_IFS
14378  test -z "$as_dir" && as_dir=.
14379    for ac_exec_ext in '' $ac_executable_extensions; do
14380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14381    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14383    break 2
14384  fi
14385done
14386  done
14387IFS=$as_save_IFS
14388
14389  ;;
14390esac
14391fi
14392CYGPATH=$ac_cv_path_CYGPATH
14393if test -n "$CYGPATH"; then
14394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14395$as_echo "$CYGPATH" >&6; }
14396else
14397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14398$as_echo "no" >&6; }
14399fi
14400
14401
14402  test -n "$CYGPATH" && break
14403done
14404
14405    else
14406      # If it succeeded, then it was overridden by the user. We will use it
14407      # for the tool.
14408
14409      # First remove it from the list of overridden variables, so we can test
14410      # for unknown variables in the end.
14411      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14412
14413      # Check if we try to supply an empty value
14414      if test "x$CYGPATH" = x; then
14415        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14416$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14417        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14418$as_echo_n "checking for CYGPATH... " >&6; }
14419        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14420$as_echo "disabled" >&6; }
14421      else
14422        # Check if the provided tool contains a complete path.
14423        tool_specified="$CYGPATH"
14424        tool_basename="${tool_specified##*/}"
14425        if test "x$tool_basename" = "x$tool_specified"; then
14426          # A command without a complete path is provided, search $PATH.
14427          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14428$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14429          # Extract the first word of "$tool_basename", so it can be a program name with args.
14430set dummy $tool_basename; ac_word=$2
14431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14432$as_echo_n "checking for $ac_word... " >&6; }
14433if ${ac_cv_path_CYGPATH+:} false; then :
14434  $as_echo_n "(cached) " >&6
14435else
14436  case $CYGPATH in
14437  [\\/]* | ?:[\\/]*)
14438  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14439  ;;
14440  *)
14441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14442for as_dir in $PATH
14443do
14444  IFS=$as_save_IFS
14445  test -z "$as_dir" && as_dir=.
14446    for ac_exec_ext in '' $ac_executable_extensions; do
14447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14448    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14450    break 2
14451  fi
14452done
14453  done
14454IFS=$as_save_IFS
14455
14456  ;;
14457esac
14458fi
14459CYGPATH=$ac_cv_path_CYGPATH
14460if test -n "$CYGPATH"; then
14461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14462$as_echo "$CYGPATH" >&6; }
14463else
14464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14465$as_echo "no" >&6; }
14466fi
14467
14468
14469          if test "x$CYGPATH" = x; then
14470            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14471          fi
14472        else
14473          # Otherwise we believe it is a complete path. Use it as it is.
14474          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14475$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14476          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14477$as_echo_n "checking for CYGPATH... " >&6; }
14478          if test ! -x "$tool_specified"; then
14479            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14480$as_echo "not found" >&6; }
14481            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14482          fi
14483          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14484$as_echo "$tool_specified" >&6; }
14485        fi
14486      fi
14487    fi
14488
14489  fi
14490
14491
14492
14493
14494  # Publish this variable in the help.
14495
14496
14497  if [ -z "${READLINK+x}" ]; then
14498    # The variable is not set by user, try to locate tool using the code snippet
14499    for ac_prog in greadlink readlink
14500do
14501  # Extract the first word of "$ac_prog", so it can be a program name with args.
14502set dummy $ac_prog; ac_word=$2
14503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14504$as_echo_n "checking for $ac_word... " >&6; }
14505if ${ac_cv_path_READLINK+:} false; then :
14506  $as_echo_n "(cached) " >&6
14507else
14508  case $READLINK in
14509  [\\/]* | ?:[\\/]*)
14510  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14511  ;;
14512  *)
14513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14514for as_dir in $PATH
14515do
14516  IFS=$as_save_IFS
14517  test -z "$as_dir" && as_dir=.
14518    for ac_exec_ext in '' $ac_executable_extensions; do
14519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14520    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14522    break 2
14523  fi
14524done
14525  done
14526IFS=$as_save_IFS
14527
14528  ;;
14529esac
14530fi
14531READLINK=$ac_cv_path_READLINK
14532if test -n "$READLINK"; then
14533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14534$as_echo "$READLINK" >&6; }
14535else
14536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14537$as_echo "no" >&6; }
14538fi
14539
14540
14541  test -n "$READLINK" && break
14542done
14543
14544  else
14545    # The variable is set, but is it from the command line or the environment?
14546
14547    # Try to remove the string !READLINK! from our list.
14548    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14549    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14550      # If it failed, the variable was not from the command line. Ignore it,
14551      # but warn the user (except for BASH, which is always set by the calling BASH).
14552      if test "xREADLINK" != xBASH; then
14553        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14554$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14555      fi
14556      # Try to locate tool using the code snippet
14557      for ac_prog in greadlink readlink
14558do
14559  # Extract the first word of "$ac_prog", so it can be a program name with args.
14560set dummy $ac_prog; ac_word=$2
14561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14562$as_echo_n "checking for $ac_word... " >&6; }
14563if ${ac_cv_path_READLINK+:} false; then :
14564  $as_echo_n "(cached) " >&6
14565else
14566  case $READLINK in
14567  [\\/]* | ?:[\\/]*)
14568  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14569  ;;
14570  *)
14571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14572for as_dir in $PATH
14573do
14574  IFS=$as_save_IFS
14575  test -z "$as_dir" && as_dir=.
14576    for ac_exec_ext in '' $ac_executable_extensions; do
14577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14578    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14580    break 2
14581  fi
14582done
14583  done
14584IFS=$as_save_IFS
14585
14586  ;;
14587esac
14588fi
14589READLINK=$ac_cv_path_READLINK
14590if test -n "$READLINK"; then
14591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14592$as_echo "$READLINK" >&6; }
14593else
14594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14595$as_echo "no" >&6; }
14596fi
14597
14598
14599  test -n "$READLINK" && break
14600done
14601
14602    else
14603      # If it succeeded, then it was overridden by the user. We will use it
14604      # for the tool.
14605
14606      # First remove it from the list of overridden variables, so we can test
14607      # for unknown variables in the end.
14608      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14609
14610      # Check if we try to supply an empty value
14611      if test "x$READLINK" = x; then
14612        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14613$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14614        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14615$as_echo_n "checking for READLINK... " >&6; }
14616        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14617$as_echo "disabled" >&6; }
14618      else
14619        # Check if the provided tool contains a complete path.
14620        tool_specified="$READLINK"
14621        tool_basename="${tool_specified##*/}"
14622        if test "x$tool_basename" = "x$tool_specified"; then
14623          # A command without a complete path is provided, search $PATH.
14624          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14625$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14626          # Extract the first word of "$tool_basename", so it can be a program name with args.
14627set dummy $tool_basename; ac_word=$2
14628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14629$as_echo_n "checking for $ac_word... " >&6; }
14630if ${ac_cv_path_READLINK+:} false; then :
14631  $as_echo_n "(cached) " >&6
14632else
14633  case $READLINK in
14634  [\\/]* | ?:[\\/]*)
14635  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14636  ;;
14637  *)
14638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14639for as_dir in $PATH
14640do
14641  IFS=$as_save_IFS
14642  test -z "$as_dir" && as_dir=.
14643    for ac_exec_ext in '' $ac_executable_extensions; do
14644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14645    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14647    break 2
14648  fi
14649done
14650  done
14651IFS=$as_save_IFS
14652
14653  ;;
14654esac
14655fi
14656READLINK=$ac_cv_path_READLINK
14657if test -n "$READLINK"; then
14658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14659$as_echo "$READLINK" >&6; }
14660else
14661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14662$as_echo "no" >&6; }
14663fi
14664
14665
14666          if test "x$READLINK" = x; then
14667            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14668          fi
14669        else
14670          # Otherwise we believe it is a complete path. Use it as it is.
14671          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14672$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14673          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14674$as_echo_n "checking for READLINK... " >&6; }
14675          if test ! -x "$tool_specified"; then
14676            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14677$as_echo "not found" >&6; }
14678            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14679          fi
14680          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14681$as_echo "$tool_specified" >&6; }
14682        fi
14683      fi
14684    fi
14685
14686  fi
14687
14688
14689
14690
14691  # Publish this variable in the help.
14692
14693
14694  if [ -z "${DF+x}" ]; then
14695    # The variable is not set by user, try to locate tool using the code snippet
14696    for ac_prog in df
14697do
14698  # Extract the first word of "$ac_prog", so it can be a program name with args.
14699set dummy $ac_prog; ac_word=$2
14700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14701$as_echo_n "checking for $ac_word... " >&6; }
14702if ${ac_cv_path_DF+:} false; then :
14703  $as_echo_n "(cached) " >&6
14704else
14705  case $DF in
14706  [\\/]* | ?:[\\/]*)
14707  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14708  ;;
14709  *)
14710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14711for as_dir in $PATH
14712do
14713  IFS=$as_save_IFS
14714  test -z "$as_dir" && as_dir=.
14715    for ac_exec_ext in '' $ac_executable_extensions; do
14716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14717    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14719    break 2
14720  fi
14721done
14722  done
14723IFS=$as_save_IFS
14724
14725  ;;
14726esac
14727fi
14728DF=$ac_cv_path_DF
14729if test -n "$DF"; then
14730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14731$as_echo "$DF" >&6; }
14732else
14733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14734$as_echo "no" >&6; }
14735fi
14736
14737
14738  test -n "$DF" && break
14739done
14740
14741  else
14742    # The variable is set, but is it from the command line or the environment?
14743
14744    # Try to remove the string !DF! from our list.
14745    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14746    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14747      # If it failed, the variable was not from the command line. Ignore it,
14748      # but warn the user (except for BASH, which is always set by the calling BASH).
14749      if test "xDF" != xBASH; then
14750        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14751$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14752      fi
14753      # Try to locate tool using the code snippet
14754      for ac_prog in df
14755do
14756  # Extract the first word of "$ac_prog", so it can be a program name with args.
14757set dummy $ac_prog; ac_word=$2
14758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14759$as_echo_n "checking for $ac_word... " >&6; }
14760if ${ac_cv_path_DF+:} false; then :
14761  $as_echo_n "(cached) " >&6
14762else
14763  case $DF in
14764  [\\/]* | ?:[\\/]*)
14765  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14766  ;;
14767  *)
14768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14769for as_dir in $PATH
14770do
14771  IFS=$as_save_IFS
14772  test -z "$as_dir" && as_dir=.
14773    for ac_exec_ext in '' $ac_executable_extensions; do
14774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14775    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14777    break 2
14778  fi
14779done
14780  done
14781IFS=$as_save_IFS
14782
14783  ;;
14784esac
14785fi
14786DF=$ac_cv_path_DF
14787if test -n "$DF"; then
14788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14789$as_echo "$DF" >&6; }
14790else
14791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14792$as_echo "no" >&6; }
14793fi
14794
14795
14796  test -n "$DF" && break
14797done
14798
14799    else
14800      # If it succeeded, then it was overridden by the user. We will use it
14801      # for the tool.
14802
14803      # First remove it from the list of overridden variables, so we can test
14804      # for unknown variables in the end.
14805      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14806
14807      # Check if we try to supply an empty value
14808      if test "x$DF" = x; then
14809        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14810$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14811        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14812$as_echo_n "checking for DF... " >&6; }
14813        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14814$as_echo "disabled" >&6; }
14815      else
14816        # Check if the provided tool contains a complete path.
14817        tool_specified="$DF"
14818        tool_basename="${tool_specified##*/}"
14819        if test "x$tool_basename" = "x$tool_specified"; then
14820          # A command without a complete path is provided, search $PATH.
14821          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14822$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14823          # Extract the first word of "$tool_basename", so it can be a program name with args.
14824set dummy $tool_basename; ac_word=$2
14825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14826$as_echo_n "checking for $ac_word... " >&6; }
14827if ${ac_cv_path_DF+:} false; then :
14828  $as_echo_n "(cached) " >&6
14829else
14830  case $DF in
14831  [\\/]* | ?:[\\/]*)
14832  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14833  ;;
14834  *)
14835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14836for as_dir in $PATH
14837do
14838  IFS=$as_save_IFS
14839  test -z "$as_dir" && as_dir=.
14840    for ac_exec_ext in '' $ac_executable_extensions; do
14841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14842    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14844    break 2
14845  fi
14846done
14847  done
14848IFS=$as_save_IFS
14849
14850  ;;
14851esac
14852fi
14853DF=$ac_cv_path_DF
14854if test -n "$DF"; then
14855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14856$as_echo "$DF" >&6; }
14857else
14858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14859$as_echo "no" >&6; }
14860fi
14861
14862
14863          if test "x$DF" = x; then
14864            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14865          fi
14866        else
14867          # Otherwise we believe it is a complete path. Use it as it is.
14868          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14869$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14870          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14871$as_echo_n "checking for DF... " >&6; }
14872          if test ! -x "$tool_specified"; then
14873            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14874$as_echo "not found" >&6; }
14875            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14876          fi
14877          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14878$as_echo "$tool_specified" >&6; }
14879        fi
14880      fi
14881    fi
14882
14883  fi
14884
14885
14886
14887
14888  # Publish this variable in the help.
14889
14890
14891  if [ -z "${CPIO+x}" ]; then
14892    # The variable is not set by user, try to locate tool using the code snippet
14893    for ac_prog in cpio bsdcpio
14894do
14895  # Extract the first word of "$ac_prog", so it can be a program name with args.
14896set dummy $ac_prog; ac_word=$2
14897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14898$as_echo_n "checking for $ac_word... " >&6; }
14899if ${ac_cv_path_CPIO+:} false; then :
14900  $as_echo_n "(cached) " >&6
14901else
14902  case $CPIO in
14903  [\\/]* | ?:[\\/]*)
14904  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14905  ;;
14906  *)
14907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14908for as_dir in $PATH
14909do
14910  IFS=$as_save_IFS
14911  test -z "$as_dir" && as_dir=.
14912    for ac_exec_ext in '' $ac_executable_extensions; do
14913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14914    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14916    break 2
14917  fi
14918done
14919  done
14920IFS=$as_save_IFS
14921
14922  ;;
14923esac
14924fi
14925CPIO=$ac_cv_path_CPIO
14926if test -n "$CPIO"; then
14927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14928$as_echo "$CPIO" >&6; }
14929else
14930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14931$as_echo "no" >&6; }
14932fi
14933
14934
14935  test -n "$CPIO" && break
14936done
14937
14938  else
14939    # The variable is set, but is it from the command line or the environment?
14940
14941    # Try to remove the string !CPIO! from our list.
14942    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14943    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14944      # If it failed, the variable was not from the command line. Ignore it,
14945      # but warn the user (except for BASH, which is always set by the calling BASH).
14946      if test "xCPIO" != xBASH; then
14947        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14948$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14949      fi
14950      # Try to locate tool using the code snippet
14951      for ac_prog in cpio bsdcpio
14952do
14953  # Extract the first word of "$ac_prog", so it can be a program name with args.
14954set dummy $ac_prog; ac_word=$2
14955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14956$as_echo_n "checking for $ac_word... " >&6; }
14957if ${ac_cv_path_CPIO+:} false; then :
14958  $as_echo_n "(cached) " >&6
14959else
14960  case $CPIO in
14961  [\\/]* | ?:[\\/]*)
14962  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14963  ;;
14964  *)
14965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14966for as_dir in $PATH
14967do
14968  IFS=$as_save_IFS
14969  test -z "$as_dir" && as_dir=.
14970    for ac_exec_ext in '' $ac_executable_extensions; do
14971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14972    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14974    break 2
14975  fi
14976done
14977  done
14978IFS=$as_save_IFS
14979
14980  ;;
14981esac
14982fi
14983CPIO=$ac_cv_path_CPIO
14984if test -n "$CPIO"; then
14985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14986$as_echo "$CPIO" >&6; }
14987else
14988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14989$as_echo "no" >&6; }
14990fi
14991
14992
14993  test -n "$CPIO" && break
14994done
14995
14996    else
14997      # If it succeeded, then it was overridden by the user. We will use it
14998      # for the tool.
14999
15000      # First remove it from the list of overridden variables, so we can test
15001      # for unknown variables in the end.
15002      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15003
15004      # Check if we try to supply an empty value
15005      if test "x$CPIO" = x; then
15006        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15007$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15008        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15009$as_echo_n "checking for CPIO... " >&6; }
15010        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15011$as_echo "disabled" >&6; }
15012      else
15013        # Check if the provided tool contains a complete path.
15014        tool_specified="$CPIO"
15015        tool_basename="${tool_specified##*/}"
15016        if test "x$tool_basename" = "x$tool_specified"; then
15017          # A command without a complete path is provided, search $PATH.
15018          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15019$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15020          # Extract the first word of "$tool_basename", so it can be a program name with args.
15021set dummy $tool_basename; ac_word=$2
15022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15023$as_echo_n "checking for $ac_word... " >&6; }
15024if ${ac_cv_path_CPIO+:} false; then :
15025  $as_echo_n "(cached) " >&6
15026else
15027  case $CPIO in
15028  [\\/]* | ?:[\\/]*)
15029  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15030  ;;
15031  *)
15032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15033for as_dir in $PATH
15034do
15035  IFS=$as_save_IFS
15036  test -z "$as_dir" && as_dir=.
15037    for ac_exec_ext in '' $ac_executable_extensions; do
15038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15039    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15041    break 2
15042  fi
15043done
15044  done
15045IFS=$as_save_IFS
15046
15047  ;;
15048esac
15049fi
15050CPIO=$ac_cv_path_CPIO
15051if test -n "$CPIO"; then
15052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15053$as_echo "$CPIO" >&6; }
15054else
15055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15056$as_echo "no" >&6; }
15057fi
15058
15059
15060          if test "x$CPIO" = x; then
15061            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15062          fi
15063        else
15064          # Otherwise we believe it is a complete path. Use it as it is.
15065          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15066$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15067          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15068$as_echo_n "checking for CPIO... " >&6; }
15069          if test ! -x "$tool_specified"; then
15070            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15071$as_echo "not found" >&6; }
15072            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15073          fi
15074          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15075$as_echo "$tool_specified" >&6; }
15076        fi
15077      fi
15078    fi
15079
15080  fi
15081
15082
15083
15084
15085  # Publish this variable in the help.
15086
15087
15088  if [ -z "${NICE+x}" ]; then
15089    # The variable is not set by user, try to locate tool using the code snippet
15090    for ac_prog in nice
15091do
15092  # Extract the first word of "$ac_prog", so it can be a program name with args.
15093set dummy $ac_prog; ac_word=$2
15094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15095$as_echo_n "checking for $ac_word... " >&6; }
15096if ${ac_cv_path_NICE+:} false; then :
15097  $as_echo_n "(cached) " >&6
15098else
15099  case $NICE in
15100  [\\/]* | ?:[\\/]*)
15101  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15102  ;;
15103  *)
15104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15105for as_dir in $PATH
15106do
15107  IFS=$as_save_IFS
15108  test -z "$as_dir" && as_dir=.
15109    for ac_exec_ext in '' $ac_executable_extensions; do
15110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15111    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15113    break 2
15114  fi
15115done
15116  done
15117IFS=$as_save_IFS
15118
15119  ;;
15120esac
15121fi
15122NICE=$ac_cv_path_NICE
15123if test -n "$NICE"; then
15124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15125$as_echo "$NICE" >&6; }
15126else
15127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15128$as_echo "no" >&6; }
15129fi
15130
15131
15132  test -n "$NICE" && break
15133done
15134
15135  else
15136    # The variable is set, but is it from the command line or the environment?
15137
15138    # Try to remove the string !NICE! from our list.
15139    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15140    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15141      # If it failed, the variable was not from the command line. Ignore it,
15142      # but warn the user (except for BASH, which is always set by the calling BASH).
15143      if test "xNICE" != xBASH; then
15144        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15145$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15146      fi
15147      # Try to locate tool using the code snippet
15148      for ac_prog in nice
15149do
15150  # Extract the first word of "$ac_prog", so it can be a program name with args.
15151set dummy $ac_prog; ac_word=$2
15152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15153$as_echo_n "checking for $ac_word... " >&6; }
15154if ${ac_cv_path_NICE+:} false; then :
15155  $as_echo_n "(cached) " >&6
15156else
15157  case $NICE in
15158  [\\/]* | ?:[\\/]*)
15159  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15160  ;;
15161  *)
15162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15163for as_dir in $PATH
15164do
15165  IFS=$as_save_IFS
15166  test -z "$as_dir" && as_dir=.
15167    for ac_exec_ext in '' $ac_executable_extensions; do
15168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15169    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15171    break 2
15172  fi
15173done
15174  done
15175IFS=$as_save_IFS
15176
15177  ;;
15178esac
15179fi
15180NICE=$ac_cv_path_NICE
15181if test -n "$NICE"; then
15182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15183$as_echo "$NICE" >&6; }
15184else
15185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15186$as_echo "no" >&6; }
15187fi
15188
15189
15190  test -n "$NICE" && break
15191done
15192
15193    else
15194      # If it succeeded, then it was overridden by the user. We will use it
15195      # for the tool.
15196
15197      # First remove it from the list of overridden variables, so we can test
15198      # for unknown variables in the end.
15199      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15200
15201      # Check if we try to supply an empty value
15202      if test "x$NICE" = x; then
15203        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15204$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15205        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15206$as_echo_n "checking for NICE... " >&6; }
15207        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15208$as_echo "disabled" >&6; }
15209      else
15210        # Check if the provided tool contains a complete path.
15211        tool_specified="$NICE"
15212        tool_basename="${tool_specified##*/}"
15213        if test "x$tool_basename" = "x$tool_specified"; then
15214          # A command without a complete path is provided, search $PATH.
15215          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15216$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15217          # Extract the first word of "$tool_basename", so it can be a program name with args.
15218set dummy $tool_basename; ac_word=$2
15219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15220$as_echo_n "checking for $ac_word... " >&6; }
15221if ${ac_cv_path_NICE+:} false; then :
15222  $as_echo_n "(cached) " >&6
15223else
15224  case $NICE in
15225  [\\/]* | ?:[\\/]*)
15226  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15227  ;;
15228  *)
15229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15230for as_dir in $PATH
15231do
15232  IFS=$as_save_IFS
15233  test -z "$as_dir" && as_dir=.
15234    for ac_exec_ext in '' $ac_executable_extensions; do
15235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15236    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15238    break 2
15239  fi
15240done
15241  done
15242IFS=$as_save_IFS
15243
15244  ;;
15245esac
15246fi
15247NICE=$ac_cv_path_NICE
15248if test -n "$NICE"; then
15249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15250$as_echo "$NICE" >&6; }
15251else
15252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15253$as_echo "no" >&6; }
15254fi
15255
15256
15257          if test "x$NICE" = x; then
15258            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15259          fi
15260        else
15261          # Otherwise we believe it is a complete path. Use it as it is.
15262          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15263$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15264          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15265$as_echo_n "checking for NICE... " >&6; }
15266          if test ! -x "$tool_specified"; then
15267            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15268$as_echo "not found" >&6; }
15269            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15270          fi
15271          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15272$as_echo "$tool_specified" >&6; }
15273        fi
15274      fi
15275    fi
15276
15277  fi
15278
15279
15280
15281
15282# Now we can determine OpenJDK build and target platforms. This is required to
15283# have early on.
15284# Make sure we can run config.sub.
15285$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15286  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15287
15288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15289$as_echo_n "checking build system type... " >&6; }
15290if ${ac_cv_build+:} false; then :
15291  $as_echo_n "(cached) " >&6
15292else
15293  ac_build_alias=$build_alias
15294test "x$ac_build_alias" = x &&
15295  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15296test "x$ac_build_alias" = x &&
15297  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15298ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15299  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15300
15301fi
15302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15303$as_echo "$ac_cv_build" >&6; }
15304case $ac_cv_build in
15305*-*-*) ;;
15306*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15307esac
15308build=$ac_cv_build
15309ac_save_IFS=$IFS; IFS='-'
15310set x $ac_cv_build
15311shift
15312build_cpu=$1
15313build_vendor=$2
15314shift; shift
15315# Remember, the first character of IFS is used to create $*,
15316# except with old shells:
15317build_os=$*
15318IFS=$ac_save_IFS
15319case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15320
15321
15322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15323$as_echo_n "checking host system type... " >&6; }
15324if ${ac_cv_host+:} false; then :
15325  $as_echo_n "(cached) " >&6
15326else
15327  if test "x$host_alias" = x; then
15328  ac_cv_host=$ac_cv_build
15329else
15330  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15331    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15332fi
15333
15334fi
15335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15336$as_echo "$ac_cv_host" >&6; }
15337case $ac_cv_host in
15338*-*-*) ;;
15339*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15340esac
15341host=$ac_cv_host
15342ac_save_IFS=$IFS; IFS='-'
15343set x $ac_cv_host
15344shift
15345host_cpu=$1
15346host_vendor=$2
15347shift; shift
15348# Remember, the first character of IFS is used to create $*,
15349# except with old shells:
15350host_os=$*
15351IFS=$ac_save_IFS
15352case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15353
15354
15355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15356$as_echo_n "checking target system type... " >&6; }
15357if ${ac_cv_target+:} false; then :
15358  $as_echo_n "(cached) " >&6
15359else
15360  if test "x$target_alias" = x; then
15361  ac_cv_target=$ac_cv_host
15362else
15363  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15364    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15365fi
15366
15367fi
15368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15369$as_echo "$ac_cv_target" >&6; }
15370case $ac_cv_target in
15371*-*-*) ;;
15372*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15373esac
15374target=$ac_cv_target
15375ac_save_IFS=$IFS; IFS='-'
15376set x $ac_cv_target
15377shift
15378target_cpu=$1
15379target_vendor=$2
15380shift; shift
15381# Remember, the first character of IFS is used to create $*,
15382# except with old shells:
15383target_os=$*
15384IFS=$ac_save_IFS
15385case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15386
15387
15388# The aliases save the names the user supplied, while $host etc.
15389# will get canonicalized.
15390test -n "$target_alias" &&
15391  test "$program_prefix$program_suffix$program_transform_name" = \
15392    NONENONEs,x,x, &&
15393  program_prefix=${target_alias}-
15394
15395  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15396  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15397  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15398  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15399  # to use the configure naming style.
15400
15401
15402
15403
15404
15405  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15406  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15407  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15408  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15409  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15410  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15411
15412
15413
15414  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15415
15416  case "$build_os" in
15417    *linux*)
15418      VAR_OS=linux
15419      VAR_OS_TYPE=unix
15420      ;;
15421    *solaris*)
15422      VAR_OS=solaris
15423      VAR_OS_TYPE=unix
15424      ;;
15425    *darwin*)
15426      VAR_OS=macosx
15427      VAR_OS_TYPE=unix
15428      ;;
15429    *bsd*)
15430      VAR_OS=bsd
15431      VAR_OS_TYPE=unix
15432      ;;
15433    *cygwin*)
15434      VAR_OS=windows
15435      VAR_OS_ENV=windows.cygwin
15436      ;;
15437    *mingw*)
15438      VAR_OS=windows
15439      VAR_OS_ENV=windows.msys
15440      ;;
15441    *aix*)
15442      VAR_OS=aix
15443      VAR_OS_TYPE=unix
15444      ;;
15445    *)
15446      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15447      ;;
15448  esac
15449
15450
15451  # First argument is the cpu name from the trip/quad
15452  case "$build_cpu" in
15453    x86_64)
15454      VAR_CPU=x86_64
15455      VAR_CPU_ARCH=x86
15456      VAR_CPU_BITS=64
15457      VAR_CPU_ENDIAN=little
15458      ;;
15459    i?86)
15460      VAR_CPU=x86
15461      VAR_CPU_ARCH=x86
15462      VAR_CPU_BITS=32
15463      VAR_CPU_ENDIAN=little
15464      ;;
15465    arm*)
15466      VAR_CPU=arm
15467      VAR_CPU_ARCH=arm
15468      VAR_CPU_BITS=32
15469      VAR_CPU_ENDIAN=little
15470      ;;
15471    aarch64)
15472      VAR_CPU=aarch64
15473      VAR_CPU_ARCH=aarch64
15474      VAR_CPU_BITS=64
15475      VAR_CPU_ENDIAN=little
15476      ;;
15477    powerpc)
15478      VAR_CPU=ppc
15479      VAR_CPU_ARCH=ppc
15480      VAR_CPU_BITS=32
15481      VAR_CPU_ENDIAN=big
15482      ;;
15483    powerpc64)
15484      VAR_CPU=ppc64
15485      VAR_CPU_ARCH=ppc
15486      VAR_CPU_BITS=64
15487      VAR_CPU_ENDIAN=big
15488      ;;
15489    powerpc64le)
15490      VAR_CPU=ppc64le
15491      VAR_CPU_ARCH=ppc
15492      VAR_CPU_BITS=64
15493      VAR_CPU_ENDIAN=little
15494      ;;
15495    s390)
15496      VAR_CPU=s390
15497      VAR_CPU_ARCH=s390
15498      VAR_CPU_BITS=32
15499      VAR_CPU_ENDIAN=big
15500      ;;
15501    s390x)
15502      VAR_CPU=s390x
15503      VAR_CPU_ARCH=s390
15504      VAR_CPU_BITS=64
15505      VAR_CPU_ENDIAN=big
15506      ;;
15507    sparc)
15508      VAR_CPU=sparc
15509      VAR_CPU_ARCH=sparc
15510      VAR_CPU_BITS=32
15511      VAR_CPU_ENDIAN=big
15512      ;;
15513    sparcv9|sparc64)
15514      VAR_CPU=sparcv9
15515      VAR_CPU_ARCH=sparc
15516      VAR_CPU_BITS=64
15517      VAR_CPU_ENDIAN=big
15518      ;;
15519    *)
15520      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15521      ;;
15522  esac
15523
15524  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15525  OPENJDK_BUILD_OS="$VAR_OS"
15526  if test "x$VAR_OS_TYPE" != x; then
15527    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15528  else
15529    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15530  fi
15531  if test "x$VAR_OS_ENV" != x; then
15532    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15533  else
15534    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15535  fi
15536  OPENJDK_BUILD_CPU="$VAR_CPU"
15537  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15538  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15539  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15540
15541
15542
15543
15544
15545
15546
15547
15548  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15549$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15551$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15552
15553  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15554
15555  case "$host_os" in
15556    *linux*)
15557      VAR_OS=linux
15558      VAR_OS_TYPE=unix
15559      ;;
15560    *solaris*)
15561      VAR_OS=solaris
15562      VAR_OS_TYPE=unix
15563      ;;
15564    *darwin*)
15565      VAR_OS=macosx
15566      VAR_OS_TYPE=unix
15567      ;;
15568    *bsd*)
15569      VAR_OS=bsd
15570      VAR_OS_TYPE=unix
15571      ;;
15572    *cygwin*)
15573      VAR_OS=windows
15574      VAR_OS_ENV=windows.cygwin
15575      ;;
15576    *mingw*)
15577      VAR_OS=windows
15578      VAR_OS_ENV=windows.msys
15579      ;;
15580    *aix*)
15581      VAR_OS=aix
15582      VAR_OS_TYPE=unix
15583      ;;
15584    *)
15585      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15586      ;;
15587  esac
15588
15589
15590  # First argument is the cpu name from the trip/quad
15591  case "$host_cpu" in
15592    x86_64)
15593      VAR_CPU=x86_64
15594      VAR_CPU_ARCH=x86
15595      VAR_CPU_BITS=64
15596      VAR_CPU_ENDIAN=little
15597      ;;
15598    i?86)
15599      VAR_CPU=x86
15600      VAR_CPU_ARCH=x86
15601      VAR_CPU_BITS=32
15602      VAR_CPU_ENDIAN=little
15603      ;;
15604    arm*)
15605      VAR_CPU=arm
15606      VAR_CPU_ARCH=arm
15607      VAR_CPU_BITS=32
15608      VAR_CPU_ENDIAN=little
15609      ;;
15610    aarch64)
15611      VAR_CPU=aarch64
15612      VAR_CPU_ARCH=aarch64
15613      VAR_CPU_BITS=64
15614      VAR_CPU_ENDIAN=little
15615      ;;
15616    powerpc)
15617      VAR_CPU=ppc
15618      VAR_CPU_ARCH=ppc
15619      VAR_CPU_BITS=32
15620      VAR_CPU_ENDIAN=big
15621      ;;
15622    powerpc64)
15623      VAR_CPU=ppc64
15624      VAR_CPU_ARCH=ppc
15625      VAR_CPU_BITS=64
15626      VAR_CPU_ENDIAN=big
15627      ;;
15628    powerpc64le)
15629      VAR_CPU=ppc64le
15630      VAR_CPU_ARCH=ppc
15631      VAR_CPU_BITS=64
15632      VAR_CPU_ENDIAN=little
15633      ;;
15634    s390)
15635      VAR_CPU=s390
15636      VAR_CPU_ARCH=s390
15637      VAR_CPU_BITS=32
15638      VAR_CPU_ENDIAN=big
15639      ;;
15640    s390x)
15641      VAR_CPU=s390x
15642      VAR_CPU_ARCH=s390
15643      VAR_CPU_BITS=64
15644      VAR_CPU_ENDIAN=big
15645      ;;
15646    sparc)
15647      VAR_CPU=sparc
15648      VAR_CPU_ARCH=sparc
15649      VAR_CPU_BITS=32
15650      VAR_CPU_ENDIAN=big
15651      ;;
15652    sparcv9|sparc64)
15653      VAR_CPU=sparcv9
15654      VAR_CPU_ARCH=sparc
15655      VAR_CPU_BITS=64
15656      VAR_CPU_ENDIAN=big
15657      ;;
15658    *)
15659      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15660      ;;
15661  esac
15662
15663  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15664  OPENJDK_TARGET_OS="$VAR_OS"
15665  if test "x$VAR_OS_TYPE" != x; then
15666    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15667  else
15668    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15669  fi
15670  if test "x$VAR_OS_ENV" != x; then
15671    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15672  else
15673    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15674  fi
15675  OPENJDK_TARGET_CPU="$VAR_CPU"
15676  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15677  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15678  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15679
15680
15681
15682
15683
15684
15685
15686
15687  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15688$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15690$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15691
15692
15693
15694# Check whether --with-target-bits was given.
15695if test "${with_target_bits+set}" = set; then :
15696  withval=$with_target_bits;
15697fi
15698
15699
15700  # We have three types of compiles:
15701  # native  == normal compilation, target system == build system
15702  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15703  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15704  #
15705  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15706    # We're doing a proper cross-compilation
15707    COMPILE_TYPE="cross"
15708  else
15709    COMPILE_TYPE="native"
15710  fi
15711
15712  if test "x$with_target_bits" != x; then
15713    if test "x$COMPILE_TYPE" = "xcross"; then
15714      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15715    fi
15716
15717    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15718      # A reduced build is requested
15719      COMPILE_TYPE="reduced"
15720      OPENJDK_TARGET_CPU_BITS=32
15721      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15722        OPENJDK_TARGET_CPU=x86
15723      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15724        OPENJDK_TARGET_CPU=sparc
15725      else
15726        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15727      fi
15728    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15729      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
15730    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15731      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15732$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15733    else
15734      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15735    fi
15736  fi
15737
15738
15739  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15740$as_echo_n "checking compilation type... " >&6; }
15741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15742$as_echo "$COMPILE_TYPE" >&6; }
15743
15744
15745  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15746    REQUIRED_OS_NAME=SunOS
15747    REQUIRED_OS_VERSION=5.10
15748  fi
15749  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15750    REQUIRED_OS_NAME=Linux
15751    REQUIRED_OS_VERSION=2.6
15752  fi
15753  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15754    REQUIRED_OS_NAME=Windows
15755    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15756      REQUIRED_OS_VERSION=5.2
15757    else
15758      REQUIRED_OS_VERSION=5.1
15759    fi
15760  fi
15761  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15762    REQUIRED_OS_NAME=Darwin
15763    REQUIRED_OS_VERSION=11.2
15764  fi
15765  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15766    REQUIRED_OS_NAME=AIX
15767    REQUIRED_OS_VERSION=7.1
15768  fi
15769
15770
15771
15772
15773
15774
15775  # Also store the legacy naming of the cpu.
15776  # Ie i586 and amd64 instead of x86 and x86_64
15777  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15778  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15779    OPENJDK_TARGET_CPU_LEGACY="i586"
15780  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15781    # On all platforms except MacOSX replace x86_64 with amd64.
15782    OPENJDK_TARGET_CPU_LEGACY="amd64"
15783  fi
15784
15785
15786  # And the second legacy naming of the cpu.
15787  # Ie i386 and amd64 instead of x86 and x86_64.
15788  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15789  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15790    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15791  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15792    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15793  fi
15794
15795
15796  # This is the name of the cpu (but using i386 and amd64 instead of
15797  # x86 and x86_64, respectively), preceeded by a /, to be used when
15798  # locating libraries. On macosx, it's empty, though.
15799  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15800  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15801    OPENJDK_TARGET_CPU_LIBDIR=""
15802  fi
15803
15804
15805  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15806  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15807  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15808  OPENJDK_TARGET_CPU_ISADIR=""
15809  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15810    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15811      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15812    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15813      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15814    fi
15815  fi
15816
15817
15818  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15819  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15820  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15821    # On linux only, we replace x86 with i386.
15822    OPENJDK_TARGET_CPU_OSARCH="i386"
15823  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15824    # On all platforms except macosx, we replace x86_64 with amd64.
15825    OPENJDK_TARGET_CPU_OSARCH="amd64"
15826  fi
15827
15828
15829  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15830  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15831    OPENJDK_TARGET_CPU_JLI="i386"
15832  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15833    # On all platforms except macosx, we replace x86_64 with amd64.
15834    OPENJDK_TARGET_CPU_JLI="amd64"
15835  fi
15836  # Now setup the -D flags for building libjli.
15837  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15838  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15839    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15840      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15841    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15842      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15843    fi
15844  fi
15845
15846
15847  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15848      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15849  else
15850      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15851  fi
15852
15853
15854  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15855  # Macosx is osx and x86_64 is x64
15856  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15857    OPENJDK_TARGET_OS_BUNDLE="osx"
15858  else
15859    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15860  fi
15861  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15862    OPENJDK_TARGET_CPU_BUNDLE="x64"
15863  else
15864    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15865  fi
15866  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15867
15868
15869
15870
15871  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15872    A_LP64="LP64:="
15873    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15874    # unpack200.exe
15875    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15876      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15877    fi
15878  fi
15879  LP64=$A_LP64
15880
15881
15882  if test "x$COMPILE_TYPE" = "xcross"; then
15883    # FIXME: ... or should this include reduced builds..?
15884    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15885  else
15886    DEFINE_CROSS_COMPILE_ARCH=""
15887  fi
15888
15889
15890  # Convert openjdk platform names to hotspot names
15891
15892  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15893  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15894    HOTSPOT_TARGET_OS=bsd
15895  fi
15896
15897
15898  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15899  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15900    HOTSPOT_TARGET_OS_TYPE=posix
15901  fi
15902
15903
15904  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15905  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15906    HOTSPOT_TARGET_CPU=x86_32
15907  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15908    HOTSPOT_TARGET_CPU=sparc
15909  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15910    HOTSPOT_TARGET_CPU=ppc_64
15911  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15912    HOTSPOT_TARGET_CPU=ppc_64
15913  fi
15914
15915
15916  # This is identical with OPENJDK_*, but define anyway for consistency.
15917  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15918
15919
15920  # Setup HOTSPOT_TARGET_CPU_DEFINE
15921  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15922    HOTSPOT_TARGET_CPU_DEFINE=IA32
15923  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15924    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15925  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15926    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15927  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15928    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15929  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15930    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15931  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15932    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15933
15934  # The cpu defines below are for zero, we don't support them directly.
15935  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15936    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15937  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15938    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15939  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15940    HOTSPOT_TARGET_CPU_DEFINE=S390
15941  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15942    HOTSPOT_TARGET_CPU_DEFINE=S390
15943  elif test "x$OPENJDK_TARGET_CPU" != x; then
15944    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
15945  fi
15946
15947
15948
15949
15950  # Also store the legacy naming of the cpu.
15951  # Ie i586 and amd64 instead of x86 and x86_64
15952  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15953  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15954    OPENJDK_BUILD_CPU_LEGACY="i586"
15955  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15956    # On all platforms except MacOSX replace x86_64 with amd64.
15957    OPENJDK_BUILD_CPU_LEGACY="amd64"
15958  fi
15959
15960
15961  # And the second legacy naming of the cpu.
15962  # Ie i386 and amd64 instead of x86 and x86_64.
15963  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15964  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15965    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15966  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15967    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15968  fi
15969
15970
15971  # This is the name of the cpu (but using i386 and amd64 instead of
15972  # x86 and x86_64, respectively), preceeded by a /, to be used when
15973  # locating libraries. On macosx, it's empty, though.
15974  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15975  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15976    OPENJDK_BUILD_CPU_LIBDIR=""
15977  fi
15978
15979
15980  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15981  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15982  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15983  OPENJDK_BUILD_CPU_ISADIR=""
15984  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15985    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15986      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15987    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15988      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15989    fi
15990  fi
15991
15992
15993  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15994  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15995  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15996    # On linux only, we replace x86 with i386.
15997    OPENJDK_BUILD_CPU_OSARCH="i386"
15998  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15999    # On all platforms except macosx, we replace x86_64 with amd64.
16000    OPENJDK_BUILD_CPU_OSARCH="amd64"
16001  fi
16002
16003
16004  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16005  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16006    OPENJDK_BUILD_CPU_JLI="i386"
16007  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16008    # On all platforms except macosx, we replace x86_64 with amd64.
16009    OPENJDK_BUILD_CPU_JLI="amd64"
16010  fi
16011  # Now setup the -D flags for building libjli.
16012  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16013  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16014    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16015      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16016    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16017      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16018    fi
16019  fi
16020
16021
16022  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16023      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16024  else
16025      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16026  fi
16027
16028
16029  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16030  # Macosx is osx and x86_64 is x64
16031  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16032    OPENJDK_BUILD_OS_BUNDLE="osx"
16033  else
16034    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16035  fi
16036  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16037    OPENJDK_BUILD_CPU_BUNDLE="x64"
16038  else
16039    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16040  fi
16041  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16042
16043
16044
16045
16046  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16047    A_LP64="LP64:="
16048    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16049    # unpack200.exe
16050    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16051      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16052    fi
16053  fi
16054  LP64=$A_LP64
16055
16056
16057  if test "x$COMPILE_TYPE" = "xcross"; then
16058    # FIXME: ... or should this include reduced builds..?
16059    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16060  else
16061    DEFINE_CROSS_COMPILE_ARCH=""
16062  fi
16063
16064
16065  # Convert openjdk platform names to hotspot names
16066
16067  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16068  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16069    HOTSPOT_BUILD_OS=bsd
16070  fi
16071
16072
16073  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16074  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16075    HOTSPOT_BUILD_OS_TYPE=posix
16076  fi
16077
16078
16079  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16080  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16081    HOTSPOT_BUILD_CPU=x86_32
16082  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16083    HOTSPOT_BUILD_CPU=sparc
16084  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16085    HOTSPOT_BUILD_CPU=ppc_64
16086  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16087    HOTSPOT_BUILD_CPU=ppc_64
16088  fi
16089
16090
16091  # This is identical with OPENJDK_*, but define anyway for consistency.
16092  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16093
16094
16095  # Setup HOTSPOT_BUILD_CPU_DEFINE
16096  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16097    HOTSPOT_BUILD_CPU_DEFINE=IA32
16098  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16099    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16100  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16101    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16102  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16103    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16104  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16105    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16106  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16107    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16108
16109  # The cpu defines below are for zero, we don't support them directly.
16110  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16111    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16112  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16113    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16114  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16115    HOTSPOT_BUILD_CPU_DEFINE=S390
16116  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16117    HOTSPOT_BUILD_CPU_DEFINE=S390
16118  elif test "x$OPENJDK_BUILD_CPU" != x; then
16119    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16120  fi
16121
16122
16123
16124
16125  # ZERO_ARCHDEF is used to enable architecture-specific code.
16126  # This is used in legacy hotspot build.
16127  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16128
16129
16130
16131
16132
16133# Continue setting up basic stuff. Most remaining code require fundamental tools.
16134
16135  # Save the current directory this script was started from
16136  CURDIR="$PWD"
16137
16138  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16139  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16140  # was not available at that time.
16141  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16142  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16143    ORIGINAL_PATH="$REWRITTEN_PATH"
16144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16145$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16146  fi
16147
16148  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16149    PATH_SEP=";"
16150
16151  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16152  if test $SRC_ROOT_LENGTH -gt 100; then
16153    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16154  fi
16155
16156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16157    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16158$as_echo_n "checking cygwin release... " >&6; }
16159    CYGWIN_VERSION=`$UNAME -r`
16160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16161$as_echo "$CYGWIN_VERSION" >&6; }
16162    WINDOWS_ENV_VENDOR='cygwin'
16163    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16164
16165    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16166    if test "x$CYGWIN_VERSION_OLD" != x; then
16167      { $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
16168$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;}
16169      as_fn_error $? "Cannot continue" "$LINENO" 5
16170    fi
16171    if test "x$CYGPATH" = x; then
16172      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16173    fi
16174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16175$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16176    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16177    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16178    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16179    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16181$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16182    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16183    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16184    if test "x$test_cygdrive_prefix" = x; then
16185      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16186    fi
16187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16188    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16189$as_echo_n "checking msys release... " >&6; }
16190    MSYS_VERSION=`$UNAME -r`
16191    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16192$as_echo "$MSYS_VERSION" >&6; }
16193
16194    WINDOWS_ENV_VENDOR='msys'
16195    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16196
16197    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16198$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16199    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16200    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16201
16202  windows_path="$MSYS_ROOT_PATH"
16203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16204    unix_path=`$CYGPATH -u "$windows_path"`
16205    MSYS_ROOT_PATH="$unix_path"
16206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16208    MSYS_ROOT_PATH="$unix_path"
16209  fi
16210
16211    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16212$as_echo "$MSYS_ROOT_PATH" >&6; }
16213    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16214  else
16215    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16216  fi
16217
16218  # Test if windows or unix (cygwin/msys) find is first in path.
16219  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16220$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16221  FIND_BINARY_OUTPUT=`find --version 2>&1`
16222  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16224$as_echo "unix style" >&6; }
16225  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16227$as_echo "Windows" >&6; }
16228    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16229$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16230    { $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
16231$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16232    as_fn_error $? "Cannot continue" "$LINENO" 5
16233  else
16234    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16235$as_echo "unknown" >&6; }
16236    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16237$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16238  fi
16239
16240  else
16241    PATH_SEP=":"
16242  fi
16243
16244
16245  # We get the top-level directory from the supporting wrappers.
16246  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16247$as_echo_n "checking for top-level directory... " >&6; }
16248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16249$as_echo "$TOPDIR" >&6; }
16250
16251
16252  # Save the original version of TOPDIR for string comparisons
16253  ORIGINAL_TOPDIR="$TOPDIR"
16254
16255
16256  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16257
16258  # Only process if variable expands to non-empty
16259
16260  if test "x$CURDIR" != x; then
16261    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16262
16263  # Input might be given as Windows format, start by converting to
16264  # unix format.
16265  path="$CURDIR"
16266  new_path=`$CYGPATH -u "$path"`
16267
16268  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16269  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16270  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16271  # "foo.exe" is OK but "foo" is an error.
16272  #
16273  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16274  # It is also a way to make sure we got the proper file name for the real test later on.
16275  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16276  if test "x$test_shortpath" = x; then
16277    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16278$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16279    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16280  fi
16281
16282  # Call helper function which possibly converts this using DOS-style short mode.
16283  # If so, the updated path is stored in $new_path.
16284
16285  input_path="$new_path"
16286  # Check if we need to convert this using DOS-style short mode. If the path
16287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16288  # take no chances and rewrite it.
16289  # Note: m4 eats our [], so we need to use [ and ] instead.
16290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16291  if test "x$has_forbidden_chars" != x; then
16292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16293    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16294    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16295    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16296      # Going to short mode and back again did indeed matter. Since short mode is
16297      # case insensitive, let's make it lowercase to improve readability.
16298      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16299      # Now convert it back to Unix-style (cygpath)
16300      input_path=`$CYGPATH -u "$shortmode_path"`
16301      new_path="$input_path"
16302    fi
16303  fi
16304
16305  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16306  if test "x$test_cygdrive_prefix" = x; then
16307    # As a simple fix, exclude /usr/bin since it's not a real path.
16308    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16309      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16310      # a path prefixed by /cygdrive for fixpath to work.
16311      new_path="$CYGWIN_ROOT_PATH$input_path"
16312    fi
16313  fi
16314
16315
16316  if test "x$path" != "x$new_path"; then
16317    CURDIR="$new_path"
16318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16319$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16320  fi
16321
16322    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16323
16324  path="$CURDIR"
16325  has_colon=`$ECHO $path | $GREP ^.:`
16326  new_path="$path"
16327  if test "x$has_colon" = x; then
16328    # Not in mixed or Windows style, start by that.
16329    new_path=`cmd //c echo $path`
16330  fi
16331
16332
16333  input_path="$new_path"
16334  # Check if we need to convert this using DOS-style short mode. If the path
16335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16336  # take no chances and rewrite it.
16337  # Note: m4 eats our [], so we need to use [ and ] instead.
16338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16339  if test "x$has_forbidden_chars" != x; then
16340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16341    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16342  fi
16343
16344
16345  windows_path="$new_path"
16346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16347    unix_path=`$CYGPATH -u "$windows_path"`
16348    new_path="$unix_path"
16349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16351    new_path="$unix_path"
16352  fi
16353
16354  if test "x$path" != "x$new_path"; then
16355    CURDIR="$new_path"
16356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16357$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16358  fi
16359
16360  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16361  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16362
16363    else
16364      # We're on a unix platform. Hooray! :)
16365      path="$CURDIR"
16366      has_space=`$ECHO "$path" | $GREP " "`
16367      if test "x$has_space" != x; then
16368        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16369$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16370        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16371      fi
16372
16373      # Use eval to expand a potential ~
16374      eval path="$path"
16375      if test ! -f "$path" && test ! -d "$path"; then
16376        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16377      fi
16378
16379      if test -d "$path"; then
16380        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16381      else
16382        dir="`$DIRNAME "$path"`"
16383        base="`$BASENAME "$path"`"
16384        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16385      fi
16386    fi
16387  fi
16388
16389
16390  # Only process if variable expands to non-empty
16391
16392  if test "x$TOPDIR" != x; then
16393    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16394
16395  # Input might be given as Windows format, start by converting to
16396  # unix format.
16397  path="$TOPDIR"
16398  new_path=`$CYGPATH -u "$path"`
16399
16400  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16401  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16402  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16403  # "foo.exe" is OK but "foo" is an error.
16404  #
16405  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16406  # It is also a way to make sure we got the proper file name for the real test later on.
16407  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16408  if test "x$test_shortpath" = x; then
16409    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16410$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16411    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16412  fi
16413
16414  # Call helper function which possibly converts this using DOS-style short mode.
16415  # If so, the updated path is stored in $new_path.
16416
16417  input_path="$new_path"
16418  # Check if we need to convert this using DOS-style short mode. If the path
16419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16420  # take no chances and rewrite it.
16421  # Note: m4 eats our [], so we need to use [ and ] instead.
16422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16423  if test "x$has_forbidden_chars" != x; then
16424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16425    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16426    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16427    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16428      # Going to short mode and back again did indeed matter. Since short mode is
16429      # case insensitive, let's make it lowercase to improve readability.
16430      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16431      # Now convert it back to Unix-style (cygpath)
16432      input_path=`$CYGPATH -u "$shortmode_path"`
16433      new_path="$input_path"
16434    fi
16435  fi
16436
16437  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16438  if test "x$test_cygdrive_prefix" = x; then
16439    # As a simple fix, exclude /usr/bin since it's not a real path.
16440    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16441      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16442      # a path prefixed by /cygdrive for fixpath to work.
16443      new_path="$CYGWIN_ROOT_PATH$input_path"
16444    fi
16445  fi
16446
16447
16448  if test "x$path" != "x$new_path"; then
16449    TOPDIR="$new_path"
16450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16451$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16452  fi
16453
16454    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16455
16456  path="$TOPDIR"
16457  has_colon=`$ECHO $path | $GREP ^.:`
16458  new_path="$path"
16459  if test "x$has_colon" = x; then
16460    # Not in mixed or Windows style, start by that.
16461    new_path=`cmd //c echo $path`
16462  fi
16463
16464
16465  input_path="$new_path"
16466  # Check if we need to convert this using DOS-style short mode. If the path
16467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16468  # take no chances and rewrite it.
16469  # Note: m4 eats our [], so we need to use [ and ] instead.
16470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16471  if test "x$has_forbidden_chars" != x; then
16472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16473    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16474  fi
16475
16476
16477  windows_path="$new_path"
16478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16479    unix_path=`$CYGPATH -u "$windows_path"`
16480    new_path="$unix_path"
16481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16483    new_path="$unix_path"
16484  fi
16485
16486  if test "x$path" != "x$new_path"; then
16487    TOPDIR="$new_path"
16488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16489$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16490  fi
16491
16492  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16493  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16494
16495    else
16496      # We're on a unix platform. Hooray! :)
16497      path="$TOPDIR"
16498      has_space=`$ECHO "$path" | $GREP " "`
16499      if test "x$has_space" != x; then
16500        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16501$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16502        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16503      fi
16504
16505      # Use eval to expand a potential ~
16506      eval path="$path"
16507      if test ! -f "$path" && test ! -d "$path"; then
16508        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16509      fi
16510
16511      if test -d "$path"; then
16512        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16513      else
16514        dir="`$DIRNAME "$path"`"
16515        base="`$BASENAME "$path"`"
16516        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16517      fi
16518    fi
16519  fi
16520
16521  # SRC_ROOT is a traditional alias for TOPDIR.
16522  SRC_ROOT=$TOPDIR
16523
16524  # Calculate a canonical version of TOPDIR for string comparisons
16525  CANONICAL_TOPDIR=$TOPDIR
16526
16527  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16528    # Follow a chain of symbolic links. Use readlink
16529    # where it exists, else fall back to horribly
16530    # complicated shell code.
16531    if test "x$READLINK_TESTED" != yes; then
16532      # On MacOSX there is a readlink tool with a different
16533      # purpose than the GNU readlink tool. Check the found readlink.
16534      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16535      if test "x$ISGNU" = x; then
16536        # A readlink that we do not know how to use.
16537        # Are there other non-GNU readlinks out there?
16538        READLINK_TESTED=yes
16539        READLINK=
16540      fi
16541    fi
16542
16543    if test "x$READLINK" != x; then
16544      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16545    else
16546      # Save the current directory for restoring afterwards
16547      STARTDIR=$PWD
16548      COUNTER=0
16549      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16550      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16551      cd $sym_link_dir
16552      # Use -P flag to resolve symlinks in directories.
16553      cd `$THEPWDCMD -P`
16554      sym_link_dir=`$THEPWDCMD -P`
16555      # Resolve file symlinks
16556      while test $COUNTER -lt 20; do
16557        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16558        if test "x$ISLINK" == x; then
16559          # This is not a symbolic link! We are done!
16560          break
16561        fi
16562        # Again resolve directory symlinks since the target of the just found
16563        # link could be in a different directory
16564        cd `$DIRNAME $ISLINK`
16565        sym_link_dir=`$THEPWDCMD -P`
16566        sym_link_file=`$BASENAME $ISLINK`
16567        let COUNTER=COUNTER+1
16568      done
16569      cd $STARTDIR
16570      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16571    fi
16572  fi
16573
16574
16575
16576  # Locate the directory of this script.
16577  AUTOCONF_DIR=$TOPDIR/common/autoconf
16578
16579  # Setup username (for use in adhoc version strings etc)
16580  # Outer [ ] to quote m4.
16581   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16582
16583
16584
16585# Check if it's a pure open build or if custom sources are to be used.
16586
16587  # Check whether --enable-openjdk-only was given.
16588if test "${enable_openjdk_only+set}" = set; then :
16589  enableval=$enable_openjdk_only;
16590else
16591  enable_openjdk_only="no"
16592fi
16593
16594
16595  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16596$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16598$as_echo "$enable_openjdk_only" >&6; }
16599  if test "x$enable_openjdk_only" = "xyes"; then
16600    SUPPRESS_CUSTOM_EXTENSIONS="true"
16601  elif test "x$enable_openjdk_only" = "xno"; then
16602    SUPPRESS_CUSTOM_EXTENSIONS="false"
16603  else
16604    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16605  fi
16606
16607  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16608  # the IncludeCustomExtension macro.
16609
16610
16611# Check whether --with-custom-make-dir was given.
16612if test "${with_custom_make_dir+set}" = set; then :
16613  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
16614$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16615fi
16616
16617
16618
16619
16620# These are needed to be able to create a configuration name (and thus the output directory)
16621
16622  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16623$as_echo_n "checking which variant of the JDK to build... " >&6; }
16624
16625# Check whether --with-jdk-variant was given.
16626if test "${with_jdk_variant+set}" = set; then :
16627  withval=$with_jdk_variant;
16628fi
16629
16630
16631  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16632    JDK_VARIANT="normal"
16633  else
16634    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16635  fi
16636
16637
16638
16639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16640$as_echo "$JDK_VARIANT" >&6; }
16641
16642
16643  DEBUG_LEVEL="release"
16644  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16645$as_echo_n "checking which debug level to use... " >&6; }
16646  # Check whether --enable-debug was given.
16647if test "${enable_debug+set}" = set; then :
16648  enableval=$enable_debug;
16649        ENABLE_DEBUG="${enableval}"
16650        DEBUG_LEVEL="fastdebug"
16651
16652else
16653  ENABLE_DEBUG="no"
16654fi
16655
16656
16657
16658# Check whether --with-debug-level was given.
16659if test "${with_debug_level+set}" = set; then :
16660  withval=$with_debug_level;
16661        DEBUG_LEVEL="${withval}"
16662        if test "x$ENABLE_DEBUG" = xyes; then
16663          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16664        fi
16665
16666fi
16667
16668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16669$as_echo "$DEBUG_LEVEL" >&6; }
16670
16671  if test "x$DEBUG_LEVEL" != xrelease && \
16672      test "x$DEBUG_LEVEL" != xoptimized && \
16673      test "x$DEBUG_LEVEL" != xfastdebug && \
16674      test "x$DEBUG_LEVEL" != xslowdebug; then
16675    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16676  fi
16677
16678  # Translate DEBUG_LEVEL to debug level used by Hotspot
16679  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16680  if test "x$DEBUG_LEVEL" = xrelease; then
16681    HOTSPOT_DEBUG_LEVEL="product"
16682  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16683    HOTSPOT_DEBUG_LEVEL="debug"
16684  fi
16685
16686  if test "x$DEBUG_LEVEL" = xoptimized; then
16687    # The debug level 'optimized' is a little special because it is currently only
16688    # applicable to the HotSpot build where it means to build a completely
16689    # optimized version of the VM without any debugging code (like for the
16690    # 'release' debug level which is called 'product' in the HotSpot build) but
16691    # with the exception that it can contain additional code which is otherwise
16692    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16693    # test new and/or experimental features which are not intended for customer
16694    # shipment. Because these new features need to be tested and benchmarked in
16695    # real world scenarios, we want to build the containing JDK at the 'release'
16696    # debug level.
16697    DEBUG_LEVEL="release"
16698  fi
16699
16700
16701
16702
16703
16704
16705# Check whether --with-jvm-variants was given.
16706if test "${with_jvm_variants+set}" = set; then :
16707  withval=$with_jvm_variants;
16708fi
16709
16710
16711  if test "x$with_jvm_variants" = x; then
16712    with_jvm_variants="server"
16713  fi
16714  JVM_VARIANTS_OPT="$with_jvm_variants"
16715
16716  # Has the user listed more than one variant?
16717  # Additional [] needed to keep m4 from mangling shell constructs.
16718  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16719    BUILDING_MULTIPLE_JVM_VARIANTS=true
16720  else
16721    BUILDING_MULTIPLE_JVM_VARIANTS=false
16722  fi
16723  # Replace the commas with AND for use in the build directory name.
16724  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16725
16726  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16727$as_echo_n "checking which variants of the JVM to build... " >&6; }
16728  # JVM_VARIANTS is a space-separated list.
16729  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16730  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16732$as_echo "$JVM_VARIANTS" >&6; }
16733
16734  # Check that the selected variants are valid
16735
16736  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16737  # Notice that the original variant failes on SLES 10 and 11
16738  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16739  STACK=${JVM_VARIANTS// /$'\n'}
16740  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16741  if test "x$INVALID_VARIANTS" != x; then
16742    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16743$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16744    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16745  fi
16746
16747  # All "special" variants share the same output directory ("server")
16748  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16749  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16750  STACK=${JVM_VARIANTS// /$'\n'}
16751  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16752  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16753    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16754  fi
16755
16756
16757
16758
16759  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16760    # zero behaves as a platform and rewrites these values. This is really weird. :(
16761    # We are guaranteed that we do not build any other variants when building zero.
16762    HOTSPOT_TARGET_CPU=zero
16763    HOTSPOT_TARGET_CPU_ARCH=zero
16764  fi
16765
16766
16767# With basic setup done, call the custom early hook.
16768
16769
16770# Check if we have devkits, extra paths or sysroot set.
16771
16772
16773# Check whether --with-devkit was given.
16774if test "${with_devkit+set}" = set; then :
16775  withval=$with_devkit;
16776
16777  # Only process if variable expands to non-empty
16778
16779  if test "x$with_devkit" != x; then
16780    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16781
16782  # Input might be given as Windows format, start by converting to
16783  # unix format.
16784  path="$with_devkit"
16785  new_path=`$CYGPATH -u "$path"`
16786
16787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16790  # "foo.exe" is OK but "foo" is an error.
16791  #
16792  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16793  # It is also a way to make sure we got the proper file name for the real test later on.
16794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16795  if test "x$test_shortpath" = x; then
16796    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16797$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16798    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16799  fi
16800
16801  # Call helper function which possibly converts this using DOS-style short mode.
16802  # If so, the updated path is stored in $new_path.
16803
16804  input_path="$new_path"
16805  # Check if we need to convert this using DOS-style short mode. If the path
16806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16807  # take no chances and rewrite it.
16808  # Note: m4 eats our [], so we need to use [ and ] instead.
16809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16810  if test "x$has_forbidden_chars" != x; then
16811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16815      # Going to short mode and back again did indeed matter. Since short mode is
16816      # case insensitive, let's make it lowercase to improve readability.
16817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16818      # Now convert it back to Unix-style (cygpath)
16819      input_path=`$CYGPATH -u "$shortmode_path"`
16820      new_path="$input_path"
16821    fi
16822  fi
16823
16824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16825  if test "x$test_cygdrive_prefix" = x; then
16826    # As a simple fix, exclude /usr/bin since it's not a real path.
16827    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16829      # a path prefixed by /cygdrive for fixpath to work.
16830      new_path="$CYGWIN_ROOT_PATH$input_path"
16831    fi
16832  fi
16833
16834
16835  if test "x$path" != "x$new_path"; then
16836    with_devkit="$new_path"
16837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16838$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16839  fi
16840
16841    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16842
16843  path="$with_devkit"
16844  has_colon=`$ECHO $path | $GREP ^.:`
16845  new_path="$path"
16846  if test "x$has_colon" = x; then
16847    # Not in mixed or Windows style, start by that.
16848    new_path=`cmd //c echo $path`
16849  fi
16850
16851
16852  input_path="$new_path"
16853  # Check if we need to convert this using DOS-style short mode. If the path
16854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16855  # take no chances and rewrite it.
16856  # Note: m4 eats our [], so we need to use [ and ] instead.
16857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16858  if test "x$has_forbidden_chars" != x; then
16859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16861  fi
16862
16863
16864  windows_path="$new_path"
16865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16866    unix_path=`$CYGPATH -u "$windows_path"`
16867    new_path="$unix_path"
16868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16870    new_path="$unix_path"
16871  fi
16872
16873  if test "x$path" != "x$new_path"; then
16874    with_devkit="$new_path"
16875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16876$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16877  fi
16878
16879  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16880  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16881
16882    else
16883      # We're on a unix platform. Hooray! :)
16884      path="$with_devkit"
16885      has_space=`$ECHO "$path" | $GREP " "`
16886      if test "x$has_space" != x; then
16887        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16888$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16889        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16890      fi
16891
16892      # Use eval to expand a potential ~
16893      eval path="$path"
16894      if test ! -f "$path" && test ! -d "$path"; then
16895        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16896      fi
16897
16898      if test -d "$path"; then
16899        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16900      else
16901        dir="`$DIRNAME "$path"`"
16902        base="`$BASENAME "$path"`"
16903        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16904      fi
16905    fi
16906  fi
16907
16908        DEVKIT_ROOT="$with_devkit"
16909        # Check for a meta data info file in the root of the devkit
16910        if test -f "$DEVKIT_ROOT/devkit.info"; then
16911          . $DEVKIT_ROOT/devkit.info
16912          # This potentially sets the following:
16913          # A descriptive name of the devkit
16914
16915  if test "x$DEVKIT_NAME" = x; then
16916    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16917  fi
16918
16919          # Corresponds to --with-extra-path
16920
16921  if test "x$DEVKIT_EXTRA_PATH" = x; then
16922    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16923  fi
16924
16925          # Corresponds to --with-toolchain-path
16926
16927  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16928    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16929  fi
16930
16931          # Corresponds to --with-sysroot
16932
16933  if test "x$DEVKIT_SYSROOT" = x; then
16934    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16935  fi
16936
16937
16938          # Identifies the Visual Studio version in the devkit
16939
16940  if test "x$DEVKIT_VS_VERSION" = x; then
16941    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16942  fi
16943
16944          # The Visual Studio include environment variable
16945
16946  if test "x$DEVKIT_VS_INCLUDE" = x; then
16947    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16948  fi
16949
16950          # The Visual Studio lib environment variable
16951
16952  if test "x$DEVKIT_VS_LIB" = x; then
16953    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16954  fi
16955
16956          # Corresponds to --with-msvcr-dll
16957
16958  if test "x$DEVKIT_MSVCR_DLL" = x; then
16959    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16960  fi
16961
16962          # Corresponds to --with-msvcp-dll
16963
16964  if test "x$DEVKIT_MSVCP_DLL" = x; then
16965    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16966  fi
16967
16968        fi
16969
16970        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16971$as_echo_n "checking for devkit... " >&6; }
16972        if test "x$DEVKIT_NAME" != x; then
16973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16974$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16975        else
16976          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16977$as_echo "$DEVKIT_ROOT" >&6; }
16978        fi
16979
16980
16981  if test "x$DEVKIT_EXTRA_PATH" != x; then
16982    if test "x$EXTRA_PATH" = x; then
16983      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16984    else
16985      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16986    fi
16987  fi
16988
16989
16990        # Fallback default of just /bin if DEVKIT_PATH is not defined
16991        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16992          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16993        fi
16994
16995  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16996    if test "x$TOOLCHAIN_PATH" = x; then
16997      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16998    else
16999      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17000    fi
17001  fi
17002
17003
17004        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17005        # places for backwards compatiblity.
17006        if test "x$DEVKIT_SYSROOT" != x; then
17007          SYSROOT="$DEVKIT_SYSROOT"
17008        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17009          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17010        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17011          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17012        fi
17013
17014
17015fi
17016
17017
17018  # You can force the sysroot if the sysroot encoded into the compiler tools
17019  # is not correct.
17020
17021# Check whether --with-sys-root was given.
17022if test "${with_sys_root+set}" = set; then :
17023  withval=$with_sys_root; SYSROOT=$with_sys_root
17024
17025fi
17026
17027
17028
17029# Check whether --with-sysroot was given.
17030if test "${with_sysroot+set}" = set; then :
17031  withval=$with_sysroot; SYSROOT=$with_sysroot
17032
17033fi
17034
17035
17036
17037# Check whether --with-tools-dir was given.
17038if test "${with_tools_dir+set}" = set; then :
17039  withval=$with_tools_dir;
17040  if test "x$with_tools_dir" != x; then
17041    if test "x$TOOLCHAIN_PATH" = x; then
17042      TOOLCHAIN_PATH="$with_tools_dir"
17043    else
17044      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17045    fi
17046  fi
17047
17048
17049fi
17050
17051
17052
17053# Check whether --with-toolchain-path was given.
17054if test "${with_toolchain_path+set}" = set; then :
17055  withval=$with_toolchain_path;
17056  if test "x$with_toolchain_path" != x; then
17057    if test "x$TOOLCHAIN_PATH" = x; then
17058      TOOLCHAIN_PATH="$with_toolchain_path"
17059    else
17060      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17061    fi
17062  fi
17063
17064
17065fi
17066
17067
17068
17069# Check whether --with-extra-path was given.
17070if test "${with_extra_path+set}" = set; then :
17071  withval=$with_extra_path;
17072  if test "x$with_extra_path" != x; then
17073    if test "x$EXTRA_PATH" = x; then
17074      EXTRA_PATH="$with_extra_path"
17075    else
17076      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17077    fi
17078  fi
17079
17080
17081fi
17082
17083
17084  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17085    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17086    # If not, detect if Xcode is installed by running xcodebuild -version
17087    # if no Xcode installed, xcodebuild exits with 1
17088    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17089    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17090      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17091      # fall back on the stub binary in /usr/bin/xcodebuild
17092      # Extract the first word of "xcodebuild", so it can be a program name with args.
17093set dummy xcodebuild; ac_word=$2
17094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17095$as_echo_n "checking for $ac_word... " >&6; }
17096if ${ac_cv_path_XCODEBUILD+:} false; then :
17097  $as_echo_n "(cached) " >&6
17098else
17099  case $XCODEBUILD in
17100  [\\/]* | ?:[\\/]*)
17101  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17102  ;;
17103  *)
17104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17105for as_dir in $TOOLCHAIN_PATH
17106do
17107  IFS=$as_save_IFS
17108  test -z "$as_dir" && as_dir=.
17109    for ac_exec_ext in '' $ac_executable_extensions; do
17110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17111    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17113    break 2
17114  fi
17115done
17116  done
17117IFS=$as_save_IFS
17118
17119  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17120  ;;
17121esac
17122fi
17123XCODEBUILD=$ac_cv_path_XCODEBUILD
17124if test -n "$XCODEBUILD"; then
17125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17126$as_echo "$XCODEBUILD" >&6; }
17127else
17128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17129$as_echo "no" >&6; }
17130fi
17131
17132
17133    else
17134      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17135      # when only the command line tools are installed there are no SDKs, so headers
17136      # are copied into the system frameworks
17137      XCODEBUILD=
17138
17139    fi
17140
17141    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17142$as_echo_n "checking for sdk name... " >&6; }
17143
17144# Check whether --with-sdk-name was given.
17145if test "${with_sdk_name+set}" = set; then :
17146  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17147
17148fi
17149
17150    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17151$as_echo "$SDKNAME" >&6; }
17152
17153    # if toolchain path is specified then don't rely on system headers, they may not compile
17154    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17155    test -z "$TOOLCHAIN_PATH" && \
17156      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17157
17158    if test -z "$SYSROOT"; then
17159      if test -n "$XCODEBUILD"; then
17160        # if we don't have system headers, use default SDK name (last resort)
17161        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17162          SDKNAME=${SDKNAME:-macosx}
17163        fi
17164
17165        if test -n "$SDKNAME"; then
17166          # Call xcodebuild to determine SYSROOT
17167          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17168        fi
17169      else
17170        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17171          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
17172        fi
17173      fi
17174    else
17175      # warn user if --with-sdk-name was also set
17176      if test -n "$with_sdk_name"; then
17177        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17178$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17179      fi
17180    fi
17181
17182    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17183      # If no system framework headers, then SYSROOT must be set, or we won't build
17184      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
17185    fi
17186
17187    # Perform a basic sanity test
17188    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17189      if test -z "$SYSROOT"; then
17190        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
17191      else
17192        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17193      fi
17194    fi
17195
17196    # set SDKROOT too, Xcode tools will pick it up
17197    SDKROOT=$SYSROOT
17198
17199  fi
17200
17201  # Prepend the extra path to the global path
17202
17203  if test "x$EXTRA_PATH" != x; then
17204    if test "x$PATH" = x; then
17205      PATH="$EXTRA_PATH"
17206    else
17207      PATH="$EXTRA_PATH:$PATH"
17208    fi
17209  fi
17210
17211
17212  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17213$as_echo_n "checking for sysroot... " >&6; }
17214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17215$as_echo "$SYSROOT" >&6; }
17216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17217$as_echo_n "checking for toolchain path... " >&6; }
17218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17219$as_echo "$TOOLCHAIN_PATH" >&6; }
17220  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17221$as_echo_n "checking for extra path... " >&6; }
17222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17223$as_echo "$EXTRA_PATH" >&6; }
17224
17225
17226# To properly create a configuration name, we need to have the OpenJDK target
17227# and options (variants and debug level) parsed.
17228
17229
17230
17231# Check whether --with-conf-name was given.
17232if test "${with_conf_name+set}" = set; then :
17233  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17234fi
17235
17236
17237  # Test from where we are running configure, in or outside of src root.
17238  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17239$as_echo_n "checking where to store configuration... " >&6; }
17240  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17241      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17242      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17243    # We are running configure from the src root.
17244    # Create a default ./build/target-variant-debuglevel output root.
17245    if test "x${CONF_NAME}" = x; then
17246      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17247$as_echo "in default location" >&6; }
17248      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17249    else
17250      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17251$as_echo "in build directory with custom name" >&6; }
17252    fi
17253    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17254    $MKDIR -p "$OUTPUT_ROOT"
17255    if test ! -d "$OUTPUT_ROOT"; then
17256      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17257    fi
17258  else
17259    # We are running configure from outside of the src dir.
17260    # Then use the current directory as output dir!
17261    # If configuration is situated in normal build directory, just use the build
17262    # directory name as configuration name, otherwise use the complete path.
17263    if test "x${CONF_NAME}" = x; then
17264      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17265    fi
17266    OUTPUT_ROOT="$CURDIR"
17267    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17268$as_echo "in current directory" >&6; }
17269
17270    # WARNING: This might be a bad thing to do. You need to be sure you want to
17271    # have a configuration in this directory. Do some sanity checks!
17272
17273    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17274      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17275      # other files
17276      files_present=`$LS $OUTPUT_ROOT`
17277      # Configure has already touched config.log and confdefs.h in the current dir when this check
17278      # is performed.
17279      filtered_files=`$ECHO "$files_present" \
17280          | $SED -e 's/config.log//g' \
17281              -e 's/configure.log//g' \
17282              -e 's/confdefs.h//g' \
17283              -e 's/ //g' \
17284          | $TR -d '\n'`
17285      if test "x$filtered_files" != x; then
17286        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17287$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17288        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17289$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17290        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17291$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17292        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17293$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17294        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17295$as_echo "$as_me: seriously mess up just about everything." >&6;}
17296        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17297$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17298        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17299$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17300        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17301      fi
17302    fi
17303  fi
17304  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17305$as_echo_n "checking what configuration name to use... " >&6; }
17306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17307$as_echo "$CONF_NAME" >&6; }
17308
17309
17310  # Only process if variable expands to non-empty
17311
17312  if test "x$OUTPUT_ROOT" != x; then
17313    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17314
17315  # Input might be given as Windows format, start by converting to
17316  # unix format.
17317  path="$OUTPUT_ROOT"
17318  new_path=`$CYGPATH -u "$path"`
17319
17320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17323  # "foo.exe" is OK but "foo" is an error.
17324  #
17325  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17326  # It is also a way to make sure we got the proper file name for the real test later on.
17327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17328  if test "x$test_shortpath" = x; then
17329    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17330$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17331    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17332  fi
17333
17334  # Call helper function which possibly converts this using DOS-style short mode.
17335  # If so, the updated path is stored in $new_path.
17336
17337  input_path="$new_path"
17338  # Check if we need to convert this using DOS-style short mode. If the path
17339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17340  # take no chances and rewrite it.
17341  # Note: m4 eats our [], so we need to use [ and ] instead.
17342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17343  if test "x$has_forbidden_chars" != x; then
17344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17345    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17346    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17347    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17348      # Going to short mode and back again did indeed matter. Since short mode is
17349      # case insensitive, let's make it lowercase to improve readability.
17350      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17351      # Now convert it back to Unix-style (cygpath)
17352      input_path=`$CYGPATH -u "$shortmode_path"`
17353      new_path="$input_path"
17354    fi
17355  fi
17356
17357  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17358  if test "x$test_cygdrive_prefix" = x; then
17359    # As a simple fix, exclude /usr/bin since it's not a real path.
17360    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17361      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17362      # a path prefixed by /cygdrive for fixpath to work.
17363      new_path="$CYGWIN_ROOT_PATH$input_path"
17364    fi
17365  fi
17366
17367
17368  if test "x$path" != "x$new_path"; then
17369    OUTPUT_ROOT="$new_path"
17370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17371$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17372  fi
17373
17374    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17375
17376  path="$OUTPUT_ROOT"
17377  has_colon=`$ECHO $path | $GREP ^.:`
17378  new_path="$path"
17379  if test "x$has_colon" = x; then
17380    # Not in mixed or Windows style, start by that.
17381    new_path=`cmd //c echo $path`
17382  fi
17383
17384
17385  input_path="$new_path"
17386  # Check if we need to convert this using DOS-style short mode. If the path
17387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17388  # take no chances and rewrite it.
17389  # Note: m4 eats our [], so we need to use [ and ] instead.
17390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17391  if test "x$has_forbidden_chars" != x; then
17392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17394  fi
17395
17396
17397  windows_path="$new_path"
17398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17399    unix_path=`$CYGPATH -u "$windows_path"`
17400    new_path="$unix_path"
17401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17403    new_path="$unix_path"
17404  fi
17405
17406  if test "x$path" != "x$new_path"; then
17407    OUTPUT_ROOT="$new_path"
17408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17409$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17410  fi
17411
17412  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17413  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17414
17415    else
17416      # We're on a unix platform. Hooray! :)
17417      path="$OUTPUT_ROOT"
17418      has_space=`$ECHO "$path" | $GREP " "`
17419      if test "x$has_space" != x; then
17420        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17421$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17422        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17423      fi
17424
17425      # Use eval to expand a potential ~
17426      eval path="$path"
17427      if test ! -f "$path" && test ! -d "$path"; then
17428        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17429      fi
17430
17431      if test -d "$path"; then
17432        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17433      else
17434        dir="`$DIRNAME "$path"`"
17435        base="`$BASENAME "$path"`"
17436        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17437      fi
17438    fi
17439  fi
17440
17441
17442  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17443  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17444
17445  SPEC=$OUTPUT_ROOT/spec.gmk
17446
17447  CONF_NAME=$CONF_NAME
17448
17449  OUTPUT_ROOT=$OUTPUT_ROOT
17450
17451
17452
17453  # The spec.gmk file contains all variables for the make system.
17454  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17455
17456  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17457  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17458
17459  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17460  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17461
17462  # The compare.sh is used to compare the build output to other builds.
17463  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17464
17465  # The generated Makefile knows where the spec.gmk is and where the source is.
17466  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17467  # which will look for generated configurations
17468  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17469
17470
17471
17472# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17473
17474  for ac_prog in apt-get yum port pkgutil pkgadd
17475do
17476  # Extract the first word of "$ac_prog", so it can be a program name with args.
17477set dummy $ac_prog; ac_word=$2
17478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17479$as_echo_n "checking for $ac_word... " >&6; }
17480if ${ac_cv_prog_PKGHANDLER+:} false; then :
17481  $as_echo_n "(cached) " >&6
17482else
17483  if test -n "$PKGHANDLER"; then
17484  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17485else
17486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17487for as_dir in $PATH
17488do
17489  IFS=$as_save_IFS
17490  test -z "$as_dir" && as_dir=.
17491    for ac_exec_ext in '' $ac_executable_extensions; do
17492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17493    ac_cv_prog_PKGHANDLER="$ac_prog"
17494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17495    break 2
17496  fi
17497done
17498  done
17499IFS=$as_save_IFS
17500
17501fi
17502fi
17503PKGHANDLER=$ac_cv_prog_PKGHANDLER
17504if test -n "$PKGHANDLER"; then
17505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17506$as_echo "$PKGHANDLER" >&6; }
17507else
17508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17509$as_echo "no" >&6; }
17510fi
17511
17512
17513  test -n "$PKGHANDLER" && break
17514done
17515
17516
17517
17518# Setup tools that requires more complex handling, or that is not needed by the configure script.
17519
17520
17521
17522  # Publish this variable in the help.
17523
17524
17525  if [ -z "${MAKE+x}" ]; then
17526    # The variable is not set by user, try to locate tool using the code snippet
17527
17528    # Try our hardest to locate a correct version of GNU make
17529    for ac_prog in gmake
17530do
17531  # Extract the first word of "$ac_prog", so it can be a program name with args.
17532set dummy $ac_prog; ac_word=$2
17533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17534$as_echo_n "checking for $ac_word... " >&6; }
17535if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17536  $as_echo_n "(cached) " >&6
17537else
17538  case $CHECK_GMAKE in
17539  [\\/]* | ?:[\\/]*)
17540  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17541  ;;
17542  *)
17543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17544for as_dir in $PATH
17545do
17546  IFS=$as_save_IFS
17547  test -z "$as_dir" && as_dir=.
17548    for ac_exec_ext in '' $ac_executable_extensions; do
17549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17550    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17552    break 2
17553  fi
17554done
17555  done
17556IFS=$as_save_IFS
17557
17558  ;;
17559esac
17560fi
17561CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17562if test -n "$CHECK_GMAKE"; then
17563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17564$as_echo "$CHECK_GMAKE" >&6; }
17565else
17566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17567$as_echo "no" >&6; }
17568fi
17569
17570
17571  test -n "$CHECK_GMAKE" && break
17572done
17573
17574
17575  MAKE_CANDIDATE=""$CHECK_GMAKE""
17576  DESCRIPTION="gmake in PATH"
17577
17578  # On Cygwin, we require a newer version of make than on other platforms
17579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17580    MAKE_VERSION_EXPR="-e 4\."
17581    MAKE_REQUIRED_VERSION="4.0"
17582   else
17583    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17584    MAKE_REQUIRED_VERSION="3.81"
17585  fi
17586
17587  if test "x$MAKE_CANDIDATE" != x; then
17588    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17589$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17590    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17591    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17592    if test "x$IS_GNU_MAKE" = x; then
17593      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17594$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17595    else
17596      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17597      if test "x$IS_MODERN_MAKE" = x; then
17598        { $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
17599$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;}
17600      else
17601        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17602          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17603            MAKE_EXPECTED_ENV='cygwin'
17604          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17605            MAKE_EXPECTED_ENV='msys'
17606          else
17607            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17608          fi
17609          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17610          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17611        else
17612          # Not relevant for non-Windows
17613          IS_MAKE_CORRECT_ENV=true
17614        fi
17615        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17616          { $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
17617$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;}
17618        else
17619          FOUND_MAKE=$MAKE_CANDIDATE
17620
17621  # Only process if variable expands to non-empty
17622
17623  if test "x$FOUND_MAKE" != x; then
17624    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17625
17626  # First separate the path from the arguments. This will split at the first
17627  # space.
17628  complete="$FOUND_MAKE"
17629  path="${complete%% *}"
17630  tmp="$complete EOL"
17631  arguments="${tmp#* }"
17632
17633  # Input might be given as Windows format, start by converting to
17634  # unix format.
17635  new_path=`$CYGPATH -u "$path"`
17636
17637  # Now try to locate executable using which
17638  new_path=`$WHICH "$new_path" 2> /dev/null`
17639  # bat and cmd files are not always considered executable in cygwin causing which
17640  # to not find them
17641  if test "x$new_path" = x \
17642      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17643      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17644    new_path=`$CYGPATH -u "$path"`
17645  fi
17646  if test "x$new_path" = x; then
17647    # Oops. Which didn't find the executable.
17648    # The splitting of arguments from the executable at a space might have been incorrect,
17649    # since paths with space are more likely in Windows. Give it another try with the whole
17650    # argument.
17651    path="$complete"
17652    arguments="EOL"
17653    new_path=`$CYGPATH -u "$path"`
17654    new_path=`$WHICH "$new_path" 2> /dev/null`
17655    # bat and cmd files are not always considered executable in cygwin causing which
17656    # to not find them
17657    if test "x$new_path" = x \
17658        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17659        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17660      new_path=`$CYGPATH -u "$path"`
17661    fi
17662    if test "x$new_path" = x; then
17663      # It's still not found. Now this is an unrecoverable error.
17664      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17665$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17666      has_space=`$ECHO "$complete" | $GREP " "`
17667      if test "x$has_space" != x; then
17668        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17669$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17670      fi
17671      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17672    fi
17673  fi
17674
17675  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17676  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17677  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17678  # "foo.exe" is OK but "foo" is an error.
17679  #
17680  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17681  # It is also a way to make sure we got the proper file name for the real test later on.
17682  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17683  if test "x$test_shortpath" = x; then
17684    # Short path failed, file does not exist as specified.
17685    # Try adding .exe or .cmd
17686    if test -f "${new_path}.exe"; then
17687      input_to_shortpath="${new_path}.exe"
17688    elif test -f "${new_path}.cmd"; then
17689      input_to_shortpath="${new_path}.cmd"
17690    else
17691      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17692$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17693      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17694$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17695      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17696    fi
17697  else
17698    input_to_shortpath="$new_path"
17699  fi
17700
17701  # Call helper function which possibly converts this using DOS-style short mode.
17702  # If so, the updated path is stored in $new_path.
17703  new_path="$input_to_shortpath"
17704
17705  input_path="$input_to_shortpath"
17706  # Check if we need to convert this using DOS-style short mode. If the path
17707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17708  # take no chances and rewrite it.
17709  # Note: m4 eats our [], so we need to use [ and ] instead.
17710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17711  if test "x$has_forbidden_chars" != x; then
17712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17713    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17716      # Going to short mode and back again did indeed matter. Since short mode is
17717      # case insensitive, let's make it lowercase to improve readability.
17718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17719      # Now convert it back to Unix-style (cygpath)
17720      input_path=`$CYGPATH -u "$shortmode_path"`
17721      new_path="$input_path"
17722    fi
17723  fi
17724
17725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17726  if test "x$test_cygdrive_prefix" = x; then
17727    # As a simple fix, exclude /usr/bin since it's not a real path.
17728    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17730      # a path prefixed by /cygdrive for fixpath to work.
17731      new_path="$CYGWIN_ROOT_PATH$input_path"
17732    fi
17733  fi
17734
17735  # remove trailing .exe if any
17736  new_path="${new_path/%.exe/}"
17737
17738    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17739
17740  # First separate the path from the arguments. This will split at the first
17741  # space.
17742  complete="$FOUND_MAKE"
17743  path="${complete%% *}"
17744  tmp="$complete EOL"
17745  arguments="${tmp#* }"
17746
17747  # Input might be given as Windows format, start by converting to
17748  # unix format.
17749  new_path="$path"
17750
17751  windows_path="$new_path"
17752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17753    unix_path=`$CYGPATH -u "$windows_path"`
17754    new_path="$unix_path"
17755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17757    new_path="$unix_path"
17758  fi
17759
17760
17761  # Now try to locate executable using which
17762  new_path=`$WHICH "$new_path" 2> /dev/null`
17763
17764  if test "x$new_path" = x; then
17765    # Oops. Which didn't find the executable.
17766    # The splitting of arguments from the executable at a space might have been incorrect,
17767    # since paths with space are more likely in Windows. Give it another try with the whole
17768    # argument.
17769    path="$complete"
17770    arguments="EOL"
17771    new_path="$path"
17772
17773  windows_path="$new_path"
17774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17775    unix_path=`$CYGPATH -u "$windows_path"`
17776    new_path="$unix_path"
17777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17779    new_path="$unix_path"
17780  fi
17781
17782
17783    new_path=`$WHICH "$new_path" 2> /dev/null`
17784    # bat and cmd files are not always considered executable in MSYS causing which
17785    # to not find them
17786    if test "x$new_path" = x \
17787        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17788        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17789      new_path="$path"
17790
17791  windows_path="$new_path"
17792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17793    unix_path=`$CYGPATH -u "$windows_path"`
17794    new_path="$unix_path"
17795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17797    new_path="$unix_path"
17798  fi
17799
17800    fi
17801
17802    if test "x$new_path" = x; then
17803      # It's still not found. Now this is an unrecoverable error.
17804      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17805$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17806      has_space=`$ECHO "$complete" | $GREP " "`
17807      if test "x$has_space" != x; then
17808        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17809$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17810      fi
17811      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17812    fi
17813  fi
17814
17815  # Now new_path has a complete unix path to the binary
17816  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17817    # Keep paths in /bin as-is, but remove trailing .exe if any
17818    new_path="${new_path/%.exe/}"
17819    # Do not save /bin paths to all_fixpath_prefixes!
17820  else
17821    # Not in mixed or Windows style, start by that.
17822    new_path=`cmd //c echo $new_path`
17823
17824  input_path="$new_path"
17825  # Check if we need to convert this using DOS-style short mode. If the path
17826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17827  # take no chances and rewrite it.
17828  # Note: m4 eats our [], so we need to use [ and ] instead.
17829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17830  if test "x$has_forbidden_chars" != x; then
17831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17832    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17833  fi
17834
17835    # Output is in $new_path
17836
17837  windows_path="$new_path"
17838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17839    unix_path=`$CYGPATH -u "$windows_path"`
17840    new_path="$unix_path"
17841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17843    new_path="$unix_path"
17844  fi
17845
17846    # remove trailing .exe if any
17847    new_path="${new_path/%.exe/}"
17848
17849    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17850    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17851  fi
17852
17853    else
17854      # We're on a unix platform. Hooray! :)
17855      # First separate the path from the arguments. This will split at the first
17856      # space.
17857      complete="$FOUND_MAKE"
17858      path="${complete%% *}"
17859      tmp="$complete EOL"
17860      arguments="${tmp#* }"
17861
17862      # Cannot rely on the command "which" here since it doesn't always work.
17863      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17864      if test -z "$is_absolute_path"; then
17865        # Path to executable is not absolute. Find it.
17866        IFS_save="$IFS"
17867        IFS=:
17868        for p in $PATH; do
17869          if test -f "$p/$path" && test -x "$p/$path"; then
17870            new_path="$p/$path"
17871            break
17872          fi
17873        done
17874        IFS="$IFS_save"
17875      else
17876        # This is an absolute path, we can use it without further modifications.
17877        new_path="$path"
17878      fi
17879
17880      if test "x$new_path" = x; then
17881        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17882$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17883        has_space=`$ECHO "$complete" | $GREP " "`
17884        if test "x$has_space" != x; then
17885          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17886$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17887        fi
17888        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17889      fi
17890    fi
17891
17892    # Now join together the path and the arguments once again
17893    if test "x$arguments" != xEOL; then
17894      new_complete="$new_path ${arguments% *}"
17895    else
17896      new_complete="$new_path"
17897    fi
17898
17899    if test "x$complete" != "x$new_complete"; then
17900      FOUND_MAKE="$new_complete"
17901      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17902$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17903    fi
17904  fi
17905
17906        fi
17907      fi
17908    fi
17909  fi
17910
17911
17912    if test "x$FOUND_MAKE" = x; then
17913      for ac_prog in make
17914do
17915  # Extract the first word of "$ac_prog", so it can be a program name with args.
17916set dummy $ac_prog; ac_word=$2
17917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17918$as_echo_n "checking for $ac_word... " >&6; }
17919if ${ac_cv_path_CHECK_MAKE+:} false; then :
17920  $as_echo_n "(cached) " >&6
17921else
17922  case $CHECK_MAKE in
17923  [\\/]* | ?:[\\/]*)
17924  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17925  ;;
17926  *)
17927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17928for as_dir in $PATH
17929do
17930  IFS=$as_save_IFS
17931  test -z "$as_dir" && as_dir=.
17932    for ac_exec_ext in '' $ac_executable_extensions; do
17933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17934    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17936    break 2
17937  fi
17938done
17939  done
17940IFS=$as_save_IFS
17941
17942  ;;
17943esac
17944fi
17945CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17946if test -n "$CHECK_MAKE"; then
17947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17948$as_echo "$CHECK_MAKE" >&6; }
17949else
17950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17951$as_echo "no" >&6; }
17952fi
17953
17954
17955  test -n "$CHECK_MAKE" && break
17956done
17957
17958
17959  MAKE_CANDIDATE=""$CHECK_MAKE""
17960  DESCRIPTION="make in PATH"
17961
17962  # On Cygwin, we require a newer version of make than on other platforms
17963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17964    MAKE_VERSION_EXPR="-e 4\."
17965    MAKE_REQUIRED_VERSION="4.0"
17966   else
17967    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17968    MAKE_REQUIRED_VERSION="3.81"
17969  fi
17970
17971  if test "x$MAKE_CANDIDATE" != x; then
17972    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17973$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17974    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17975    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17976    if test "x$IS_GNU_MAKE" = x; then
17977      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17978$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17979    else
17980      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17981      if test "x$IS_MODERN_MAKE" = x; then
17982        { $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
17983$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;}
17984      else
17985        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17986          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17987            MAKE_EXPECTED_ENV='cygwin'
17988          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17989            MAKE_EXPECTED_ENV='msys'
17990          else
17991            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17992          fi
17993          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17994          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17995        else
17996          # Not relevant for non-Windows
17997          IS_MAKE_CORRECT_ENV=true
17998        fi
17999        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18000          { $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
18001$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;}
18002        else
18003          FOUND_MAKE=$MAKE_CANDIDATE
18004
18005  # Only process if variable expands to non-empty
18006
18007  if test "x$FOUND_MAKE" != x; then
18008    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18009
18010  # First separate the path from the arguments. This will split at the first
18011  # space.
18012  complete="$FOUND_MAKE"
18013  path="${complete%% *}"
18014  tmp="$complete EOL"
18015  arguments="${tmp#* }"
18016
18017  # Input might be given as Windows format, start by converting to
18018  # unix format.
18019  new_path=`$CYGPATH -u "$path"`
18020
18021  # Now try to locate executable using which
18022  new_path=`$WHICH "$new_path" 2> /dev/null`
18023  # bat and cmd files are not always considered executable in cygwin causing which
18024  # to not find them
18025  if test "x$new_path" = x \
18026      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18027      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18028    new_path=`$CYGPATH -u "$path"`
18029  fi
18030  if test "x$new_path" = x; then
18031    # Oops. Which didn't find the executable.
18032    # The splitting of arguments from the executable at a space might have been incorrect,
18033    # since paths with space are more likely in Windows. Give it another try with the whole
18034    # argument.
18035    path="$complete"
18036    arguments="EOL"
18037    new_path=`$CYGPATH -u "$path"`
18038    new_path=`$WHICH "$new_path" 2> /dev/null`
18039    # bat and cmd files are not always considered executable in cygwin causing which
18040    # to not find them
18041    if test "x$new_path" = x \
18042        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18043        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18044      new_path=`$CYGPATH -u "$path"`
18045    fi
18046    if test "x$new_path" = x; then
18047      # It's still not found. Now this is an unrecoverable error.
18048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18049$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18050      has_space=`$ECHO "$complete" | $GREP " "`
18051      if test "x$has_space" != x; then
18052        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18053$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18054      fi
18055      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18056    fi
18057  fi
18058
18059  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18060  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18061  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18062  # "foo.exe" is OK but "foo" is an error.
18063  #
18064  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18065  # It is also a way to make sure we got the proper file name for the real test later on.
18066  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18067  if test "x$test_shortpath" = x; then
18068    # Short path failed, file does not exist as specified.
18069    # Try adding .exe or .cmd
18070    if test -f "${new_path}.exe"; then
18071      input_to_shortpath="${new_path}.exe"
18072    elif test -f "${new_path}.cmd"; then
18073      input_to_shortpath="${new_path}.cmd"
18074    else
18075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18076$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18077      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18078$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18079      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18080    fi
18081  else
18082    input_to_shortpath="$new_path"
18083  fi
18084
18085  # Call helper function which possibly converts this using DOS-style short mode.
18086  # If so, the updated path is stored in $new_path.
18087  new_path="$input_to_shortpath"
18088
18089  input_path="$input_to_shortpath"
18090  # Check if we need to convert this using DOS-style short mode. If the path
18091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18092  # take no chances and rewrite it.
18093  # Note: m4 eats our [], so we need to use [ and ] instead.
18094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18095  if test "x$has_forbidden_chars" != x; then
18096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18100      # Going to short mode and back again did indeed matter. Since short mode is
18101      # case insensitive, let's make it lowercase to improve readability.
18102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18103      # Now convert it back to Unix-style (cygpath)
18104      input_path=`$CYGPATH -u "$shortmode_path"`
18105      new_path="$input_path"
18106    fi
18107  fi
18108
18109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18110  if test "x$test_cygdrive_prefix" = x; then
18111    # As a simple fix, exclude /usr/bin since it's not a real path.
18112    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18114      # a path prefixed by /cygdrive for fixpath to work.
18115      new_path="$CYGWIN_ROOT_PATH$input_path"
18116    fi
18117  fi
18118
18119  # remove trailing .exe if any
18120  new_path="${new_path/%.exe/}"
18121
18122    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18123
18124  # First separate the path from the arguments. This will split at the first
18125  # space.
18126  complete="$FOUND_MAKE"
18127  path="${complete%% *}"
18128  tmp="$complete EOL"
18129  arguments="${tmp#* }"
18130
18131  # Input might be given as Windows format, start by converting to
18132  # unix format.
18133  new_path="$path"
18134
18135  windows_path="$new_path"
18136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18137    unix_path=`$CYGPATH -u "$windows_path"`
18138    new_path="$unix_path"
18139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18141    new_path="$unix_path"
18142  fi
18143
18144
18145  # Now try to locate executable using which
18146  new_path=`$WHICH "$new_path" 2> /dev/null`
18147
18148  if test "x$new_path" = x; then
18149    # Oops. Which didn't find the executable.
18150    # The splitting of arguments from the executable at a space might have been incorrect,
18151    # since paths with space are more likely in Windows. Give it another try with the whole
18152    # argument.
18153    path="$complete"
18154    arguments="EOL"
18155    new_path="$path"
18156
18157  windows_path="$new_path"
18158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18159    unix_path=`$CYGPATH -u "$windows_path"`
18160    new_path="$unix_path"
18161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18163    new_path="$unix_path"
18164  fi
18165
18166
18167    new_path=`$WHICH "$new_path" 2> /dev/null`
18168    # bat and cmd files are not always considered executable in MSYS causing which
18169    # to not find them
18170    if test "x$new_path" = x \
18171        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18172        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18173      new_path="$path"
18174
18175  windows_path="$new_path"
18176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18177    unix_path=`$CYGPATH -u "$windows_path"`
18178    new_path="$unix_path"
18179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18181    new_path="$unix_path"
18182  fi
18183
18184    fi
18185
18186    if test "x$new_path" = x; then
18187      # It's still not found. Now this is an unrecoverable error.
18188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18189$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18190      has_space=`$ECHO "$complete" | $GREP " "`
18191      if test "x$has_space" != x; then
18192        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18193$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18194      fi
18195      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18196    fi
18197  fi
18198
18199  # Now new_path has a complete unix path to the binary
18200  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18201    # Keep paths in /bin as-is, but remove trailing .exe if any
18202    new_path="${new_path/%.exe/}"
18203    # Do not save /bin paths to all_fixpath_prefixes!
18204  else
18205    # Not in mixed or Windows style, start by that.
18206    new_path=`cmd //c echo $new_path`
18207
18208  input_path="$new_path"
18209  # Check if we need to convert this using DOS-style short mode. If the path
18210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18211  # take no chances and rewrite it.
18212  # Note: m4 eats our [], so we need to use [ and ] instead.
18213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18214  if test "x$has_forbidden_chars" != x; then
18215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18216    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18217  fi
18218
18219    # Output is in $new_path
18220
18221  windows_path="$new_path"
18222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18223    unix_path=`$CYGPATH -u "$windows_path"`
18224    new_path="$unix_path"
18225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18227    new_path="$unix_path"
18228  fi
18229
18230    # remove trailing .exe if any
18231    new_path="${new_path/%.exe/}"
18232
18233    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18234    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18235  fi
18236
18237    else
18238      # We're on a unix platform. Hooray! :)
18239      # First separate the path from the arguments. This will split at the first
18240      # space.
18241      complete="$FOUND_MAKE"
18242      path="${complete%% *}"
18243      tmp="$complete EOL"
18244      arguments="${tmp#* }"
18245
18246      # Cannot rely on the command "which" here since it doesn't always work.
18247      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18248      if test -z "$is_absolute_path"; then
18249        # Path to executable is not absolute. Find it.
18250        IFS_save="$IFS"
18251        IFS=:
18252        for p in $PATH; do
18253          if test -f "$p/$path" && test -x "$p/$path"; then
18254            new_path="$p/$path"
18255            break
18256          fi
18257        done
18258        IFS="$IFS_save"
18259      else
18260        # This is an absolute path, we can use it without further modifications.
18261        new_path="$path"
18262      fi
18263
18264      if test "x$new_path" = x; then
18265        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18266$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18267        has_space=`$ECHO "$complete" | $GREP " "`
18268        if test "x$has_space" != x; then
18269          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18270$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18271        fi
18272        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18273      fi
18274    fi
18275
18276    # Now join together the path and the arguments once again
18277    if test "x$arguments" != xEOL; then
18278      new_complete="$new_path ${arguments% *}"
18279    else
18280      new_complete="$new_path"
18281    fi
18282
18283    if test "x$complete" != "x$new_complete"; then
18284      FOUND_MAKE="$new_complete"
18285      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18286$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18287    fi
18288  fi
18289
18290        fi
18291      fi
18292    fi
18293  fi
18294
18295    fi
18296
18297    if test "x$FOUND_MAKE" = x; then
18298      if test "x$TOOLCHAIN_PATH" != x; then
18299        # We have a toolchain path, check that as well before giving up.
18300        OLD_PATH=$PATH
18301        PATH=$TOOLCHAIN_PATH:$PATH
18302        for ac_prog in gmake
18303do
18304  # Extract the first word of "$ac_prog", so it can be a program name with args.
18305set dummy $ac_prog; ac_word=$2
18306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18307$as_echo_n "checking for $ac_word... " >&6; }
18308if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18309  $as_echo_n "(cached) " >&6
18310else
18311  case $CHECK_TOOLSDIR_GMAKE in
18312  [\\/]* | ?:[\\/]*)
18313  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18314  ;;
18315  *)
18316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18317for as_dir in $PATH
18318do
18319  IFS=$as_save_IFS
18320  test -z "$as_dir" && as_dir=.
18321    for ac_exec_ext in '' $ac_executable_extensions; do
18322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18323    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18325    break 2
18326  fi
18327done
18328  done
18329IFS=$as_save_IFS
18330
18331  ;;
18332esac
18333fi
18334CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18335if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18337$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18338else
18339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18340$as_echo "no" >&6; }
18341fi
18342
18343
18344  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18345done
18346
18347
18348  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18349  DESCRIPTION="gmake in tools-dir"
18350
18351  # On Cygwin, we require a newer version of make than on other platforms
18352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18353    MAKE_VERSION_EXPR="-e 4\."
18354    MAKE_REQUIRED_VERSION="4.0"
18355   else
18356    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18357    MAKE_REQUIRED_VERSION="3.81"
18358  fi
18359
18360  if test "x$MAKE_CANDIDATE" != x; then
18361    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18362$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18363    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18364    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18365    if test "x$IS_GNU_MAKE" = x; then
18366      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18367$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18368    else
18369      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18370      if test "x$IS_MODERN_MAKE" = x; then
18371        { $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
18372$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;}
18373      else
18374        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18375          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18376            MAKE_EXPECTED_ENV='cygwin'
18377          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18378            MAKE_EXPECTED_ENV='msys'
18379          else
18380            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18381          fi
18382          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18383          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18384        else
18385          # Not relevant for non-Windows
18386          IS_MAKE_CORRECT_ENV=true
18387        fi
18388        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18389          { $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
18390$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;}
18391        else
18392          FOUND_MAKE=$MAKE_CANDIDATE
18393
18394  # Only process if variable expands to non-empty
18395
18396  if test "x$FOUND_MAKE" != x; then
18397    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18398
18399  # First separate the path from the arguments. This will split at the first
18400  # space.
18401  complete="$FOUND_MAKE"
18402  path="${complete%% *}"
18403  tmp="$complete EOL"
18404  arguments="${tmp#* }"
18405
18406  # Input might be given as Windows format, start by converting to
18407  # unix format.
18408  new_path=`$CYGPATH -u "$path"`
18409
18410  # Now try to locate executable using which
18411  new_path=`$WHICH "$new_path" 2> /dev/null`
18412  # bat and cmd files are not always considered executable in cygwin causing which
18413  # to not find them
18414  if test "x$new_path" = x \
18415      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18416      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18417    new_path=`$CYGPATH -u "$path"`
18418  fi
18419  if test "x$new_path" = x; then
18420    # Oops. Which didn't find the executable.
18421    # The splitting of arguments from the executable at a space might have been incorrect,
18422    # since paths with space are more likely in Windows. Give it another try with the whole
18423    # argument.
18424    path="$complete"
18425    arguments="EOL"
18426    new_path=`$CYGPATH -u "$path"`
18427    new_path=`$WHICH "$new_path" 2> /dev/null`
18428    # bat and cmd files are not always considered executable in cygwin causing which
18429    # to not find them
18430    if test "x$new_path" = x \
18431        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18432        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18433      new_path=`$CYGPATH -u "$path"`
18434    fi
18435    if test "x$new_path" = x; then
18436      # It's still not found. Now this is an unrecoverable error.
18437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18438$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18439      has_space=`$ECHO "$complete" | $GREP " "`
18440      if test "x$has_space" != x; then
18441        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18442$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18443      fi
18444      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18445    fi
18446  fi
18447
18448  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18449  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18450  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18451  # "foo.exe" is OK but "foo" is an error.
18452  #
18453  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18454  # It is also a way to make sure we got the proper file name for the real test later on.
18455  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18456  if test "x$test_shortpath" = x; then
18457    # Short path failed, file does not exist as specified.
18458    # Try adding .exe or .cmd
18459    if test -f "${new_path}.exe"; then
18460      input_to_shortpath="${new_path}.exe"
18461    elif test -f "${new_path}.cmd"; then
18462      input_to_shortpath="${new_path}.cmd"
18463    else
18464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18465$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18466      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18467$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18468      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18469    fi
18470  else
18471    input_to_shortpath="$new_path"
18472  fi
18473
18474  # Call helper function which possibly converts this using DOS-style short mode.
18475  # If so, the updated path is stored in $new_path.
18476  new_path="$input_to_shortpath"
18477
18478  input_path="$input_to_shortpath"
18479  # Check if we need to convert this using DOS-style short mode. If the path
18480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18481  # take no chances and rewrite it.
18482  # Note: m4 eats our [], so we need to use [ and ] instead.
18483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18484  if test "x$has_forbidden_chars" != x; then
18485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18486    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18487    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18488    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18489      # Going to short mode and back again did indeed matter. Since short mode is
18490      # case insensitive, let's make it lowercase to improve readability.
18491      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18492      # Now convert it back to Unix-style (cygpath)
18493      input_path=`$CYGPATH -u "$shortmode_path"`
18494      new_path="$input_path"
18495    fi
18496  fi
18497
18498  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18499  if test "x$test_cygdrive_prefix" = x; then
18500    # As a simple fix, exclude /usr/bin since it's not a real path.
18501    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18502      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18503      # a path prefixed by /cygdrive for fixpath to work.
18504      new_path="$CYGWIN_ROOT_PATH$input_path"
18505    fi
18506  fi
18507
18508  # remove trailing .exe if any
18509  new_path="${new_path/%.exe/}"
18510
18511    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18512
18513  # First separate the path from the arguments. This will split at the first
18514  # space.
18515  complete="$FOUND_MAKE"
18516  path="${complete%% *}"
18517  tmp="$complete EOL"
18518  arguments="${tmp#* }"
18519
18520  # Input might be given as Windows format, start by converting to
18521  # unix format.
18522  new_path="$path"
18523
18524  windows_path="$new_path"
18525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18526    unix_path=`$CYGPATH -u "$windows_path"`
18527    new_path="$unix_path"
18528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18530    new_path="$unix_path"
18531  fi
18532
18533
18534  # Now try to locate executable using which
18535  new_path=`$WHICH "$new_path" 2> /dev/null`
18536
18537  if test "x$new_path" = x; then
18538    # Oops. Which didn't find the executable.
18539    # The splitting of arguments from the executable at a space might have been incorrect,
18540    # since paths with space are more likely in Windows. Give it another try with the whole
18541    # argument.
18542    path="$complete"
18543    arguments="EOL"
18544    new_path="$path"
18545
18546  windows_path="$new_path"
18547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18548    unix_path=`$CYGPATH -u "$windows_path"`
18549    new_path="$unix_path"
18550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18552    new_path="$unix_path"
18553  fi
18554
18555
18556    new_path=`$WHICH "$new_path" 2> /dev/null`
18557    # bat and cmd files are not always considered executable in MSYS causing which
18558    # to not find them
18559    if test "x$new_path" = x \
18560        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18561        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18562      new_path="$path"
18563
18564  windows_path="$new_path"
18565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18566    unix_path=`$CYGPATH -u "$windows_path"`
18567    new_path="$unix_path"
18568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18570    new_path="$unix_path"
18571  fi
18572
18573    fi
18574
18575    if test "x$new_path" = x; then
18576      # It's still not found. Now this is an unrecoverable error.
18577      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18578$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18579      has_space=`$ECHO "$complete" | $GREP " "`
18580      if test "x$has_space" != x; then
18581        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18582$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18583      fi
18584      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18585    fi
18586  fi
18587
18588  # Now new_path has a complete unix path to the binary
18589  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18590    # Keep paths in /bin as-is, but remove trailing .exe if any
18591    new_path="${new_path/%.exe/}"
18592    # Do not save /bin paths to all_fixpath_prefixes!
18593  else
18594    # Not in mixed or Windows style, start by that.
18595    new_path=`cmd //c echo $new_path`
18596
18597  input_path="$new_path"
18598  # Check if we need to convert this using DOS-style short mode. If the path
18599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18600  # take no chances and rewrite it.
18601  # Note: m4 eats our [], so we need to use [ and ] instead.
18602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18603  if test "x$has_forbidden_chars" != x; then
18604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18605    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18606  fi
18607
18608    # Output is in $new_path
18609
18610  windows_path="$new_path"
18611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18612    unix_path=`$CYGPATH -u "$windows_path"`
18613    new_path="$unix_path"
18614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18616    new_path="$unix_path"
18617  fi
18618
18619    # remove trailing .exe if any
18620    new_path="${new_path/%.exe/}"
18621
18622    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18623    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18624  fi
18625
18626    else
18627      # We're on a unix platform. Hooray! :)
18628      # First separate the path from the arguments. This will split at the first
18629      # space.
18630      complete="$FOUND_MAKE"
18631      path="${complete%% *}"
18632      tmp="$complete EOL"
18633      arguments="${tmp#* }"
18634
18635      # Cannot rely on the command "which" here since it doesn't always work.
18636      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18637      if test -z "$is_absolute_path"; then
18638        # Path to executable is not absolute. Find it.
18639        IFS_save="$IFS"
18640        IFS=:
18641        for p in $PATH; do
18642          if test -f "$p/$path" && test -x "$p/$path"; then
18643            new_path="$p/$path"
18644            break
18645          fi
18646        done
18647        IFS="$IFS_save"
18648      else
18649        # This is an absolute path, we can use it without further modifications.
18650        new_path="$path"
18651      fi
18652
18653      if test "x$new_path" = x; then
18654        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18655$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18656        has_space=`$ECHO "$complete" | $GREP " "`
18657        if test "x$has_space" != x; then
18658          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18659$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18660        fi
18661        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18662      fi
18663    fi
18664
18665    # Now join together the path and the arguments once again
18666    if test "x$arguments" != xEOL; then
18667      new_complete="$new_path ${arguments% *}"
18668    else
18669      new_complete="$new_path"
18670    fi
18671
18672    if test "x$complete" != "x$new_complete"; then
18673      FOUND_MAKE="$new_complete"
18674      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18675$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18676    fi
18677  fi
18678
18679        fi
18680      fi
18681    fi
18682  fi
18683
18684        if test "x$FOUND_MAKE" = x; then
18685          for ac_prog in make
18686do
18687  # Extract the first word of "$ac_prog", so it can be a program name with args.
18688set dummy $ac_prog; ac_word=$2
18689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18690$as_echo_n "checking for $ac_word... " >&6; }
18691if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18692  $as_echo_n "(cached) " >&6
18693else
18694  case $CHECK_TOOLSDIR_MAKE in
18695  [\\/]* | ?:[\\/]*)
18696  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18697  ;;
18698  *)
18699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18700for as_dir in $PATH
18701do
18702  IFS=$as_save_IFS
18703  test -z "$as_dir" && as_dir=.
18704    for ac_exec_ext in '' $ac_executable_extensions; do
18705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18706    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18708    break 2
18709  fi
18710done
18711  done
18712IFS=$as_save_IFS
18713
18714  ;;
18715esac
18716fi
18717CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18718if test -n "$CHECK_TOOLSDIR_MAKE"; then
18719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18720$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18721else
18722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18723$as_echo "no" >&6; }
18724fi
18725
18726
18727  test -n "$CHECK_TOOLSDIR_MAKE" && break
18728done
18729
18730
18731  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18732  DESCRIPTION="make in tools-dir"
18733
18734  # On Cygwin, we require a newer version of make than on other platforms
18735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18736    MAKE_VERSION_EXPR="-e 4\."
18737    MAKE_REQUIRED_VERSION="4.0"
18738   else
18739    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18740    MAKE_REQUIRED_VERSION="3.81"
18741  fi
18742
18743  if test "x$MAKE_CANDIDATE" != x; then
18744    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18745$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18746    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18747    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18748    if test "x$IS_GNU_MAKE" = x; then
18749      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18750$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18751    else
18752      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18753      if test "x$IS_MODERN_MAKE" = x; then
18754        { $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
18755$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;}
18756      else
18757        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18758          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18759            MAKE_EXPECTED_ENV='cygwin'
18760          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18761            MAKE_EXPECTED_ENV='msys'
18762          else
18763            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18764          fi
18765          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18766          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18767        else
18768          # Not relevant for non-Windows
18769          IS_MAKE_CORRECT_ENV=true
18770        fi
18771        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18772          { $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
18773$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;}
18774        else
18775          FOUND_MAKE=$MAKE_CANDIDATE
18776
18777  # Only process if variable expands to non-empty
18778
18779  if test "x$FOUND_MAKE" != x; then
18780    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18781
18782  # First separate the path from the arguments. This will split at the first
18783  # space.
18784  complete="$FOUND_MAKE"
18785  path="${complete%% *}"
18786  tmp="$complete EOL"
18787  arguments="${tmp#* }"
18788
18789  # Input might be given as Windows format, start by converting to
18790  # unix format.
18791  new_path=`$CYGPATH -u "$path"`
18792
18793  # Now try to locate executable using which
18794  new_path=`$WHICH "$new_path" 2> /dev/null`
18795  # bat and cmd files are not always considered executable in cygwin causing which
18796  # to not find them
18797  if test "x$new_path" = x \
18798      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18799      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18800    new_path=`$CYGPATH -u "$path"`
18801  fi
18802  if test "x$new_path" = x; then
18803    # Oops. Which didn't find the executable.
18804    # The splitting of arguments from the executable at a space might have been incorrect,
18805    # since paths with space are more likely in Windows. Give it another try with the whole
18806    # argument.
18807    path="$complete"
18808    arguments="EOL"
18809    new_path=`$CYGPATH -u "$path"`
18810    new_path=`$WHICH "$new_path" 2> /dev/null`
18811    # bat and cmd files are not always considered executable in cygwin causing which
18812    # to not find them
18813    if test "x$new_path" = x \
18814        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18815        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18816      new_path=`$CYGPATH -u "$path"`
18817    fi
18818    if test "x$new_path" = x; then
18819      # It's still not found. Now this is an unrecoverable error.
18820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18821$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18822      has_space=`$ECHO "$complete" | $GREP " "`
18823      if test "x$has_space" != x; then
18824        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18825$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18826      fi
18827      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18828    fi
18829  fi
18830
18831  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18832  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18833  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18834  # "foo.exe" is OK but "foo" is an error.
18835  #
18836  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18837  # It is also a way to make sure we got the proper file name for the real test later on.
18838  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18839  if test "x$test_shortpath" = x; then
18840    # Short path failed, file does not exist as specified.
18841    # Try adding .exe or .cmd
18842    if test -f "${new_path}.exe"; then
18843      input_to_shortpath="${new_path}.exe"
18844    elif test -f "${new_path}.cmd"; then
18845      input_to_shortpath="${new_path}.cmd"
18846    else
18847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18848$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18849      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18850$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18851      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18852    fi
18853  else
18854    input_to_shortpath="$new_path"
18855  fi
18856
18857  # Call helper function which possibly converts this using DOS-style short mode.
18858  # If so, the updated path is stored in $new_path.
18859  new_path="$input_to_shortpath"
18860
18861  input_path="$input_to_shortpath"
18862  # Check if we need to convert this using DOS-style short mode. If the path
18863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18864  # take no chances and rewrite it.
18865  # Note: m4 eats our [], so we need to use [ and ] instead.
18866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18867  if test "x$has_forbidden_chars" != x; then
18868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18869    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18870    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18871    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18872      # Going to short mode and back again did indeed matter. Since short mode is
18873      # case insensitive, let's make it lowercase to improve readability.
18874      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18875      # Now convert it back to Unix-style (cygpath)
18876      input_path=`$CYGPATH -u "$shortmode_path"`
18877      new_path="$input_path"
18878    fi
18879  fi
18880
18881  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18882  if test "x$test_cygdrive_prefix" = x; then
18883    # As a simple fix, exclude /usr/bin since it's not a real path.
18884    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18885      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18886      # a path prefixed by /cygdrive for fixpath to work.
18887      new_path="$CYGWIN_ROOT_PATH$input_path"
18888    fi
18889  fi
18890
18891  # remove trailing .exe if any
18892  new_path="${new_path/%.exe/}"
18893
18894    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18895
18896  # First separate the path from the arguments. This will split at the first
18897  # space.
18898  complete="$FOUND_MAKE"
18899  path="${complete%% *}"
18900  tmp="$complete EOL"
18901  arguments="${tmp#* }"
18902
18903  # Input might be given as Windows format, start by converting to
18904  # unix format.
18905  new_path="$path"
18906
18907  windows_path="$new_path"
18908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18909    unix_path=`$CYGPATH -u "$windows_path"`
18910    new_path="$unix_path"
18911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18913    new_path="$unix_path"
18914  fi
18915
18916
18917  # Now try to locate executable using which
18918  new_path=`$WHICH "$new_path" 2> /dev/null`
18919
18920  if test "x$new_path" = x; then
18921    # Oops. Which didn't find the executable.
18922    # The splitting of arguments from the executable at a space might have been incorrect,
18923    # since paths with space are more likely in Windows. Give it another try with the whole
18924    # argument.
18925    path="$complete"
18926    arguments="EOL"
18927    new_path="$path"
18928
18929  windows_path="$new_path"
18930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18931    unix_path=`$CYGPATH -u "$windows_path"`
18932    new_path="$unix_path"
18933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18935    new_path="$unix_path"
18936  fi
18937
18938
18939    new_path=`$WHICH "$new_path" 2> /dev/null`
18940    # bat and cmd files are not always considered executable in MSYS causing which
18941    # to not find them
18942    if test "x$new_path" = x \
18943        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18944        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18945      new_path="$path"
18946
18947  windows_path="$new_path"
18948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18949    unix_path=`$CYGPATH -u "$windows_path"`
18950    new_path="$unix_path"
18951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18953    new_path="$unix_path"
18954  fi
18955
18956    fi
18957
18958    if test "x$new_path" = x; then
18959      # It's still not found. Now this is an unrecoverable error.
18960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18961$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18962      has_space=`$ECHO "$complete" | $GREP " "`
18963      if test "x$has_space" != x; then
18964        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18965$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18966      fi
18967      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18968    fi
18969  fi
18970
18971  # Now new_path has a complete unix path to the binary
18972  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18973    # Keep paths in /bin as-is, but remove trailing .exe if any
18974    new_path="${new_path/%.exe/}"
18975    # Do not save /bin paths to all_fixpath_prefixes!
18976  else
18977    # Not in mixed or Windows style, start by that.
18978    new_path=`cmd //c echo $new_path`
18979
18980  input_path="$new_path"
18981  # Check if we need to convert this using DOS-style short mode. If the path
18982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18983  # take no chances and rewrite it.
18984  # Note: m4 eats our [], so we need to use [ and ] instead.
18985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18986  if test "x$has_forbidden_chars" != x; then
18987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18989  fi
18990
18991    # Output is in $new_path
18992
18993  windows_path="$new_path"
18994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18995    unix_path=`$CYGPATH -u "$windows_path"`
18996    new_path="$unix_path"
18997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18999    new_path="$unix_path"
19000  fi
19001
19002    # remove trailing .exe if any
19003    new_path="${new_path/%.exe/}"
19004
19005    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19006    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19007  fi
19008
19009    else
19010      # We're on a unix platform. Hooray! :)
19011      # First separate the path from the arguments. This will split at the first
19012      # space.
19013      complete="$FOUND_MAKE"
19014      path="${complete%% *}"
19015      tmp="$complete EOL"
19016      arguments="${tmp#* }"
19017
19018      # Cannot rely on the command "which" here since it doesn't always work.
19019      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19020      if test -z "$is_absolute_path"; then
19021        # Path to executable is not absolute. Find it.
19022        IFS_save="$IFS"
19023        IFS=:
19024        for p in $PATH; do
19025          if test -f "$p/$path" && test -x "$p/$path"; then
19026            new_path="$p/$path"
19027            break
19028          fi
19029        done
19030        IFS="$IFS_save"
19031      else
19032        # This is an absolute path, we can use it without further modifications.
19033        new_path="$path"
19034      fi
19035
19036      if test "x$new_path" = x; then
19037        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19038$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19039        has_space=`$ECHO "$complete" | $GREP " "`
19040        if test "x$has_space" != x; then
19041          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19042$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19043        fi
19044        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19045      fi
19046    fi
19047
19048    # Now join together the path and the arguments once again
19049    if test "x$arguments" != xEOL; then
19050      new_complete="$new_path ${arguments% *}"
19051    else
19052      new_complete="$new_path"
19053    fi
19054
19055    if test "x$complete" != "x$new_complete"; then
19056      FOUND_MAKE="$new_complete"
19057      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19058$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19059    fi
19060  fi
19061
19062        fi
19063      fi
19064    fi
19065  fi
19066
19067        fi
19068        PATH=$OLD_PATH
19069      fi
19070    fi
19071
19072    if test "x$FOUND_MAKE" = x; then
19073      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
19074    fi
19075
19076  else
19077    # The variable is set, but is it from the command line or the environment?
19078
19079    # Try to remove the string !MAKE! from our list.
19080    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19081    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19082      # If it failed, the variable was not from the command line. Ignore it,
19083      # but warn the user (except for BASH, which is always set by the calling BASH).
19084      if test "xMAKE" != xBASH; then
19085        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19086$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19087      fi
19088      # Try to locate tool using the code snippet
19089
19090    # Try our hardest to locate a correct version of GNU make
19091    for ac_prog in gmake
19092do
19093  # Extract the first word of "$ac_prog", so it can be a program name with args.
19094set dummy $ac_prog; ac_word=$2
19095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19096$as_echo_n "checking for $ac_word... " >&6; }
19097if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19098  $as_echo_n "(cached) " >&6
19099else
19100  case $CHECK_GMAKE in
19101  [\\/]* | ?:[\\/]*)
19102  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19103  ;;
19104  *)
19105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19106for as_dir in $PATH
19107do
19108  IFS=$as_save_IFS
19109  test -z "$as_dir" && as_dir=.
19110    for ac_exec_ext in '' $ac_executable_extensions; do
19111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19112    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19114    break 2
19115  fi
19116done
19117  done
19118IFS=$as_save_IFS
19119
19120  ;;
19121esac
19122fi
19123CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19124if test -n "$CHECK_GMAKE"; then
19125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19126$as_echo "$CHECK_GMAKE" >&6; }
19127else
19128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19129$as_echo "no" >&6; }
19130fi
19131
19132
19133  test -n "$CHECK_GMAKE" && break
19134done
19135
19136
19137  MAKE_CANDIDATE=""$CHECK_GMAKE""
19138  DESCRIPTION="gmake in PATH"
19139
19140  # On Cygwin, we require a newer version of make than on other platforms
19141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19142    MAKE_VERSION_EXPR="-e 4\."
19143    MAKE_REQUIRED_VERSION="4.0"
19144   else
19145    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19146    MAKE_REQUIRED_VERSION="3.81"
19147  fi
19148
19149  if test "x$MAKE_CANDIDATE" != x; then
19150    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19151$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19152    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19153    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19154    if test "x$IS_GNU_MAKE" = x; then
19155      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19156$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19157    else
19158      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19159      if test "x$IS_MODERN_MAKE" = x; then
19160        { $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
19161$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;}
19162      else
19163        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19164          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19165            MAKE_EXPECTED_ENV='cygwin'
19166          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19167            MAKE_EXPECTED_ENV='msys'
19168          else
19169            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19170          fi
19171          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19172          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19173        else
19174          # Not relevant for non-Windows
19175          IS_MAKE_CORRECT_ENV=true
19176        fi
19177        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19178          { $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
19179$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;}
19180        else
19181          FOUND_MAKE=$MAKE_CANDIDATE
19182
19183  # Only process if variable expands to non-empty
19184
19185  if test "x$FOUND_MAKE" != x; then
19186    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19187
19188  # First separate the path from the arguments. This will split at the first
19189  # space.
19190  complete="$FOUND_MAKE"
19191  path="${complete%% *}"
19192  tmp="$complete EOL"
19193  arguments="${tmp#* }"
19194
19195  # Input might be given as Windows format, start by converting to
19196  # unix format.
19197  new_path=`$CYGPATH -u "$path"`
19198
19199  # Now try to locate executable using which
19200  new_path=`$WHICH "$new_path" 2> /dev/null`
19201  # bat and cmd files are not always considered executable in cygwin causing which
19202  # to not find them
19203  if test "x$new_path" = x \
19204      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19205      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19206    new_path=`$CYGPATH -u "$path"`
19207  fi
19208  if test "x$new_path" = x; then
19209    # Oops. Which didn't find the executable.
19210    # The splitting of arguments from the executable at a space might have been incorrect,
19211    # since paths with space are more likely in Windows. Give it another try with the whole
19212    # argument.
19213    path="$complete"
19214    arguments="EOL"
19215    new_path=`$CYGPATH -u "$path"`
19216    new_path=`$WHICH "$new_path" 2> /dev/null`
19217    # bat and cmd files are not always considered executable in cygwin causing which
19218    # to not find them
19219    if test "x$new_path" = x \
19220        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19221        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19222      new_path=`$CYGPATH -u "$path"`
19223    fi
19224    if test "x$new_path" = x; then
19225      # It's still not found. Now this is an unrecoverable error.
19226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19227$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19228      has_space=`$ECHO "$complete" | $GREP " "`
19229      if test "x$has_space" != x; then
19230        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19231$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19232      fi
19233      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19234    fi
19235  fi
19236
19237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19240  # "foo.exe" is OK but "foo" is an error.
19241  #
19242  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19243  # It is also a way to make sure we got the proper file name for the real test later on.
19244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19245  if test "x$test_shortpath" = x; then
19246    # Short path failed, file does not exist as specified.
19247    # Try adding .exe or .cmd
19248    if test -f "${new_path}.exe"; then
19249      input_to_shortpath="${new_path}.exe"
19250    elif test -f "${new_path}.cmd"; then
19251      input_to_shortpath="${new_path}.cmd"
19252    else
19253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19254$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19255      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19256$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19257      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19258    fi
19259  else
19260    input_to_shortpath="$new_path"
19261  fi
19262
19263  # Call helper function which possibly converts this using DOS-style short mode.
19264  # If so, the updated path is stored in $new_path.
19265  new_path="$input_to_shortpath"
19266
19267  input_path="$input_to_shortpath"
19268  # Check if we need to convert this using DOS-style short mode. If the path
19269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19270  # take no chances and rewrite it.
19271  # Note: m4 eats our [], so we need to use [ and ] instead.
19272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19273  if test "x$has_forbidden_chars" != x; then
19274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19275    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19276    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19277    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19278      # Going to short mode and back again did indeed matter. Since short mode is
19279      # case insensitive, let's make it lowercase to improve readability.
19280      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19281      # Now convert it back to Unix-style (cygpath)
19282      input_path=`$CYGPATH -u "$shortmode_path"`
19283      new_path="$input_path"
19284    fi
19285  fi
19286
19287  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19288  if test "x$test_cygdrive_prefix" = x; then
19289    # As a simple fix, exclude /usr/bin since it's not a real path.
19290    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19291      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19292      # a path prefixed by /cygdrive for fixpath to work.
19293      new_path="$CYGWIN_ROOT_PATH$input_path"
19294    fi
19295  fi
19296
19297  # remove trailing .exe if any
19298  new_path="${new_path/%.exe/}"
19299
19300    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19301
19302  # First separate the path from the arguments. This will split at the first
19303  # space.
19304  complete="$FOUND_MAKE"
19305  path="${complete%% *}"
19306  tmp="$complete EOL"
19307  arguments="${tmp#* }"
19308
19309  # Input might be given as Windows format, start by converting to
19310  # unix format.
19311  new_path="$path"
19312
19313  windows_path="$new_path"
19314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19315    unix_path=`$CYGPATH -u "$windows_path"`
19316    new_path="$unix_path"
19317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19319    new_path="$unix_path"
19320  fi
19321
19322
19323  # Now try to locate executable using which
19324  new_path=`$WHICH "$new_path" 2> /dev/null`
19325
19326  if test "x$new_path" = x; then
19327    # Oops. Which didn't find the executable.
19328    # The splitting of arguments from the executable at a space might have been incorrect,
19329    # since paths with space are more likely in Windows. Give it another try with the whole
19330    # argument.
19331    path="$complete"
19332    arguments="EOL"
19333    new_path="$path"
19334
19335  windows_path="$new_path"
19336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19337    unix_path=`$CYGPATH -u "$windows_path"`
19338    new_path="$unix_path"
19339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19341    new_path="$unix_path"
19342  fi
19343
19344
19345    new_path=`$WHICH "$new_path" 2> /dev/null`
19346    # bat and cmd files are not always considered executable in MSYS causing which
19347    # to not find them
19348    if test "x$new_path" = x \
19349        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19350        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19351      new_path="$path"
19352
19353  windows_path="$new_path"
19354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19355    unix_path=`$CYGPATH -u "$windows_path"`
19356    new_path="$unix_path"
19357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19359    new_path="$unix_path"
19360  fi
19361
19362    fi
19363
19364    if test "x$new_path" = x; then
19365      # It's still not found. Now this is an unrecoverable error.
19366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19367$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19368      has_space=`$ECHO "$complete" | $GREP " "`
19369      if test "x$has_space" != x; then
19370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19372      fi
19373      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19374    fi
19375  fi
19376
19377  # Now new_path has a complete unix path to the binary
19378  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19379    # Keep paths in /bin as-is, but remove trailing .exe if any
19380    new_path="${new_path/%.exe/}"
19381    # Do not save /bin paths to all_fixpath_prefixes!
19382  else
19383    # Not in mixed or Windows style, start by that.
19384    new_path=`cmd //c echo $new_path`
19385
19386  input_path="$new_path"
19387  # Check if we need to convert this using DOS-style short mode. If the path
19388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19389  # take no chances and rewrite it.
19390  # Note: m4 eats our [], so we need to use [ and ] instead.
19391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19392  if test "x$has_forbidden_chars" != x; then
19393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19395  fi
19396
19397    # Output is in $new_path
19398
19399  windows_path="$new_path"
19400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19401    unix_path=`$CYGPATH -u "$windows_path"`
19402    new_path="$unix_path"
19403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19405    new_path="$unix_path"
19406  fi
19407
19408    # remove trailing .exe if any
19409    new_path="${new_path/%.exe/}"
19410
19411    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19412    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19413  fi
19414
19415    else
19416      # We're on a unix platform. Hooray! :)
19417      # First separate the path from the arguments. This will split at the first
19418      # space.
19419      complete="$FOUND_MAKE"
19420      path="${complete%% *}"
19421      tmp="$complete EOL"
19422      arguments="${tmp#* }"
19423
19424      # Cannot rely on the command "which" here since it doesn't always work.
19425      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19426      if test -z "$is_absolute_path"; then
19427        # Path to executable is not absolute. Find it.
19428        IFS_save="$IFS"
19429        IFS=:
19430        for p in $PATH; do
19431          if test -f "$p/$path" && test -x "$p/$path"; then
19432            new_path="$p/$path"
19433            break
19434          fi
19435        done
19436        IFS="$IFS_save"
19437      else
19438        # This is an absolute path, we can use it without further modifications.
19439        new_path="$path"
19440      fi
19441
19442      if test "x$new_path" = x; then
19443        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19444$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19445        has_space=`$ECHO "$complete" | $GREP " "`
19446        if test "x$has_space" != x; then
19447          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19448$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19449        fi
19450        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19451      fi
19452    fi
19453
19454    # Now join together the path and the arguments once again
19455    if test "x$arguments" != xEOL; then
19456      new_complete="$new_path ${arguments% *}"
19457    else
19458      new_complete="$new_path"
19459    fi
19460
19461    if test "x$complete" != "x$new_complete"; then
19462      FOUND_MAKE="$new_complete"
19463      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19464$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19465    fi
19466  fi
19467
19468        fi
19469      fi
19470    fi
19471  fi
19472
19473
19474    if test "x$FOUND_MAKE" = x; then
19475      for ac_prog in make
19476do
19477  # Extract the first word of "$ac_prog", so it can be a program name with args.
19478set dummy $ac_prog; ac_word=$2
19479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19480$as_echo_n "checking for $ac_word... " >&6; }
19481if ${ac_cv_path_CHECK_MAKE+:} false; then :
19482  $as_echo_n "(cached) " >&6
19483else
19484  case $CHECK_MAKE in
19485  [\\/]* | ?:[\\/]*)
19486  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19487  ;;
19488  *)
19489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19490for as_dir in $PATH
19491do
19492  IFS=$as_save_IFS
19493  test -z "$as_dir" && as_dir=.
19494    for ac_exec_ext in '' $ac_executable_extensions; do
19495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19496    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19498    break 2
19499  fi
19500done
19501  done
19502IFS=$as_save_IFS
19503
19504  ;;
19505esac
19506fi
19507CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19508if test -n "$CHECK_MAKE"; then
19509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19510$as_echo "$CHECK_MAKE" >&6; }
19511else
19512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19513$as_echo "no" >&6; }
19514fi
19515
19516
19517  test -n "$CHECK_MAKE" && break
19518done
19519
19520
19521  MAKE_CANDIDATE=""$CHECK_MAKE""
19522  DESCRIPTION="make in PATH"
19523
19524  # On Cygwin, we require a newer version of make than on other platforms
19525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19526    MAKE_VERSION_EXPR="-e 4\."
19527    MAKE_REQUIRED_VERSION="4.0"
19528   else
19529    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19530    MAKE_REQUIRED_VERSION="3.81"
19531  fi
19532
19533  if test "x$MAKE_CANDIDATE" != x; then
19534    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19535$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19536    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19537    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19538    if test "x$IS_GNU_MAKE" = x; then
19539      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19540$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19541    else
19542      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19543      if test "x$IS_MODERN_MAKE" = x; then
19544        { $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
19545$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;}
19546      else
19547        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19548          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19549            MAKE_EXPECTED_ENV='cygwin'
19550          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19551            MAKE_EXPECTED_ENV='msys'
19552          else
19553            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19554          fi
19555          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19556          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19557        else
19558          # Not relevant for non-Windows
19559          IS_MAKE_CORRECT_ENV=true
19560        fi
19561        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19562          { $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
19563$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;}
19564        else
19565          FOUND_MAKE=$MAKE_CANDIDATE
19566
19567  # Only process if variable expands to non-empty
19568
19569  if test "x$FOUND_MAKE" != x; then
19570    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19571
19572  # First separate the path from the arguments. This will split at the first
19573  # space.
19574  complete="$FOUND_MAKE"
19575  path="${complete%% *}"
19576  tmp="$complete EOL"
19577  arguments="${tmp#* }"
19578
19579  # Input might be given as Windows format, start by converting to
19580  # unix format.
19581  new_path=`$CYGPATH -u "$path"`
19582
19583  # Now try to locate executable using which
19584  new_path=`$WHICH "$new_path" 2> /dev/null`
19585  # bat and cmd files are not always considered executable in cygwin causing which
19586  # to not find them
19587  if test "x$new_path" = x \
19588      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19589      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19590    new_path=`$CYGPATH -u "$path"`
19591  fi
19592  if test "x$new_path" = x; then
19593    # Oops. Which didn't find the executable.
19594    # The splitting of arguments from the executable at a space might have been incorrect,
19595    # since paths with space are more likely in Windows. Give it another try with the whole
19596    # argument.
19597    path="$complete"
19598    arguments="EOL"
19599    new_path=`$CYGPATH -u "$path"`
19600    new_path=`$WHICH "$new_path" 2> /dev/null`
19601    # bat and cmd files are not always considered executable in cygwin causing which
19602    # to not find them
19603    if test "x$new_path" = x \
19604        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19605        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19606      new_path=`$CYGPATH -u "$path"`
19607    fi
19608    if test "x$new_path" = x; then
19609      # It's still not found. Now this is an unrecoverable error.
19610      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19611$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19612      has_space=`$ECHO "$complete" | $GREP " "`
19613      if test "x$has_space" != x; then
19614        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19615$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19616      fi
19617      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19618    fi
19619  fi
19620
19621  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19622  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19623  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19624  # "foo.exe" is OK but "foo" is an error.
19625  #
19626  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19627  # It is also a way to make sure we got the proper file name for the real test later on.
19628  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19629  if test "x$test_shortpath" = x; then
19630    # Short path failed, file does not exist as specified.
19631    # Try adding .exe or .cmd
19632    if test -f "${new_path}.exe"; then
19633      input_to_shortpath="${new_path}.exe"
19634    elif test -f "${new_path}.cmd"; then
19635      input_to_shortpath="${new_path}.cmd"
19636    else
19637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19638$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19639      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19640$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19641      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19642    fi
19643  else
19644    input_to_shortpath="$new_path"
19645  fi
19646
19647  # Call helper function which possibly converts this using DOS-style short mode.
19648  # If so, the updated path is stored in $new_path.
19649  new_path="$input_to_shortpath"
19650
19651  input_path="$input_to_shortpath"
19652  # Check if we need to convert this using DOS-style short mode. If the path
19653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19654  # take no chances and rewrite it.
19655  # Note: m4 eats our [], so we need to use [ and ] instead.
19656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19657  if test "x$has_forbidden_chars" != x; then
19658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19659    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19660    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19661    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19662      # Going to short mode and back again did indeed matter. Since short mode is
19663      # case insensitive, let's make it lowercase to improve readability.
19664      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19665      # Now convert it back to Unix-style (cygpath)
19666      input_path=`$CYGPATH -u "$shortmode_path"`
19667      new_path="$input_path"
19668    fi
19669  fi
19670
19671  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19672  if test "x$test_cygdrive_prefix" = x; then
19673    # As a simple fix, exclude /usr/bin since it's not a real path.
19674    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19675      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19676      # a path prefixed by /cygdrive for fixpath to work.
19677      new_path="$CYGWIN_ROOT_PATH$input_path"
19678    fi
19679  fi
19680
19681  # remove trailing .exe if any
19682  new_path="${new_path/%.exe/}"
19683
19684    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19685
19686  # First separate the path from the arguments. This will split at the first
19687  # space.
19688  complete="$FOUND_MAKE"
19689  path="${complete%% *}"
19690  tmp="$complete EOL"
19691  arguments="${tmp#* }"
19692
19693  # Input might be given as Windows format, start by converting to
19694  # unix format.
19695  new_path="$path"
19696
19697  windows_path="$new_path"
19698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19699    unix_path=`$CYGPATH -u "$windows_path"`
19700    new_path="$unix_path"
19701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19703    new_path="$unix_path"
19704  fi
19705
19706
19707  # Now try to locate executable using which
19708  new_path=`$WHICH "$new_path" 2> /dev/null`
19709
19710  if test "x$new_path" = x; then
19711    # Oops. Which didn't find the executable.
19712    # The splitting of arguments from the executable at a space might have been incorrect,
19713    # since paths with space are more likely in Windows. Give it another try with the whole
19714    # argument.
19715    path="$complete"
19716    arguments="EOL"
19717    new_path="$path"
19718
19719  windows_path="$new_path"
19720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19721    unix_path=`$CYGPATH -u "$windows_path"`
19722    new_path="$unix_path"
19723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19725    new_path="$unix_path"
19726  fi
19727
19728
19729    new_path=`$WHICH "$new_path" 2> /dev/null`
19730    # bat and cmd files are not always considered executable in MSYS causing which
19731    # to not find them
19732    if test "x$new_path" = x \
19733        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19734        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19735      new_path="$path"
19736
19737  windows_path="$new_path"
19738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19739    unix_path=`$CYGPATH -u "$windows_path"`
19740    new_path="$unix_path"
19741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19743    new_path="$unix_path"
19744  fi
19745
19746    fi
19747
19748    if test "x$new_path" = x; then
19749      # It's still not found. Now this is an unrecoverable error.
19750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19751$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19752      has_space=`$ECHO "$complete" | $GREP " "`
19753      if test "x$has_space" != x; then
19754        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19755$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19756      fi
19757      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19758    fi
19759  fi
19760
19761  # Now new_path has a complete unix path to the binary
19762  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19763    # Keep paths in /bin as-is, but remove trailing .exe if any
19764    new_path="${new_path/%.exe/}"
19765    # Do not save /bin paths to all_fixpath_prefixes!
19766  else
19767    # Not in mixed or Windows style, start by that.
19768    new_path=`cmd //c echo $new_path`
19769
19770  input_path="$new_path"
19771  # Check if we need to convert this using DOS-style short mode. If the path
19772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19773  # take no chances and rewrite it.
19774  # Note: m4 eats our [], so we need to use [ and ] instead.
19775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19776  if test "x$has_forbidden_chars" != x; then
19777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19778    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19779  fi
19780
19781    # Output is in $new_path
19782
19783  windows_path="$new_path"
19784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19785    unix_path=`$CYGPATH -u "$windows_path"`
19786    new_path="$unix_path"
19787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19789    new_path="$unix_path"
19790  fi
19791
19792    # remove trailing .exe if any
19793    new_path="${new_path/%.exe/}"
19794
19795    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19796    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19797  fi
19798
19799    else
19800      # We're on a unix platform. Hooray! :)
19801      # First separate the path from the arguments. This will split at the first
19802      # space.
19803      complete="$FOUND_MAKE"
19804      path="${complete%% *}"
19805      tmp="$complete EOL"
19806      arguments="${tmp#* }"
19807
19808      # Cannot rely on the command "which" here since it doesn't always work.
19809      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19810      if test -z "$is_absolute_path"; then
19811        # Path to executable is not absolute. Find it.
19812        IFS_save="$IFS"
19813        IFS=:
19814        for p in $PATH; do
19815          if test -f "$p/$path" && test -x "$p/$path"; then
19816            new_path="$p/$path"
19817            break
19818          fi
19819        done
19820        IFS="$IFS_save"
19821      else
19822        # This is an absolute path, we can use it without further modifications.
19823        new_path="$path"
19824      fi
19825
19826      if test "x$new_path" = x; then
19827        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19828$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19829        has_space=`$ECHO "$complete" | $GREP " "`
19830        if test "x$has_space" != x; then
19831          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19832$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19833        fi
19834        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19835      fi
19836    fi
19837
19838    # Now join together the path and the arguments once again
19839    if test "x$arguments" != xEOL; then
19840      new_complete="$new_path ${arguments% *}"
19841    else
19842      new_complete="$new_path"
19843    fi
19844
19845    if test "x$complete" != "x$new_complete"; then
19846      FOUND_MAKE="$new_complete"
19847      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19848$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19849    fi
19850  fi
19851
19852        fi
19853      fi
19854    fi
19855  fi
19856
19857    fi
19858
19859    if test "x$FOUND_MAKE" = x; then
19860      if test "x$TOOLCHAIN_PATH" != x; then
19861        # We have a toolchain path, check that as well before giving up.
19862        OLD_PATH=$PATH
19863        PATH=$TOOLCHAIN_PATH:$PATH
19864        for ac_prog in gmake
19865do
19866  # Extract the first word of "$ac_prog", so it can be a program name with args.
19867set dummy $ac_prog; ac_word=$2
19868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19869$as_echo_n "checking for $ac_word... " >&6; }
19870if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19871  $as_echo_n "(cached) " >&6
19872else
19873  case $CHECK_TOOLSDIR_GMAKE in
19874  [\\/]* | ?:[\\/]*)
19875  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19876  ;;
19877  *)
19878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19879for as_dir in $PATH
19880do
19881  IFS=$as_save_IFS
19882  test -z "$as_dir" && as_dir=.
19883    for ac_exec_ext in '' $ac_executable_extensions; do
19884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19885    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19887    break 2
19888  fi
19889done
19890  done
19891IFS=$as_save_IFS
19892
19893  ;;
19894esac
19895fi
19896CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19897if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19899$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19900else
19901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19902$as_echo "no" >&6; }
19903fi
19904
19905
19906  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19907done
19908
19909
19910  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19911  DESCRIPTION="gmake in tools-dir"
19912
19913  # On Cygwin, we require a newer version of make than on other platforms
19914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19915    MAKE_VERSION_EXPR="-e 4\."
19916    MAKE_REQUIRED_VERSION="4.0"
19917   else
19918    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19919    MAKE_REQUIRED_VERSION="3.81"
19920  fi
19921
19922  if test "x$MAKE_CANDIDATE" != x; then
19923    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19924$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19925    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19926    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19927    if test "x$IS_GNU_MAKE" = x; then
19928      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19929$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19930    else
19931      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19932      if test "x$IS_MODERN_MAKE" = x; then
19933        { $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
19934$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;}
19935      else
19936        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19937          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19938            MAKE_EXPECTED_ENV='cygwin'
19939          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19940            MAKE_EXPECTED_ENV='msys'
19941          else
19942            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19943          fi
19944          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19945          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19946        else
19947          # Not relevant for non-Windows
19948          IS_MAKE_CORRECT_ENV=true
19949        fi
19950        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19951          { $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
19952$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;}
19953        else
19954          FOUND_MAKE=$MAKE_CANDIDATE
19955
19956  # Only process if variable expands to non-empty
19957
19958  if test "x$FOUND_MAKE" != x; then
19959    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19960
19961  # First separate the path from the arguments. This will split at the first
19962  # space.
19963  complete="$FOUND_MAKE"
19964  path="${complete%% *}"
19965  tmp="$complete EOL"
19966  arguments="${tmp#* }"
19967
19968  # Input might be given as Windows format, start by converting to
19969  # unix format.
19970  new_path=`$CYGPATH -u "$path"`
19971
19972  # Now try to locate executable using which
19973  new_path=`$WHICH "$new_path" 2> /dev/null`
19974  # bat and cmd files are not always considered executable in cygwin causing which
19975  # to not find them
19976  if test "x$new_path" = x \
19977      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19978      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19979    new_path=`$CYGPATH -u "$path"`
19980  fi
19981  if test "x$new_path" = x; then
19982    # Oops. Which didn't find the executable.
19983    # The splitting of arguments from the executable at a space might have been incorrect,
19984    # since paths with space are more likely in Windows. Give it another try with the whole
19985    # argument.
19986    path="$complete"
19987    arguments="EOL"
19988    new_path=`$CYGPATH -u "$path"`
19989    new_path=`$WHICH "$new_path" 2> /dev/null`
19990    # bat and cmd files are not always considered executable in cygwin causing which
19991    # to not find them
19992    if test "x$new_path" = x \
19993        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19994        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19995      new_path=`$CYGPATH -u "$path"`
19996    fi
19997    if test "x$new_path" = x; then
19998      # It's still not found. Now this is an unrecoverable error.
19999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20000$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20001      has_space=`$ECHO "$complete" | $GREP " "`
20002      if test "x$has_space" != x; then
20003        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20004$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20005      fi
20006      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20007    fi
20008  fi
20009
20010  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20011  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20012  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20013  # "foo.exe" is OK but "foo" is an error.
20014  #
20015  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20016  # It is also a way to make sure we got the proper file name for the real test later on.
20017  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20018  if test "x$test_shortpath" = x; then
20019    # Short path failed, file does not exist as specified.
20020    # Try adding .exe or .cmd
20021    if test -f "${new_path}.exe"; then
20022      input_to_shortpath="${new_path}.exe"
20023    elif test -f "${new_path}.cmd"; then
20024      input_to_shortpath="${new_path}.cmd"
20025    else
20026      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20027$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20028      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20029$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20030      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20031    fi
20032  else
20033    input_to_shortpath="$new_path"
20034  fi
20035
20036  # Call helper function which possibly converts this using DOS-style short mode.
20037  # If so, the updated path is stored in $new_path.
20038  new_path="$input_to_shortpath"
20039
20040  input_path="$input_to_shortpath"
20041  # Check if we need to convert this using DOS-style short mode. If the path
20042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20043  # take no chances and rewrite it.
20044  # Note: m4 eats our [], so we need to use [ and ] instead.
20045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20046  if test "x$has_forbidden_chars" != x; then
20047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20048    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20049    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20050    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20051      # Going to short mode and back again did indeed matter. Since short mode is
20052      # case insensitive, let's make it lowercase to improve readability.
20053      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20054      # Now convert it back to Unix-style (cygpath)
20055      input_path=`$CYGPATH -u "$shortmode_path"`
20056      new_path="$input_path"
20057    fi
20058  fi
20059
20060  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20061  if test "x$test_cygdrive_prefix" = x; then
20062    # As a simple fix, exclude /usr/bin since it's not a real path.
20063    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20064      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20065      # a path prefixed by /cygdrive for fixpath to work.
20066      new_path="$CYGWIN_ROOT_PATH$input_path"
20067    fi
20068  fi
20069
20070  # remove trailing .exe if any
20071  new_path="${new_path/%.exe/}"
20072
20073    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20074
20075  # First separate the path from the arguments. This will split at the first
20076  # space.
20077  complete="$FOUND_MAKE"
20078  path="${complete%% *}"
20079  tmp="$complete EOL"
20080  arguments="${tmp#* }"
20081
20082  # Input might be given as Windows format, start by converting to
20083  # unix format.
20084  new_path="$path"
20085
20086  windows_path="$new_path"
20087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20088    unix_path=`$CYGPATH -u "$windows_path"`
20089    new_path="$unix_path"
20090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20092    new_path="$unix_path"
20093  fi
20094
20095
20096  # Now try to locate executable using which
20097  new_path=`$WHICH "$new_path" 2> /dev/null`
20098
20099  if test "x$new_path" = x; then
20100    # Oops. Which didn't find the executable.
20101    # The splitting of arguments from the executable at a space might have been incorrect,
20102    # since paths with space are more likely in Windows. Give it another try with the whole
20103    # argument.
20104    path="$complete"
20105    arguments="EOL"
20106    new_path="$path"
20107
20108  windows_path="$new_path"
20109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20110    unix_path=`$CYGPATH -u "$windows_path"`
20111    new_path="$unix_path"
20112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20114    new_path="$unix_path"
20115  fi
20116
20117
20118    new_path=`$WHICH "$new_path" 2> /dev/null`
20119    # bat and cmd files are not always considered executable in MSYS causing which
20120    # to not find them
20121    if test "x$new_path" = x \
20122        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20123        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20124      new_path="$path"
20125
20126  windows_path="$new_path"
20127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20128    unix_path=`$CYGPATH -u "$windows_path"`
20129    new_path="$unix_path"
20130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20132    new_path="$unix_path"
20133  fi
20134
20135    fi
20136
20137    if test "x$new_path" = x; then
20138      # It's still not found. Now this is an unrecoverable error.
20139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20140$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20141      has_space=`$ECHO "$complete" | $GREP " "`
20142      if test "x$has_space" != x; then
20143        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20144$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20145      fi
20146      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20147    fi
20148  fi
20149
20150  # Now new_path has a complete unix path to the binary
20151  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20152    # Keep paths in /bin as-is, but remove trailing .exe if any
20153    new_path="${new_path/%.exe/}"
20154    # Do not save /bin paths to all_fixpath_prefixes!
20155  else
20156    # Not in mixed or Windows style, start by that.
20157    new_path=`cmd //c echo $new_path`
20158
20159  input_path="$new_path"
20160  # Check if we need to convert this using DOS-style short mode. If the path
20161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20162  # take no chances and rewrite it.
20163  # Note: m4 eats our [], so we need to use [ and ] instead.
20164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20165  if test "x$has_forbidden_chars" != x; then
20166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20167    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20168  fi
20169
20170    # Output is in $new_path
20171
20172  windows_path="$new_path"
20173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20174    unix_path=`$CYGPATH -u "$windows_path"`
20175    new_path="$unix_path"
20176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20178    new_path="$unix_path"
20179  fi
20180
20181    # remove trailing .exe if any
20182    new_path="${new_path/%.exe/}"
20183
20184    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20185    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20186  fi
20187
20188    else
20189      # We're on a unix platform. Hooray! :)
20190      # First separate the path from the arguments. This will split at the first
20191      # space.
20192      complete="$FOUND_MAKE"
20193      path="${complete%% *}"
20194      tmp="$complete EOL"
20195      arguments="${tmp#* }"
20196
20197      # Cannot rely on the command "which" here since it doesn't always work.
20198      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20199      if test -z "$is_absolute_path"; then
20200        # Path to executable is not absolute. Find it.
20201        IFS_save="$IFS"
20202        IFS=:
20203        for p in $PATH; do
20204          if test -f "$p/$path" && test -x "$p/$path"; then
20205            new_path="$p/$path"
20206            break
20207          fi
20208        done
20209        IFS="$IFS_save"
20210      else
20211        # This is an absolute path, we can use it without further modifications.
20212        new_path="$path"
20213      fi
20214
20215      if test "x$new_path" = x; then
20216        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20217$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20218        has_space=`$ECHO "$complete" | $GREP " "`
20219        if test "x$has_space" != x; then
20220          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20221$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20222        fi
20223        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20224      fi
20225    fi
20226
20227    # Now join together the path and the arguments once again
20228    if test "x$arguments" != xEOL; then
20229      new_complete="$new_path ${arguments% *}"
20230    else
20231      new_complete="$new_path"
20232    fi
20233
20234    if test "x$complete" != "x$new_complete"; then
20235      FOUND_MAKE="$new_complete"
20236      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20237$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20238    fi
20239  fi
20240
20241        fi
20242      fi
20243    fi
20244  fi
20245
20246        if test "x$FOUND_MAKE" = x; then
20247          for ac_prog in make
20248do
20249  # Extract the first word of "$ac_prog", so it can be a program name with args.
20250set dummy $ac_prog; ac_word=$2
20251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20252$as_echo_n "checking for $ac_word... " >&6; }
20253if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20254  $as_echo_n "(cached) " >&6
20255else
20256  case $CHECK_TOOLSDIR_MAKE in
20257  [\\/]* | ?:[\\/]*)
20258  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20259  ;;
20260  *)
20261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20262for as_dir in $PATH
20263do
20264  IFS=$as_save_IFS
20265  test -z "$as_dir" && as_dir=.
20266    for ac_exec_ext in '' $ac_executable_extensions; do
20267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20268    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20270    break 2
20271  fi
20272done
20273  done
20274IFS=$as_save_IFS
20275
20276  ;;
20277esac
20278fi
20279CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20280if test -n "$CHECK_TOOLSDIR_MAKE"; then
20281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20282$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20283else
20284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20285$as_echo "no" >&6; }
20286fi
20287
20288
20289  test -n "$CHECK_TOOLSDIR_MAKE" && break
20290done
20291
20292
20293  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20294  DESCRIPTION="make in tools-dir"
20295
20296  # On Cygwin, we require a newer version of make than on other platforms
20297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20298    MAKE_VERSION_EXPR="-e 4\."
20299    MAKE_REQUIRED_VERSION="4.0"
20300   else
20301    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20302    MAKE_REQUIRED_VERSION="3.81"
20303  fi
20304
20305  if test "x$MAKE_CANDIDATE" != x; then
20306    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20307$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20308    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20309    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20310    if test "x$IS_GNU_MAKE" = x; then
20311      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20312$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20313    else
20314      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20315      if test "x$IS_MODERN_MAKE" = x; then
20316        { $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
20317$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;}
20318      else
20319        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20320          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20321            MAKE_EXPECTED_ENV='cygwin'
20322          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20323            MAKE_EXPECTED_ENV='msys'
20324          else
20325            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20326          fi
20327          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20328          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20329        else
20330          # Not relevant for non-Windows
20331          IS_MAKE_CORRECT_ENV=true
20332        fi
20333        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20334          { $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
20335$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;}
20336        else
20337          FOUND_MAKE=$MAKE_CANDIDATE
20338
20339  # Only process if variable expands to non-empty
20340
20341  if test "x$FOUND_MAKE" != x; then
20342    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20343
20344  # First separate the path from the arguments. This will split at the first
20345  # space.
20346  complete="$FOUND_MAKE"
20347  path="${complete%% *}"
20348  tmp="$complete EOL"
20349  arguments="${tmp#* }"
20350
20351  # Input might be given as Windows format, start by converting to
20352  # unix format.
20353  new_path=`$CYGPATH -u "$path"`
20354
20355  # Now try to locate executable using which
20356  new_path=`$WHICH "$new_path" 2> /dev/null`
20357  # bat and cmd files are not always considered executable in cygwin causing which
20358  # to not find them
20359  if test "x$new_path" = x \
20360      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20361      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20362    new_path=`$CYGPATH -u "$path"`
20363  fi
20364  if test "x$new_path" = x; then
20365    # Oops. Which didn't find the executable.
20366    # The splitting of arguments from the executable at a space might have been incorrect,
20367    # since paths with space are more likely in Windows. Give it another try with the whole
20368    # argument.
20369    path="$complete"
20370    arguments="EOL"
20371    new_path=`$CYGPATH -u "$path"`
20372    new_path=`$WHICH "$new_path" 2> /dev/null`
20373    # bat and cmd files are not always considered executable in cygwin causing which
20374    # to not find them
20375    if test "x$new_path" = x \
20376        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20377        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20378      new_path=`$CYGPATH -u "$path"`
20379    fi
20380    if test "x$new_path" = x; then
20381      # It's still not found. Now this is an unrecoverable error.
20382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20383$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20384      has_space=`$ECHO "$complete" | $GREP " "`
20385      if test "x$has_space" != x; then
20386        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20387$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20388      fi
20389      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20390    fi
20391  fi
20392
20393  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20394  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20395  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20396  # "foo.exe" is OK but "foo" is an error.
20397  #
20398  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20399  # It is also a way to make sure we got the proper file name for the real test later on.
20400  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20401  if test "x$test_shortpath" = x; then
20402    # Short path failed, file does not exist as specified.
20403    # Try adding .exe or .cmd
20404    if test -f "${new_path}.exe"; then
20405      input_to_shortpath="${new_path}.exe"
20406    elif test -f "${new_path}.cmd"; then
20407      input_to_shortpath="${new_path}.cmd"
20408    else
20409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20410$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20411      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20412$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20413      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20414    fi
20415  else
20416    input_to_shortpath="$new_path"
20417  fi
20418
20419  # Call helper function which possibly converts this using DOS-style short mode.
20420  # If so, the updated path is stored in $new_path.
20421  new_path="$input_to_shortpath"
20422
20423  input_path="$input_to_shortpath"
20424  # Check if we need to convert this using DOS-style short mode. If the path
20425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20426  # take no chances and rewrite it.
20427  # Note: m4 eats our [], so we need to use [ and ] instead.
20428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20429  if test "x$has_forbidden_chars" != x; then
20430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20431    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20432    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20433    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20434      # Going to short mode and back again did indeed matter. Since short mode is
20435      # case insensitive, let's make it lowercase to improve readability.
20436      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20437      # Now convert it back to Unix-style (cygpath)
20438      input_path=`$CYGPATH -u "$shortmode_path"`
20439      new_path="$input_path"
20440    fi
20441  fi
20442
20443  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20444  if test "x$test_cygdrive_prefix" = x; then
20445    # As a simple fix, exclude /usr/bin since it's not a real path.
20446    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20447      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20448      # a path prefixed by /cygdrive for fixpath to work.
20449      new_path="$CYGWIN_ROOT_PATH$input_path"
20450    fi
20451  fi
20452
20453  # remove trailing .exe if any
20454  new_path="${new_path/%.exe/}"
20455
20456    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20457
20458  # First separate the path from the arguments. This will split at the first
20459  # space.
20460  complete="$FOUND_MAKE"
20461  path="${complete%% *}"
20462  tmp="$complete EOL"
20463  arguments="${tmp#* }"
20464
20465  # Input might be given as Windows format, start by converting to
20466  # unix format.
20467  new_path="$path"
20468
20469  windows_path="$new_path"
20470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20471    unix_path=`$CYGPATH -u "$windows_path"`
20472    new_path="$unix_path"
20473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20475    new_path="$unix_path"
20476  fi
20477
20478
20479  # Now try to locate executable using which
20480  new_path=`$WHICH "$new_path" 2> /dev/null`
20481
20482  if test "x$new_path" = x; then
20483    # Oops. Which didn't find the executable.
20484    # The splitting of arguments from the executable at a space might have been incorrect,
20485    # since paths with space are more likely in Windows. Give it another try with the whole
20486    # argument.
20487    path="$complete"
20488    arguments="EOL"
20489    new_path="$path"
20490
20491  windows_path="$new_path"
20492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20493    unix_path=`$CYGPATH -u "$windows_path"`
20494    new_path="$unix_path"
20495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20497    new_path="$unix_path"
20498  fi
20499
20500
20501    new_path=`$WHICH "$new_path" 2> /dev/null`
20502    # bat and cmd files are not always considered executable in MSYS causing which
20503    # to not find them
20504    if test "x$new_path" = x \
20505        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20506        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20507      new_path="$path"
20508
20509  windows_path="$new_path"
20510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20511    unix_path=`$CYGPATH -u "$windows_path"`
20512    new_path="$unix_path"
20513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20515    new_path="$unix_path"
20516  fi
20517
20518    fi
20519
20520    if test "x$new_path" = x; then
20521      # It's still not found. Now this is an unrecoverable error.
20522      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20523$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20524      has_space=`$ECHO "$complete" | $GREP " "`
20525      if test "x$has_space" != x; then
20526        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20527$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20528      fi
20529      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20530    fi
20531  fi
20532
20533  # Now new_path has a complete unix path to the binary
20534  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20535    # Keep paths in /bin as-is, but remove trailing .exe if any
20536    new_path="${new_path/%.exe/}"
20537    # Do not save /bin paths to all_fixpath_prefixes!
20538  else
20539    # Not in mixed or Windows style, start by that.
20540    new_path=`cmd //c echo $new_path`
20541
20542  input_path="$new_path"
20543  # Check if we need to convert this using DOS-style short mode. If the path
20544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20545  # take no chances and rewrite it.
20546  # Note: m4 eats our [], so we need to use [ and ] instead.
20547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20548  if test "x$has_forbidden_chars" != x; then
20549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20550    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20551  fi
20552
20553    # Output is in $new_path
20554
20555  windows_path="$new_path"
20556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20557    unix_path=`$CYGPATH -u "$windows_path"`
20558    new_path="$unix_path"
20559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20561    new_path="$unix_path"
20562  fi
20563
20564    # remove trailing .exe if any
20565    new_path="${new_path/%.exe/}"
20566
20567    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20568    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20569  fi
20570
20571    else
20572      # We're on a unix platform. Hooray! :)
20573      # First separate the path from the arguments. This will split at the first
20574      # space.
20575      complete="$FOUND_MAKE"
20576      path="${complete%% *}"
20577      tmp="$complete EOL"
20578      arguments="${tmp#* }"
20579
20580      # Cannot rely on the command "which" here since it doesn't always work.
20581      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20582      if test -z "$is_absolute_path"; then
20583        # Path to executable is not absolute. Find it.
20584        IFS_save="$IFS"
20585        IFS=:
20586        for p in $PATH; do
20587          if test -f "$p/$path" && test -x "$p/$path"; then
20588            new_path="$p/$path"
20589            break
20590          fi
20591        done
20592        IFS="$IFS_save"
20593      else
20594        # This is an absolute path, we can use it without further modifications.
20595        new_path="$path"
20596      fi
20597
20598      if test "x$new_path" = x; then
20599        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20600$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20601        has_space=`$ECHO "$complete" | $GREP " "`
20602        if test "x$has_space" != x; then
20603          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20604$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20605        fi
20606        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20607      fi
20608    fi
20609
20610    # Now join together the path and the arguments once again
20611    if test "x$arguments" != xEOL; then
20612      new_complete="$new_path ${arguments% *}"
20613    else
20614      new_complete="$new_path"
20615    fi
20616
20617    if test "x$complete" != "x$new_complete"; then
20618      FOUND_MAKE="$new_complete"
20619      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20620$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20621    fi
20622  fi
20623
20624        fi
20625      fi
20626    fi
20627  fi
20628
20629        fi
20630        PATH=$OLD_PATH
20631      fi
20632    fi
20633
20634    if test "x$FOUND_MAKE" = x; then
20635      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
20636    fi
20637
20638    else
20639      # If it succeeded, then it was overridden by the user. We will use it
20640      # for the tool.
20641
20642      # First remove it from the list of overridden variables, so we can test
20643      # for unknown variables in the end.
20644      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20645
20646      # Check if we try to supply an empty value
20647      if test "x$MAKE" = x; then
20648        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20649$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20650        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20651$as_echo_n "checking for MAKE... " >&6; }
20652        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20653$as_echo "disabled" >&6; }
20654      else
20655        # Check if the provided tool contains a complete path.
20656        tool_specified="$MAKE"
20657        tool_basename="${tool_specified##*/}"
20658        if test "x$tool_basename" = "x$tool_specified"; then
20659          # A command without a complete path is provided, search $PATH.
20660          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20661$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20662          # Extract the first word of "$tool_basename", so it can be a program name with args.
20663set dummy $tool_basename; ac_word=$2
20664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20665$as_echo_n "checking for $ac_word... " >&6; }
20666if ${ac_cv_path_MAKE+:} false; then :
20667  $as_echo_n "(cached) " >&6
20668else
20669  case $MAKE in
20670  [\\/]* | ?:[\\/]*)
20671  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20672  ;;
20673  *)
20674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20675for as_dir in $PATH
20676do
20677  IFS=$as_save_IFS
20678  test -z "$as_dir" && as_dir=.
20679    for ac_exec_ext in '' $ac_executable_extensions; do
20680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20681    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20683    break 2
20684  fi
20685done
20686  done
20687IFS=$as_save_IFS
20688
20689  ;;
20690esac
20691fi
20692MAKE=$ac_cv_path_MAKE
20693if test -n "$MAKE"; then
20694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20695$as_echo "$MAKE" >&6; }
20696else
20697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20698$as_echo "no" >&6; }
20699fi
20700
20701
20702          if test "x$MAKE" = x; then
20703            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20704          fi
20705        else
20706          # Otherwise we believe it is a complete path. Use it as it is.
20707          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20708$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20709          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20710$as_echo_n "checking for MAKE... " >&6; }
20711          if test ! -x "$tool_specified"; then
20712            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20713$as_echo "not found" >&6; }
20714            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20715          fi
20716          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20717$as_echo "$tool_specified" >&6; }
20718        fi
20719      fi
20720    fi
20721
20722    # If MAKE was set by user, verify the version
20723
20724  MAKE_CANDIDATE=""$MAKE""
20725  DESCRIPTION="user supplied MAKE=$MAKE"
20726
20727  # On Cygwin, we require a newer version of make than on other platforms
20728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20729    MAKE_VERSION_EXPR="-e 4\."
20730    MAKE_REQUIRED_VERSION="4.0"
20731   else
20732    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20733    MAKE_REQUIRED_VERSION="3.81"
20734  fi
20735
20736  if test "x$MAKE_CANDIDATE" != x; then
20737    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20738$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20739    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20740    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20741    if test "x$IS_GNU_MAKE" = x; then
20742      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20743$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20744    else
20745      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20746      if test "x$IS_MODERN_MAKE" = x; then
20747        { $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
20748$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;}
20749      else
20750        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20751          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20752            MAKE_EXPECTED_ENV='cygwin'
20753          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20754            MAKE_EXPECTED_ENV='msys'
20755          else
20756            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20757          fi
20758          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20759          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20760        else
20761          # Not relevant for non-Windows
20762          IS_MAKE_CORRECT_ENV=true
20763        fi
20764        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20765          { $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
20766$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;}
20767        else
20768          FOUND_MAKE=$MAKE_CANDIDATE
20769
20770  # Only process if variable expands to non-empty
20771
20772  if test "x$FOUND_MAKE" != x; then
20773    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20774
20775  # First separate the path from the arguments. This will split at the first
20776  # space.
20777  complete="$FOUND_MAKE"
20778  path="${complete%% *}"
20779  tmp="$complete EOL"
20780  arguments="${tmp#* }"
20781
20782  # Input might be given as Windows format, start by converting to
20783  # unix format.
20784  new_path=`$CYGPATH -u "$path"`
20785
20786  # Now try to locate executable using which
20787  new_path=`$WHICH "$new_path" 2> /dev/null`
20788  # bat and cmd files are not always considered executable in cygwin causing which
20789  # to not find them
20790  if test "x$new_path" = x \
20791      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20792      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20793    new_path=`$CYGPATH -u "$path"`
20794  fi
20795  if test "x$new_path" = x; then
20796    # Oops. Which didn't find the executable.
20797    # The splitting of arguments from the executable at a space might have been incorrect,
20798    # since paths with space are more likely in Windows. Give it another try with the whole
20799    # argument.
20800    path="$complete"
20801    arguments="EOL"
20802    new_path=`$CYGPATH -u "$path"`
20803    new_path=`$WHICH "$new_path" 2> /dev/null`
20804    # bat and cmd files are not always considered executable in cygwin causing which
20805    # to not find them
20806    if test "x$new_path" = x \
20807        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20808        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20809      new_path=`$CYGPATH -u "$path"`
20810    fi
20811    if test "x$new_path" = x; then
20812      # It's still not found. Now this is an unrecoverable error.
20813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20814$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20815      has_space=`$ECHO "$complete" | $GREP " "`
20816      if test "x$has_space" != x; then
20817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20819      fi
20820      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20821    fi
20822  fi
20823
20824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20827  # "foo.exe" is OK but "foo" is an error.
20828  #
20829  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20830  # It is also a way to make sure we got the proper file name for the real test later on.
20831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20832  if test "x$test_shortpath" = x; then
20833    # Short path failed, file does not exist as specified.
20834    # Try adding .exe or .cmd
20835    if test -f "${new_path}.exe"; then
20836      input_to_shortpath="${new_path}.exe"
20837    elif test -f "${new_path}.cmd"; then
20838      input_to_shortpath="${new_path}.cmd"
20839    else
20840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20841$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20842      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20843$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20844      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20845    fi
20846  else
20847    input_to_shortpath="$new_path"
20848  fi
20849
20850  # Call helper function which possibly converts this using DOS-style short mode.
20851  # If so, the updated path is stored in $new_path.
20852  new_path="$input_to_shortpath"
20853
20854  input_path="$input_to_shortpath"
20855  # Check if we need to convert this using DOS-style short mode. If the path
20856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20857  # take no chances and rewrite it.
20858  # Note: m4 eats our [], so we need to use [ and ] instead.
20859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20860  if test "x$has_forbidden_chars" != x; then
20861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20865      # Going to short mode and back again did indeed matter. Since short mode is
20866      # case insensitive, let's make it lowercase to improve readability.
20867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20868      # Now convert it back to Unix-style (cygpath)
20869      input_path=`$CYGPATH -u "$shortmode_path"`
20870      new_path="$input_path"
20871    fi
20872  fi
20873
20874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20875  if test "x$test_cygdrive_prefix" = x; then
20876    # As a simple fix, exclude /usr/bin since it's not a real path.
20877    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20879      # a path prefixed by /cygdrive for fixpath to work.
20880      new_path="$CYGWIN_ROOT_PATH$input_path"
20881    fi
20882  fi
20883
20884  # remove trailing .exe if any
20885  new_path="${new_path/%.exe/}"
20886
20887    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20888
20889  # First separate the path from the arguments. This will split at the first
20890  # space.
20891  complete="$FOUND_MAKE"
20892  path="${complete%% *}"
20893  tmp="$complete EOL"
20894  arguments="${tmp#* }"
20895
20896  # Input might be given as Windows format, start by converting to
20897  # unix format.
20898  new_path="$path"
20899
20900  windows_path="$new_path"
20901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20902    unix_path=`$CYGPATH -u "$windows_path"`
20903    new_path="$unix_path"
20904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20906    new_path="$unix_path"
20907  fi
20908
20909
20910  # Now try to locate executable using which
20911  new_path=`$WHICH "$new_path" 2> /dev/null`
20912
20913  if test "x$new_path" = x; then
20914    # Oops. Which didn't find the executable.
20915    # The splitting of arguments from the executable at a space might have been incorrect,
20916    # since paths with space are more likely in Windows. Give it another try with the whole
20917    # argument.
20918    path="$complete"
20919    arguments="EOL"
20920    new_path="$path"
20921
20922  windows_path="$new_path"
20923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20924    unix_path=`$CYGPATH -u "$windows_path"`
20925    new_path="$unix_path"
20926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20928    new_path="$unix_path"
20929  fi
20930
20931
20932    new_path=`$WHICH "$new_path" 2> /dev/null`
20933    # bat and cmd files are not always considered executable in MSYS causing which
20934    # to not find them
20935    if test "x$new_path" = x \
20936        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20937        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20938      new_path="$path"
20939
20940  windows_path="$new_path"
20941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20942    unix_path=`$CYGPATH -u "$windows_path"`
20943    new_path="$unix_path"
20944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20946    new_path="$unix_path"
20947  fi
20948
20949    fi
20950
20951    if test "x$new_path" = x; then
20952      # It's still not found. Now this is an unrecoverable error.
20953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20954$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20955      has_space=`$ECHO "$complete" | $GREP " "`
20956      if test "x$has_space" != x; then
20957        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20958$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20959      fi
20960      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20961    fi
20962  fi
20963
20964  # Now new_path has a complete unix path to the binary
20965  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20966    # Keep paths in /bin as-is, but remove trailing .exe if any
20967    new_path="${new_path/%.exe/}"
20968    # Do not save /bin paths to all_fixpath_prefixes!
20969  else
20970    # Not in mixed or Windows style, start by that.
20971    new_path=`cmd //c echo $new_path`
20972
20973  input_path="$new_path"
20974  # Check if we need to convert this using DOS-style short mode. If the path
20975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20976  # take no chances and rewrite it.
20977  # Note: m4 eats our [], so we need to use [ and ] instead.
20978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20979  if test "x$has_forbidden_chars" != x; then
20980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20982  fi
20983
20984    # Output is in $new_path
20985
20986  windows_path="$new_path"
20987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20988    unix_path=`$CYGPATH -u "$windows_path"`
20989    new_path="$unix_path"
20990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20992    new_path="$unix_path"
20993  fi
20994
20995    # remove trailing .exe if any
20996    new_path="${new_path/%.exe/}"
20997
20998    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20999    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21000  fi
21001
21002    else
21003      # We're on a unix platform. Hooray! :)
21004      # First separate the path from the arguments. This will split at the first
21005      # space.
21006      complete="$FOUND_MAKE"
21007      path="${complete%% *}"
21008      tmp="$complete EOL"
21009      arguments="${tmp#* }"
21010
21011      # Cannot rely on the command "which" here since it doesn't always work.
21012      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21013      if test -z "$is_absolute_path"; then
21014        # Path to executable is not absolute. Find it.
21015        IFS_save="$IFS"
21016        IFS=:
21017        for p in $PATH; do
21018          if test -f "$p/$path" && test -x "$p/$path"; then
21019            new_path="$p/$path"
21020            break
21021          fi
21022        done
21023        IFS="$IFS_save"
21024      else
21025        # This is an absolute path, we can use it without further modifications.
21026        new_path="$path"
21027      fi
21028
21029      if test "x$new_path" = x; then
21030        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21031$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21032        has_space=`$ECHO "$complete" | $GREP " "`
21033        if test "x$has_space" != x; then
21034          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21035$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21036        fi
21037        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21038      fi
21039    fi
21040
21041    # Now join together the path and the arguments once again
21042    if test "x$arguments" != xEOL; then
21043      new_complete="$new_path ${arguments% *}"
21044    else
21045      new_complete="$new_path"
21046    fi
21047
21048    if test "x$complete" != "x$new_complete"; then
21049      FOUND_MAKE="$new_complete"
21050      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21051$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21052    fi
21053  fi
21054
21055        fi
21056      fi
21057    fi
21058  fi
21059
21060    if test "x$FOUND_MAKE" = x; then
21061      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21062    fi
21063
21064  fi
21065
21066
21067  MAKE=$FOUND_MAKE
21068
21069  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21070$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21071
21072
21073  # Check if make supports the output sync option and if so, setup using it.
21074  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21075$as_echo_n "checking if make --output-sync is supported... " >&6; }
21076  if $MAKE --version -O > /dev/null 2>&1; then
21077    OUTPUT_SYNC_SUPPORTED=true
21078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21079$as_echo "yes" >&6; }
21080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21081$as_echo_n "checking for output-sync value... " >&6; }
21082
21083# Check whether --with-output-sync was given.
21084if test "${with_output_sync+set}" = set; then :
21085  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21086fi
21087
21088    if test "x$OUTPUT_SYNC" = "x"; then
21089      OUTPUT_SYNC=none
21090    fi
21091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21092$as_echo "$OUTPUT_SYNC" >&6; }
21093    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21094      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21095    fi
21096  else
21097    OUTPUT_SYNC_SUPPORTED=false
21098    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21099$as_echo "no" >&6; }
21100  fi
21101
21102
21103
21104
21105
21106
21107  # Test if find supports -delete
21108  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21109$as_echo_n "checking if find supports -delete... " >&6; }
21110  FIND_DELETE="-delete"
21111
21112  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21113
21114  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21115
21116  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21117  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21118    # No, it does not.
21119    $RM $DELETEDIR/TestIfFindSupportsDelete
21120    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21121      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21122      FIND_DELETE="-print | $XARGS $RM"
21123    else
21124      FIND_DELETE="-exec $RM \{\} \+"
21125    fi
21126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21127$as_echo "no" >&6; }
21128  else
21129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21130$as_echo "yes" >&6; }
21131  fi
21132  $RMDIR $DELETEDIR
21133
21134
21135
21136  # Test which kind of tar was found
21137  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21138    TAR_TYPE="gnu"
21139  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21140    TAR_TYPE="bsd"
21141  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21142    TAR_TYPE="solaris"
21143  fi
21144  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21145$as_echo_n "checking what type of tar was found... " >&6; }
21146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21147$as_echo "$TAR_TYPE" >&6; }
21148
21149  TAR_CREATE_FILE_PARAM=""
21150
21151  if test "x$TAR_TYPE" = "xgnu"; then
21152    TAR_INCLUDE_PARAM="T"
21153    TAR_SUPPORTS_TRANSFORM="true"
21154    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21155      # When using gnu tar for Solaris targets, need to use compatibility mode
21156      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21157    fi
21158  else
21159    TAR_INCLUDE_PARAM="I"
21160    TAR_SUPPORTS_TRANSFORM="false"
21161  fi
21162
21163
21164
21165
21166
21167
21168  # These tools might not be installed by default,
21169  # need hint on how to install them.
21170
21171
21172
21173  # Publish this variable in the help.
21174
21175
21176  if [ -z "${UNZIP+x}" ]; then
21177    # The variable is not set by user, try to locate tool using the code snippet
21178    for ac_prog in unzip
21179do
21180  # Extract the first word of "$ac_prog", so it can be a program name with args.
21181set dummy $ac_prog; ac_word=$2
21182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21183$as_echo_n "checking for $ac_word... " >&6; }
21184if ${ac_cv_path_UNZIP+:} false; then :
21185  $as_echo_n "(cached) " >&6
21186else
21187  case $UNZIP in
21188  [\\/]* | ?:[\\/]*)
21189  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21190  ;;
21191  *)
21192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21193for as_dir in $PATH
21194do
21195  IFS=$as_save_IFS
21196  test -z "$as_dir" && as_dir=.
21197    for ac_exec_ext in '' $ac_executable_extensions; do
21198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21199    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21201    break 2
21202  fi
21203done
21204  done
21205IFS=$as_save_IFS
21206
21207  ;;
21208esac
21209fi
21210UNZIP=$ac_cv_path_UNZIP
21211if test -n "$UNZIP"; then
21212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21213$as_echo "$UNZIP" >&6; }
21214else
21215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21216$as_echo "no" >&6; }
21217fi
21218
21219
21220  test -n "$UNZIP" && break
21221done
21222
21223  else
21224    # The variable is set, but is it from the command line or the environment?
21225
21226    # Try to remove the string !UNZIP! from our list.
21227    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21228    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21229      # If it failed, the variable was not from the command line. Ignore it,
21230      # but warn the user (except for BASH, which is always set by the calling BASH).
21231      if test "xUNZIP" != xBASH; then
21232        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21233$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21234      fi
21235      # Try to locate tool using the code snippet
21236      for ac_prog in unzip
21237do
21238  # Extract the first word of "$ac_prog", so it can be a program name with args.
21239set dummy $ac_prog; ac_word=$2
21240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21241$as_echo_n "checking for $ac_word... " >&6; }
21242if ${ac_cv_path_UNZIP+:} false; then :
21243  $as_echo_n "(cached) " >&6
21244else
21245  case $UNZIP in
21246  [\\/]* | ?:[\\/]*)
21247  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21248  ;;
21249  *)
21250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21251for as_dir in $PATH
21252do
21253  IFS=$as_save_IFS
21254  test -z "$as_dir" && as_dir=.
21255    for ac_exec_ext in '' $ac_executable_extensions; do
21256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21257    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21259    break 2
21260  fi
21261done
21262  done
21263IFS=$as_save_IFS
21264
21265  ;;
21266esac
21267fi
21268UNZIP=$ac_cv_path_UNZIP
21269if test -n "$UNZIP"; then
21270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21271$as_echo "$UNZIP" >&6; }
21272else
21273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21274$as_echo "no" >&6; }
21275fi
21276
21277
21278  test -n "$UNZIP" && break
21279done
21280
21281    else
21282      # If it succeeded, then it was overridden by the user. We will use it
21283      # for the tool.
21284
21285      # First remove it from the list of overridden variables, so we can test
21286      # for unknown variables in the end.
21287      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21288
21289      # Check if we try to supply an empty value
21290      if test "x$UNZIP" = x; then
21291        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21292$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21293        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21294$as_echo_n "checking for UNZIP... " >&6; }
21295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21296$as_echo "disabled" >&6; }
21297      else
21298        # Check if the provided tool contains a complete path.
21299        tool_specified="$UNZIP"
21300        tool_basename="${tool_specified##*/}"
21301        if test "x$tool_basename" = "x$tool_specified"; then
21302          # A command without a complete path is provided, search $PATH.
21303          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21304$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21305          # Extract the first word of "$tool_basename", so it can be a program name with args.
21306set dummy $tool_basename; ac_word=$2
21307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21308$as_echo_n "checking for $ac_word... " >&6; }
21309if ${ac_cv_path_UNZIP+:} false; then :
21310  $as_echo_n "(cached) " >&6
21311else
21312  case $UNZIP in
21313  [\\/]* | ?:[\\/]*)
21314  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21315  ;;
21316  *)
21317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21318for as_dir in $PATH
21319do
21320  IFS=$as_save_IFS
21321  test -z "$as_dir" && as_dir=.
21322    for ac_exec_ext in '' $ac_executable_extensions; do
21323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21324    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21326    break 2
21327  fi
21328done
21329  done
21330IFS=$as_save_IFS
21331
21332  ;;
21333esac
21334fi
21335UNZIP=$ac_cv_path_UNZIP
21336if test -n "$UNZIP"; then
21337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21338$as_echo "$UNZIP" >&6; }
21339else
21340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21341$as_echo "no" >&6; }
21342fi
21343
21344
21345          if test "x$UNZIP" = x; then
21346            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21347          fi
21348        else
21349          # Otherwise we believe it is a complete path. Use it as it is.
21350          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21351$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21352          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21353$as_echo_n "checking for UNZIP... " >&6; }
21354          if test ! -x "$tool_specified"; then
21355            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21356$as_echo "not found" >&6; }
21357            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21358          fi
21359          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21360$as_echo "$tool_specified" >&6; }
21361        fi
21362      fi
21363    fi
21364
21365  fi
21366
21367
21368
21369  if test "x$UNZIP" = x; then
21370    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21371  fi
21372
21373
21374
21375
21376
21377  # Publish this variable in the help.
21378
21379
21380  if [ -z "${ZIP+x}" ]; then
21381    # The variable is not set by user, try to locate tool using the code snippet
21382    for ac_prog in zip
21383do
21384  # Extract the first word of "$ac_prog", so it can be a program name with args.
21385set dummy $ac_prog; ac_word=$2
21386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21387$as_echo_n "checking for $ac_word... " >&6; }
21388if ${ac_cv_path_ZIP+:} false; then :
21389  $as_echo_n "(cached) " >&6
21390else
21391  case $ZIP in
21392  [\\/]* | ?:[\\/]*)
21393  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21394  ;;
21395  *)
21396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21397for as_dir in $PATH
21398do
21399  IFS=$as_save_IFS
21400  test -z "$as_dir" && as_dir=.
21401    for ac_exec_ext in '' $ac_executable_extensions; do
21402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21403    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21405    break 2
21406  fi
21407done
21408  done
21409IFS=$as_save_IFS
21410
21411  ;;
21412esac
21413fi
21414ZIP=$ac_cv_path_ZIP
21415if test -n "$ZIP"; then
21416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21417$as_echo "$ZIP" >&6; }
21418else
21419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21420$as_echo "no" >&6; }
21421fi
21422
21423
21424  test -n "$ZIP" && break
21425done
21426
21427  else
21428    # The variable is set, but is it from the command line or the environment?
21429
21430    # Try to remove the string !ZIP! from our list.
21431    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
21432    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21433      # If it failed, the variable was not from the command line. Ignore it,
21434      # but warn the user (except for BASH, which is always set by the calling BASH).
21435      if test "xZIP" != xBASH; then
21436        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
21437$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
21438      fi
21439      # Try to locate tool using the code snippet
21440      for ac_prog in zip
21441do
21442  # Extract the first word of "$ac_prog", so it can be a program name with args.
21443set dummy $ac_prog; ac_word=$2
21444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21445$as_echo_n "checking for $ac_word... " >&6; }
21446if ${ac_cv_path_ZIP+:} false; then :
21447  $as_echo_n "(cached) " >&6
21448else
21449  case $ZIP in
21450  [\\/]* | ?:[\\/]*)
21451  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21452  ;;
21453  *)
21454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21455for as_dir in $PATH
21456do
21457  IFS=$as_save_IFS
21458  test -z "$as_dir" && as_dir=.
21459    for ac_exec_ext in '' $ac_executable_extensions; do
21460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21461    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21463    break 2
21464  fi
21465done
21466  done
21467IFS=$as_save_IFS
21468
21469  ;;
21470esac
21471fi
21472ZIP=$ac_cv_path_ZIP
21473if test -n "$ZIP"; then
21474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21475$as_echo "$ZIP" >&6; }
21476else
21477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21478$as_echo "no" >&6; }
21479fi
21480
21481
21482  test -n "$ZIP" && break
21483done
21484
21485    else
21486      # If it succeeded, then it was overridden by the user. We will use it
21487      # for the tool.
21488
21489      # First remove it from the list of overridden variables, so we can test
21490      # for unknown variables in the end.
21491      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21492
21493      # Check if we try to supply an empty value
21494      if test "x$ZIP" = x; then
21495        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21496$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21497        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21498$as_echo_n "checking for ZIP... " >&6; }
21499        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21500$as_echo "disabled" >&6; }
21501      else
21502        # Check if the provided tool contains a complete path.
21503        tool_specified="$ZIP"
21504        tool_basename="${tool_specified##*/}"
21505        if test "x$tool_basename" = "x$tool_specified"; then
21506          # A command without a complete path is provided, search $PATH.
21507          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21508$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21509          # Extract the first word of "$tool_basename", so it can be a program name with args.
21510set dummy $tool_basename; ac_word=$2
21511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21512$as_echo_n "checking for $ac_word... " >&6; }
21513if ${ac_cv_path_ZIP+:} false; then :
21514  $as_echo_n "(cached) " >&6
21515else
21516  case $ZIP in
21517  [\\/]* | ?:[\\/]*)
21518  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21519  ;;
21520  *)
21521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21522for as_dir in $PATH
21523do
21524  IFS=$as_save_IFS
21525  test -z "$as_dir" && as_dir=.
21526    for ac_exec_ext in '' $ac_executable_extensions; do
21527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21528    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21530    break 2
21531  fi
21532done
21533  done
21534IFS=$as_save_IFS
21535
21536  ;;
21537esac
21538fi
21539ZIP=$ac_cv_path_ZIP
21540if test -n "$ZIP"; then
21541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21542$as_echo "$ZIP" >&6; }
21543else
21544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21545$as_echo "no" >&6; }
21546fi
21547
21548
21549          if test "x$ZIP" = x; then
21550            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21551          fi
21552        else
21553          # Otherwise we believe it is a complete path. Use it as it is.
21554          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21555$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21556          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21557$as_echo_n "checking for ZIP... " >&6; }
21558          if test ! -x "$tool_specified"; then
21559            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21560$as_echo "not found" >&6; }
21561            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21562          fi
21563          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21564$as_echo "$tool_specified" >&6; }
21565        fi
21566      fi
21567    fi
21568
21569  fi
21570
21571
21572
21573  if test "x$ZIP" = x; then
21574    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21575  fi
21576
21577
21578
21579  # Non-required basic tools
21580
21581
21582
21583  # Publish this variable in the help.
21584
21585
21586  if [ -z "${LDD+x}" ]; then
21587    # The variable is not set by user, try to locate tool using the code snippet
21588    for ac_prog in ldd
21589do
21590  # Extract the first word of "$ac_prog", so it can be a program name with args.
21591set dummy $ac_prog; ac_word=$2
21592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21593$as_echo_n "checking for $ac_word... " >&6; }
21594if ${ac_cv_path_LDD+:} false; then :
21595  $as_echo_n "(cached) " >&6
21596else
21597  case $LDD in
21598  [\\/]* | ?:[\\/]*)
21599  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21600  ;;
21601  *)
21602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21603for as_dir in $PATH
21604do
21605  IFS=$as_save_IFS
21606  test -z "$as_dir" && as_dir=.
21607    for ac_exec_ext in '' $ac_executable_extensions; do
21608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21609    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21611    break 2
21612  fi
21613done
21614  done
21615IFS=$as_save_IFS
21616
21617  ;;
21618esac
21619fi
21620LDD=$ac_cv_path_LDD
21621if test -n "$LDD"; then
21622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21623$as_echo "$LDD" >&6; }
21624else
21625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21626$as_echo "no" >&6; }
21627fi
21628
21629
21630  test -n "$LDD" && break
21631done
21632
21633  else
21634    # The variable is set, but is it from the command line or the environment?
21635
21636    # Try to remove the string !LDD! from our list.
21637    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21638    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21639      # If it failed, the variable was not from the command line. Ignore it,
21640      # but warn the user (except for BASH, which is always set by the calling BASH).
21641      if test "xLDD" != xBASH; then
21642        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21643$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21644      fi
21645      # Try to locate tool using the code snippet
21646      for ac_prog in ldd
21647do
21648  # Extract the first word of "$ac_prog", so it can be a program name with args.
21649set dummy $ac_prog; ac_word=$2
21650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21651$as_echo_n "checking for $ac_word... " >&6; }
21652if ${ac_cv_path_LDD+:} false; then :
21653  $as_echo_n "(cached) " >&6
21654else
21655  case $LDD in
21656  [\\/]* | ?:[\\/]*)
21657  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21658  ;;
21659  *)
21660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21661for as_dir in $PATH
21662do
21663  IFS=$as_save_IFS
21664  test -z "$as_dir" && as_dir=.
21665    for ac_exec_ext in '' $ac_executable_extensions; do
21666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21667    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21669    break 2
21670  fi
21671done
21672  done
21673IFS=$as_save_IFS
21674
21675  ;;
21676esac
21677fi
21678LDD=$ac_cv_path_LDD
21679if test -n "$LDD"; then
21680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21681$as_echo "$LDD" >&6; }
21682else
21683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21684$as_echo "no" >&6; }
21685fi
21686
21687
21688  test -n "$LDD" && break
21689done
21690
21691    else
21692      # If it succeeded, then it was overridden by the user. We will use it
21693      # for the tool.
21694
21695      # First remove it from the list of overridden variables, so we can test
21696      # for unknown variables in the end.
21697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21698
21699      # Check if we try to supply an empty value
21700      if test "x$LDD" = x; then
21701        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21702$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21704$as_echo_n "checking for LDD... " >&6; }
21705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21706$as_echo "disabled" >&6; }
21707      else
21708        # Check if the provided tool contains a complete path.
21709        tool_specified="$LDD"
21710        tool_basename="${tool_specified##*/}"
21711        if test "x$tool_basename" = "x$tool_specified"; then
21712          # A command without a complete path is provided, search $PATH.
21713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21714$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21715          # Extract the first word of "$tool_basename", so it can be a program name with args.
21716set dummy $tool_basename; ac_word=$2
21717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21718$as_echo_n "checking for $ac_word... " >&6; }
21719if ${ac_cv_path_LDD+:} false; then :
21720  $as_echo_n "(cached) " >&6
21721else
21722  case $LDD in
21723  [\\/]* | ?:[\\/]*)
21724  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21725  ;;
21726  *)
21727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21728for as_dir in $PATH
21729do
21730  IFS=$as_save_IFS
21731  test -z "$as_dir" && as_dir=.
21732    for ac_exec_ext in '' $ac_executable_extensions; do
21733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21734    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21736    break 2
21737  fi
21738done
21739  done
21740IFS=$as_save_IFS
21741
21742  ;;
21743esac
21744fi
21745LDD=$ac_cv_path_LDD
21746if test -n "$LDD"; then
21747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21748$as_echo "$LDD" >&6; }
21749else
21750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21751$as_echo "no" >&6; }
21752fi
21753
21754
21755          if test "x$LDD" = x; then
21756            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21757          fi
21758        else
21759          # Otherwise we believe it is a complete path. Use it as it is.
21760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21761$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21762          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21763$as_echo_n "checking for LDD... " >&6; }
21764          if test ! -x "$tool_specified"; then
21765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21766$as_echo "not found" >&6; }
21767            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21768          fi
21769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21770$as_echo "$tool_specified" >&6; }
21771        fi
21772      fi
21773    fi
21774
21775  fi
21776
21777
21778  if test "x$LDD" = "x"; then
21779    # List shared lib dependencies is used for
21780    # debug output and checking for forbidden dependencies.
21781    # We can build without it.
21782    LDD="true"
21783  fi
21784
21785
21786  # Publish this variable in the help.
21787
21788
21789  if [ -z "${OTOOL+x}" ]; then
21790    # The variable is not set by user, try to locate tool using the code snippet
21791    for ac_prog in otool
21792do
21793  # Extract the first word of "$ac_prog", so it can be a program name with args.
21794set dummy $ac_prog; ac_word=$2
21795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21796$as_echo_n "checking for $ac_word... " >&6; }
21797if ${ac_cv_path_OTOOL+:} false; then :
21798  $as_echo_n "(cached) " >&6
21799else
21800  case $OTOOL in
21801  [\\/]* | ?:[\\/]*)
21802  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21803  ;;
21804  *)
21805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21806for as_dir in $PATH
21807do
21808  IFS=$as_save_IFS
21809  test -z "$as_dir" && as_dir=.
21810    for ac_exec_ext in '' $ac_executable_extensions; do
21811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21812    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21814    break 2
21815  fi
21816done
21817  done
21818IFS=$as_save_IFS
21819
21820  ;;
21821esac
21822fi
21823OTOOL=$ac_cv_path_OTOOL
21824if test -n "$OTOOL"; then
21825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21826$as_echo "$OTOOL" >&6; }
21827else
21828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21829$as_echo "no" >&6; }
21830fi
21831
21832
21833  test -n "$OTOOL" && break
21834done
21835
21836  else
21837    # The variable is set, but is it from the command line or the environment?
21838
21839    # Try to remove the string !OTOOL! from our list.
21840    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21841    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21842      # If it failed, the variable was not from the command line. Ignore it,
21843      # but warn the user (except for BASH, which is always set by the calling BASH).
21844      if test "xOTOOL" != xBASH; then
21845        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21846$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21847      fi
21848      # Try to locate tool using the code snippet
21849      for ac_prog in otool
21850do
21851  # Extract the first word of "$ac_prog", so it can be a program name with args.
21852set dummy $ac_prog; ac_word=$2
21853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21854$as_echo_n "checking for $ac_word... " >&6; }
21855if ${ac_cv_path_OTOOL+:} false; then :
21856  $as_echo_n "(cached) " >&6
21857else
21858  case $OTOOL in
21859  [\\/]* | ?:[\\/]*)
21860  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21861  ;;
21862  *)
21863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21864for as_dir in $PATH
21865do
21866  IFS=$as_save_IFS
21867  test -z "$as_dir" && as_dir=.
21868    for ac_exec_ext in '' $ac_executable_extensions; do
21869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21870    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21872    break 2
21873  fi
21874done
21875  done
21876IFS=$as_save_IFS
21877
21878  ;;
21879esac
21880fi
21881OTOOL=$ac_cv_path_OTOOL
21882if test -n "$OTOOL"; then
21883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21884$as_echo "$OTOOL" >&6; }
21885else
21886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21887$as_echo "no" >&6; }
21888fi
21889
21890
21891  test -n "$OTOOL" && break
21892done
21893
21894    else
21895      # If it succeeded, then it was overridden by the user. We will use it
21896      # for the tool.
21897
21898      # First remove it from the list of overridden variables, so we can test
21899      # for unknown variables in the end.
21900      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21901
21902      # Check if we try to supply an empty value
21903      if test "x$OTOOL" = x; then
21904        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21905$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21906        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21907$as_echo_n "checking for OTOOL... " >&6; }
21908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21909$as_echo "disabled" >&6; }
21910      else
21911        # Check if the provided tool contains a complete path.
21912        tool_specified="$OTOOL"
21913        tool_basename="${tool_specified##*/}"
21914        if test "x$tool_basename" = "x$tool_specified"; then
21915          # A command without a complete path is provided, search $PATH.
21916          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21917$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21918          # Extract the first word of "$tool_basename", so it can be a program name with args.
21919set dummy $tool_basename; ac_word=$2
21920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21921$as_echo_n "checking for $ac_word... " >&6; }
21922if ${ac_cv_path_OTOOL+:} false; then :
21923  $as_echo_n "(cached) " >&6
21924else
21925  case $OTOOL in
21926  [\\/]* | ?:[\\/]*)
21927  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21928  ;;
21929  *)
21930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21931for as_dir in $PATH
21932do
21933  IFS=$as_save_IFS
21934  test -z "$as_dir" && as_dir=.
21935    for ac_exec_ext in '' $ac_executable_extensions; do
21936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21937    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21939    break 2
21940  fi
21941done
21942  done
21943IFS=$as_save_IFS
21944
21945  ;;
21946esac
21947fi
21948OTOOL=$ac_cv_path_OTOOL
21949if test -n "$OTOOL"; then
21950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21951$as_echo "$OTOOL" >&6; }
21952else
21953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21954$as_echo "no" >&6; }
21955fi
21956
21957
21958          if test "x$OTOOL" = x; then
21959            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21960          fi
21961        else
21962          # Otherwise we believe it is a complete path. Use it as it is.
21963          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21964$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21965          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21966$as_echo_n "checking for OTOOL... " >&6; }
21967          if test ! -x "$tool_specified"; then
21968            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21969$as_echo "not found" >&6; }
21970            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21971          fi
21972          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21973$as_echo "$tool_specified" >&6; }
21974        fi
21975      fi
21976    fi
21977
21978  fi
21979
21980
21981  if test "x$OTOOL" = "x"; then
21982    OTOOL="true"
21983  fi
21984
21985
21986  # Publish this variable in the help.
21987
21988
21989  if [ -z "${READELF+x}" ]; then
21990    # The variable is not set by user, try to locate tool using the code snippet
21991    for ac_prog in greadelf readelf
21992do
21993  # Extract the first word of "$ac_prog", so it can be a program name with args.
21994set dummy $ac_prog; ac_word=$2
21995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21996$as_echo_n "checking for $ac_word... " >&6; }
21997if ${ac_cv_path_READELF+:} false; then :
21998  $as_echo_n "(cached) " >&6
21999else
22000  case $READELF in
22001  [\\/]* | ?:[\\/]*)
22002  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22003  ;;
22004  *)
22005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22006for as_dir in $PATH
22007do
22008  IFS=$as_save_IFS
22009  test -z "$as_dir" && as_dir=.
22010    for ac_exec_ext in '' $ac_executable_extensions; do
22011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22012    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22014    break 2
22015  fi
22016done
22017  done
22018IFS=$as_save_IFS
22019
22020  ;;
22021esac
22022fi
22023READELF=$ac_cv_path_READELF
22024if test -n "$READELF"; then
22025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22026$as_echo "$READELF" >&6; }
22027else
22028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22029$as_echo "no" >&6; }
22030fi
22031
22032
22033  test -n "$READELF" && break
22034done
22035
22036  else
22037    # The variable is set, but is it from the command line or the environment?
22038
22039    # Try to remove the string !READELF! from our list.
22040    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22041    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22042      # If it failed, the variable was not from the command line. Ignore it,
22043      # but warn the user (except for BASH, which is always set by the calling BASH).
22044      if test "xREADELF" != xBASH; then
22045        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22046$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22047      fi
22048      # Try to locate tool using the code snippet
22049      for ac_prog in greadelf readelf
22050do
22051  # Extract the first word of "$ac_prog", so it can be a program name with args.
22052set dummy $ac_prog; ac_word=$2
22053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22054$as_echo_n "checking for $ac_word... " >&6; }
22055if ${ac_cv_path_READELF+:} false; then :
22056  $as_echo_n "(cached) " >&6
22057else
22058  case $READELF in
22059  [\\/]* | ?:[\\/]*)
22060  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22061  ;;
22062  *)
22063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22064for as_dir in $PATH
22065do
22066  IFS=$as_save_IFS
22067  test -z "$as_dir" && as_dir=.
22068    for ac_exec_ext in '' $ac_executable_extensions; do
22069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22070    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22072    break 2
22073  fi
22074done
22075  done
22076IFS=$as_save_IFS
22077
22078  ;;
22079esac
22080fi
22081READELF=$ac_cv_path_READELF
22082if test -n "$READELF"; then
22083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22084$as_echo "$READELF" >&6; }
22085else
22086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22087$as_echo "no" >&6; }
22088fi
22089
22090
22091  test -n "$READELF" && break
22092done
22093
22094    else
22095      # If it succeeded, then it was overridden by the user. We will use it
22096      # for the tool.
22097
22098      # First remove it from the list of overridden variables, so we can test
22099      # for unknown variables in the end.
22100      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22101
22102      # Check if we try to supply an empty value
22103      if test "x$READELF" = x; then
22104        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22105$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22106        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22107$as_echo_n "checking for READELF... " >&6; }
22108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22109$as_echo "disabled" >&6; }
22110      else
22111        # Check if the provided tool contains a complete path.
22112        tool_specified="$READELF"
22113        tool_basename="${tool_specified##*/}"
22114        if test "x$tool_basename" = "x$tool_specified"; then
22115          # A command without a complete path is provided, search $PATH.
22116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22117$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22118          # Extract the first word of "$tool_basename", so it can be a program name with args.
22119set dummy $tool_basename; ac_word=$2
22120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22121$as_echo_n "checking for $ac_word... " >&6; }
22122if ${ac_cv_path_READELF+:} false; then :
22123  $as_echo_n "(cached) " >&6
22124else
22125  case $READELF in
22126  [\\/]* | ?:[\\/]*)
22127  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22128  ;;
22129  *)
22130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22131for as_dir in $PATH
22132do
22133  IFS=$as_save_IFS
22134  test -z "$as_dir" && as_dir=.
22135    for ac_exec_ext in '' $ac_executable_extensions; do
22136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22137    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22139    break 2
22140  fi
22141done
22142  done
22143IFS=$as_save_IFS
22144
22145  ;;
22146esac
22147fi
22148READELF=$ac_cv_path_READELF
22149if test -n "$READELF"; then
22150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22151$as_echo "$READELF" >&6; }
22152else
22153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22154$as_echo "no" >&6; }
22155fi
22156
22157
22158          if test "x$READELF" = x; then
22159            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22160          fi
22161        else
22162          # Otherwise we believe it is a complete path. Use it as it is.
22163          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22164$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22165          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22166$as_echo_n "checking for READELF... " >&6; }
22167          if test ! -x "$tool_specified"; then
22168            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22169$as_echo "not found" >&6; }
22170            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22171          fi
22172          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22173$as_echo "$tool_specified" >&6; }
22174        fi
22175      fi
22176    fi
22177
22178  fi
22179
22180
22181
22182
22183  # Publish this variable in the help.
22184
22185
22186  if [ -z "${HG+x}" ]; then
22187    # The variable is not set by user, try to locate tool using the code snippet
22188    for ac_prog in hg
22189do
22190  # Extract the first word of "$ac_prog", so it can be a program name with args.
22191set dummy $ac_prog; ac_word=$2
22192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22193$as_echo_n "checking for $ac_word... " >&6; }
22194if ${ac_cv_path_HG+:} false; then :
22195  $as_echo_n "(cached) " >&6
22196else
22197  case $HG in
22198  [\\/]* | ?:[\\/]*)
22199  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22200  ;;
22201  *)
22202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22203for as_dir in $PATH
22204do
22205  IFS=$as_save_IFS
22206  test -z "$as_dir" && as_dir=.
22207    for ac_exec_ext in '' $ac_executable_extensions; do
22208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22209    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22211    break 2
22212  fi
22213done
22214  done
22215IFS=$as_save_IFS
22216
22217  ;;
22218esac
22219fi
22220HG=$ac_cv_path_HG
22221if test -n "$HG"; then
22222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22223$as_echo "$HG" >&6; }
22224else
22225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22226$as_echo "no" >&6; }
22227fi
22228
22229
22230  test -n "$HG" && break
22231done
22232
22233  else
22234    # The variable is set, but is it from the command line or the environment?
22235
22236    # Try to remove the string !HG! from our list.
22237    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22238    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22239      # If it failed, the variable was not from the command line. Ignore it,
22240      # but warn the user (except for BASH, which is always set by the calling BASH).
22241      if test "xHG" != xBASH; then
22242        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22243$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22244      fi
22245      # Try to locate tool using the code snippet
22246      for ac_prog in hg
22247do
22248  # Extract the first word of "$ac_prog", so it can be a program name with args.
22249set dummy $ac_prog; ac_word=$2
22250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22251$as_echo_n "checking for $ac_word... " >&6; }
22252if ${ac_cv_path_HG+:} false; then :
22253  $as_echo_n "(cached) " >&6
22254else
22255  case $HG in
22256  [\\/]* | ?:[\\/]*)
22257  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22258  ;;
22259  *)
22260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22261for as_dir in $PATH
22262do
22263  IFS=$as_save_IFS
22264  test -z "$as_dir" && as_dir=.
22265    for ac_exec_ext in '' $ac_executable_extensions; do
22266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22267    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22269    break 2
22270  fi
22271done
22272  done
22273IFS=$as_save_IFS
22274
22275  ;;
22276esac
22277fi
22278HG=$ac_cv_path_HG
22279if test -n "$HG"; then
22280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22281$as_echo "$HG" >&6; }
22282else
22283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22284$as_echo "no" >&6; }
22285fi
22286
22287
22288  test -n "$HG" && break
22289done
22290
22291    else
22292      # If it succeeded, then it was overridden by the user. We will use it
22293      # for the tool.
22294
22295      # First remove it from the list of overridden variables, so we can test
22296      # for unknown variables in the end.
22297      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22298
22299      # Check if we try to supply an empty value
22300      if test "x$HG" = x; then
22301        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22302$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22303        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22304$as_echo_n "checking for HG... " >&6; }
22305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22306$as_echo "disabled" >&6; }
22307      else
22308        # Check if the provided tool contains a complete path.
22309        tool_specified="$HG"
22310        tool_basename="${tool_specified##*/}"
22311        if test "x$tool_basename" = "x$tool_specified"; then
22312          # A command without a complete path is provided, search $PATH.
22313          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22314$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22315          # Extract the first word of "$tool_basename", so it can be a program name with args.
22316set dummy $tool_basename; ac_word=$2
22317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22318$as_echo_n "checking for $ac_word... " >&6; }
22319if ${ac_cv_path_HG+:} false; then :
22320  $as_echo_n "(cached) " >&6
22321else
22322  case $HG in
22323  [\\/]* | ?:[\\/]*)
22324  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22325  ;;
22326  *)
22327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22328for as_dir in $PATH
22329do
22330  IFS=$as_save_IFS
22331  test -z "$as_dir" && as_dir=.
22332    for ac_exec_ext in '' $ac_executable_extensions; do
22333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22334    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22336    break 2
22337  fi
22338done
22339  done
22340IFS=$as_save_IFS
22341
22342  ;;
22343esac
22344fi
22345HG=$ac_cv_path_HG
22346if test -n "$HG"; then
22347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22348$as_echo "$HG" >&6; }
22349else
22350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22351$as_echo "no" >&6; }
22352fi
22353
22354
22355          if test "x$HG" = x; then
22356            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22357          fi
22358        else
22359          # Otherwise we believe it is a complete path. Use it as it is.
22360          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22361$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22362          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22363$as_echo_n "checking for HG... " >&6; }
22364          if test ! -x "$tool_specified"; then
22365            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22366$as_echo "not found" >&6; }
22367            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22368          fi
22369          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22370$as_echo "$tool_specified" >&6; }
22371        fi
22372      fi
22373    fi
22374
22375  fi
22376
22377
22378
22379
22380  # Publish this variable in the help.
22381
22382
22383  if [ -z "${STAT+x}" ]; then
22384    # The variable is not set by user, try to locate tool using the code snippet
22385    for ac_prog in stat
22386do
22387  # Extract the first word of "$ac_prog", so it can be a program name with args.
22388set dummy $ac_prog; ac_word=$2
22389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22390$as_echo_n "checking for $ac_word... " >&6; }
22391if ${ac_cv_path_STAT+:} false; then :
22392  $as_echo_n "(cached) " >&6
22393else
22394  case $STAT in
22395  [\\/]* | ?:[\\/]*)
22396  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22397  ;;
22398  *)
22399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22400for as_dir in $PATH
22401do
22402  IFS=$as_save_IFS
22403  test -z "$as_dir" && as_dir=.
22404    for ac_exec_ext in '' $ac_executable_extensions; do
22405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22406    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22408    break 2
22409  fi
22410done
22411  done
22412IFS=$as_save_IFS
22413
22414  ;;
22415esac
22416fi
22417STAT=$ac_cv_path_STAT
22418if test -n "$STAT"; then
22419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22420$as_echo "$STAT" >&6; }
22421else
22422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22423$as_echo "no" >&6; }
22424fi
22425
22426
22427  test -n "$STAT" && break
22428done
22429
22430  else
22431    # The variable is set, but is it from the command line or the environment?
22432
22433    # Try to remove the string !STAT! from our list.
22434    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22435    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22436      # If it failed, the variable was not from the command line. Ignore it,
22437      # but warn the user (except for BASH, which is always set by the calling BASH).
22438      if test "xSTAT" != xBASH; then
22439        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22440$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22441      fi
22442      # Try to locate tool using the code snippet
22443      for ac_prog in stat
22444do
22445  # Extract the first word of "$ac_prog", so it can be a program name with args.
22446set dummy $ac_prog; ac_word=$2
22447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22448$as_echo_n "checking for $ac_word... " >&6; }
22449if ${ac_cv_path_STAT+:} false; then :
22450  $as_echo_n "(cached) " >&6
22451else
22452  case $STAT in
22453  [\\/]* | ?:[\\/]*)
22454  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22455  ;;
22456  *)
22457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22458for as_dir in $PATH
22459do
22460  IFS=$as_save_IFS
22461  test -z "$as_dir" && as_dir=.
22462    for ac_exec_ext in '' $ac_executable_extensions; do
22463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22464    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22466    break 2
22467  fi
22468done
22469  done
22470IFS=$as_save_IFS
22471
22472  ;;
22473esac
22474fi
22475STAT=$ac_cv_path_STAT
22476if test -n "$STAT"; then
22477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22478$as_echo "$STAT" >&6; }
22479else
22480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22481$as_echo "no" >&6; }
22482fi
22483
22484
22485  test -n "$STAT" && break
22486done
22487
22488    else
22489      # If it succeeded, then it was overridden by the user. We will use it
22490      # for the tool.
22491
22492      # First remove it from the list of overridden variables, so we can test
22493      # for unknown variables in the end.
22494      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22495
22496      # Check if we try to supply an empty value
22497      if test "x$STAT" = x; then
22498        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22499$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22500        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22501$as_echo_n "checking for STAT... " >&6; }
22502        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22503$as_echo "disabled" >&6; }
22504      else
22505        # Check if the provided tool contains a complete path.
22506        tool_specified="$STAT"
22507        tool_basename="${tool_specified##*/}"
22508        if test "x$tool_basename" = "x$tool_specified"; then
22509          # A command without a complete path is provided, search $PATH.
22510          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22511$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22512          # Extract the first word of "$tool_basename", so it can be a program name with args.
22513set dummy $tool_basename; ac_word=$2
22514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22515$as_echo_n "checking for $ac_word... " >&6; }
22516if ${ac_cv_path_STAT+:} false; then :
22517  $as_echo_n "(cached) " >&6
22518else
22519  case $STAT in
22520  [\\/]* | ?:[\\/]*)
22521  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22522  ;;
22523  *)
22524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22525for as_dir in $PATH
22526do
22527  IFS=$as_save_IFS
22528  test -z "$as_dir" && as_dir=.
22529    for ac_exec_ext in '' $ac_executable_extensions; do
22530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22531    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22533    break 2
22534  fi
22535done
22536  done
22537IFS=$as_save_IFS
22538
22539  ;;
22540esac
22541fi
22542STAT=$ac_cv_path_STAT
22543if test -n "$STAT"; then
22544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22545$as_echo "$STAT" >&6; }
22546else
22547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22548$as_echo "no" >&6; }
22549fi
22550
22551
22552          if test "x$STAT" = x; then
22553            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22554          fi
22555        else
22556          # Otherwise we believe it is a complete path. Use it as it is.
22557          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22558$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22559          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22560$as_echo_n "checking for STAT... " >&6; }
22561          if test ! -x "$tool_specified"; then
22562            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22563$as_echo "not found" >&6; }
22564            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22565          fi
22566          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22567$as_echo "$tool_specified" >&6; }
22568        fi
22569      fi
22570    fi
22571
22572  fi
22573
22574
22575
22576
22577  # Publish this variable in the help.
22578
22579
22580  if [ -z "${TIME+x}" ]; then
22581    # The variable is not set by user, try to locate tool using the code snippet
22582    for ac_prog in time
22583do
22584  # Extract the first word of "$ac_prog", so it can be a program name with args.
22585set dummy $ac_prog; ac_word=$2
22586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22587$as_echo_n "checking for $ac_word... " >&6; }
22588if ${ac_cv_path_TIME+:} false; then :
22589  $as_echo_n "(cached) " >&6
22590else
22591  case $TIME in
22592  [\\/]* | ?:[\\/]*)
22593  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22594  ;;
22595  *)
22596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22597for as_dir in $PATH
22598do
22599  IFS=$as_save_IFS
22600  test -z "$as_dir" && as_dir=.
22601    for ac_exec_ext in '' $ac_executable_extensions; do
22602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22603    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22605    break 2
22606  fi
22607done
22608  done
22609IFS=$as_save_IFS
22610
22611  ;;
22612esac
22613fi
22614TIME=$ac_cv_path_TIME
22615if test -n "$TIME"; then
22616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22617$as_echo "$TIME" >&6; }
22618else
22619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22620$as_echo "no" >&6; }
22621fi
22622
22623
22624  test -n "$TIME" && break
22625done
22626
22627  else
22628    # The variable is set, but is it from the command line or the environment?
22629
22630    # Try to remove the string !TIME! from our list.
22631    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22632    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22633      # If it failed, the variable was not from the command line. Ignore it,
22634      # but warn the user (except for BASH, which is always set by the calling BASH).
22635      if test "xTIME" != xBASH; then
22636        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22637$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22638      fi
22639      # Try to locate tool using the code snippet
22640      for ac_prog in time
22641do
22642  # Extract the first word of "$ac_prog", so it can be a program name with args.
22643set dummy $ac_prog; ac_word=$2
22644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22645$as_echo_n "checking for $ac_word... " >&6; }
22646if ${ac_cv_path_TIME+:} false; then :
22647  $as_echo_n "(cached) " >&6
22648else
22649  case $TIME in
22650  [\\/]* | ?:[\\/]*)
22651  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22652  ;;
22653  *)
22654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22655for as_dir in $PATH
22656do
22657  IFS=$as_save_IFS
22658  test -z "$as_dir" && as_dir=.
22659    for ac_exec_ext in '' $ac_executable_extensions; do
22660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22661    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22663    break 2
22664  fi
22665done
22666  done
22667IFS=$as_save_IFS
22668
22669  ;;
22670esac
22671fi
22672TIME=$ac_cv_path_TIME
22673if test -n "$TIME"; then
22674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22675$as_echo "$TIME" >&6; }
22676else
22677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22678$as_echo "no" >&6; }
22679fi
22680
22681
22682  test -n "$TIME" && break
22683done
22684
22685    else
22686      # If it succeeded, then it was overridden by the user. We will use it
22687      # for the tool.
22688
22689      # First remove it from the list of overridden variables, so we can test
22690      # for unknown variables in the end.
22691      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22692
22693      # Check if we try to supply an empty value
22694      if test "x$TIME" = x; then
22695        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22696$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22697        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22698$as_echo_n "checking for TIME... " >&6; }
22699        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22700$as_echo "disabled" >&6; }
22701      else
22702        # Check if the provided tool contains a complete path.
22703        tool_specified="$TIME"
22704        tool_basename="${tool_specified##*/}"
22705        if test "x$tool_basename" = "x$tool_specified"; then
22706          # A command without a complete path is provided, search $PATH.
22707          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22708$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22709          # Extract the first word of "$tool_basename", so it can be a program name with args.
22710set dummy $tool_basename; ac_word=$2
22711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22712$as_echo_n "checking for $ac_word... " >&6; }
22713if ${ac_cv_path_TIME+:} false; then :
22714  $as_echo_n "(cached) " >&6
22715else
22716  case $TIME in
22717  [\\/]* | ?:[\\/]*)
22718  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22719  ;;
22720  *)
22721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22722for as_dir in $PATH
22723do
22724  IFS=$as_save_IFS
22725  test -z "$as_dir" && as_dir=.
22726    for ac_exec_ext in '' $ac_executable_extensions; do
22727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22728    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22730    break 2
22731  fi
22732done
22733  done
22734IFS=$as_save_IFS
22735
22736  ;;
22737esac
22738fi
22739TIME=$ac_cv_path_TIME
22740if test -n "$TIME"; then
22741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22742$as_echo "$TIME" >&6; }
22743else
22744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22745$as_echo "no" >&6; }
22746fi
22747
22748
22749          if test "x$TIME" = x; then
22750            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22751          fi
22752        else
22753          # Otherwise we believe it is a complete path. Use it as it is.
22754          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22755$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22756          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22757$as_echo_n "checking for TIME... " >&6; }
22758          if test ! -x "$tool_specified"; then
22759            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22760$as_echo "not found" >&6; }
22761            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22762          fi
22763          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22764$as_echo "$tool_specified" >&6; }
22765        fi
22766      fi
22767    fi
22768
22769  fi
22770
22771
22772
22773
22774  # Publish this variable in the help.
22775
22776
22777  if [ -z "${DTRACE+x}" ]; then
22778    # The variable is not set by user, try to locate tool using the code snippet
22779    for ac_prog in dtrace
22780do
22781  # Extract the first word of "$ac_prog", so it can be a program name with args.
22782set dummy $ac_prog; ac_word=$2
22783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22784$as_echo_n "checking for $ac_word... " >&6; }
22785if ${ac_cv_path_DTRACE+:} false; then :
22786  $as_echo_n "(cached) " >&6
22787else
22788  case $DTRACE in
22789  [\\/]* | ?:[\\/]*)
22790  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22791  ;;
22792  *)
22793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22794for as_dir in $PATH
22795do
22796  IFS=$as_save_IFS
22797  test -z "$as_dir" && as_dir=.
22798    for ac_exec_ext in '' $ac_executable_extensions; do
22799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22800    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22802    break 2
22803  fi
22804done
22805  done
22806IFS=$as_save_IFS
22807
22808  ;;
22809esac
22810fi
22811DTRACE=$ac_cv_path_DTRACE
22812if test -n "$DTRACE"; then
22813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22814$as_echo "$DTRACE" >&6; }
22815else
22816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22817$as_echo "no" >&6; }
22818fi
22819
22820
22821  test -n "$DTRACE" && break
22822done
22823
22824  else
22825    # The variable is set, but is it from the command line or the environment?
22826
22827    # Try to remove the string !DTRACE! from our list.
22828    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22829    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22830      # If it failed, the variable was not from the command line. Ignore it,
22831      # but warn the user (except for BASH, which is always set by the calling BASH).
22832      if test "xDTRACE" != xBASH; then
22833        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22834$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22835      fi
22836      # Try to locate tool using the code snippet
22837      for ac_prog in dtrace
22838do
22839  # Extract the first word of "$ac_prog", so it can be a program name with args.
22840set dummy $ac_prog; ac_word=$2
22841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22842$as_echo_n "checking for $ac_word... " >&6; }
22843if ${ac_cv_path_DTRACE+:} false; then :
22844  $as_echo_n "(cached) " >&6
22845else
22846  case $DTRACE in
22847  [\\/]* | ?:[\\/]*)
22848  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22849  ;;
22850  *)
22851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22852for as_dir in $PATH
22853do
22854  IFS=$as_save_IFS
22855  test -z "$as_dir" && as_dir=.
22856    for ac_exec_ext in '' $ac_executable_extensions; do
22857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22858    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22860    break 2
22861  fi
22862done
22863  done
22864IFS=$as_save_IFS
22865
22866  ;;
22867esac
22868fi
22869DTRACE=$ac_cv_path_DTRACE
22870if test -n "$DTRACE"; then
22871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22872$as_echo "$DTRACE" >&6; }
22873else
22874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22875$as_echo "no" >&6; }
22876fi
22877
22878
22879  test -n "$DTRACE" && break
22880done
22881
22882    else
22883      # If it succeeded, then it was overridden by the user. We will use it
22884      # for the tool.
22885
22886      # First remove it from the list of overridden variables, so we can test
22887      # for unknown variables in the end.
22888      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22889
22890      # Check if we try to supply an empty value
22891      if test "x$DTRACE" = x; then
22892        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22893$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22894        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22895$as_echo_n "checking for DTRACE... " >&6; }
22896        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22897$as_echo "disabled" >&6; }
22898      else
22899        # Check if the provided tool contains a complete path.
22900        tool_specified="$DTRACE"
22901        tool_basename="${tool_specified##*/}"
22902        if test "x$tool_basename" = "x$tool_specified"; then
22903          # A command without a complete path is provided, search $PATH.
22904          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22905$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22906          # Extract the first word of "$tool_basename", so it can be a program name with args.
22907set dummy $tool_basename; ac_word=$2
22908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22909$as_echo_n "checking for $ac_word... " >&6; }
22910if ${ac_cv_path_DTRACE+:} false; then :
22911  $as_echo_n "(cached) " >&6
22912else
22913  case $DTRACE in
22914  [\\/]* | ?:[\\/]*)
22915  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22916  ;;
22917  *)
22918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22919for as_dir in $PATH
22920do
22921  IFS=$as_save_IFS
22922  test -z "$as_dir" && as_dir=.
22923    for ac_exec_ext in '' $ac_executable_extensions; do
22924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22925    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22927    break 2
22928  fi
22929done
22930  done
22931IFS=$as_save_IFS
22932
22933  ;;
22934esac
22935fi
22936DTRACE=$ac_cv_path_DTRACE
22937if test -n "$DTRACE"; then
22938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22939$as_echo "$DTRACE" >&6; }
22940else
22941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22942$as_echo "no" >&6; }
22943fi
22944
22945
22946          if test "x$DTRACE" = x; then
22947            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22948          fi
22949        else
22950          # Otherwise we believe it is a complete path. Use it as it is.
22951          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22952$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22953          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22954$as_echo_n "checking for DTRACE... " >&6; }
22955          if test ! -x "$tool_specified"; then
22956            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22957$as_echo "not found" >&6; }
22958            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22959          fi
22960          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22961$as_echo "$tool_specified" >&6; }
22962        fi
22963      fi
22964    fi
22965
22966  fi
22967
22968
22969
22970
22971  # Publish this variable in the help.
22972
22973
22974  if [ -z "${PATCH+x}" ]; then
22975    # The variable is not set by user, try to locate tool using the code snippet
22976    for ac_prog in gpatch patch
22977do
22978  # Extract the first word of "$ac_prog", so it can be a program name with args.
22979set dummy $ac_prog; ac_word=$2
22980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22981$as_echo_n "checking for $ac_word... " >&6; }
22982if ${ac_cv_path_PATCH+:} false; then :
22983  $as_echo_n "(cached) " >&6
22984else
22985  case $PATCH in
22986  [\\/]* | ?:[\\/]*)
22987  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22988  ;;
22989  *)
22990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22991for as_dir in $PATH
22992do
22993  IFS=$as_save_IFS
22994  test -z "$as_dir" && as_dir=.
22995    for ac_exec_ext in '' $ac_executable_extensions; do
22996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22997    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22999    break 2
23000  fi
23001done
23002  done
23003IFS=$as_save_IFS
23004
23005  ;;
23006esac
23007fi
23008PATCH=$ac_cv_path_PATCH
23009if test -n "$PATCH"; then
23010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23011$as_echo "$PATCH" >&6; }
23012else
23013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23014$as_echo "no" >&6; }
23015fi
23016
23017
23018  test -n "$PATCH" && break
23019done
23020
23021  else
23022    # The variable is set, but is it from the command line or the environment?
23023
23024    # Try to remove the string !PATCH! from our list.
23025    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23026    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23027      # If it failed, the variable was not from the command line. Ignore it,
23028      # but warn the user (except for BASH, which is always set by the calling BASH).
23029      if test "xPATCH" != xBASH; then
23030        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23031$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23032      fi
23033      # Try to locate tool using the code snippet
23034      for ac_prog in gpatch patch
23035do
23036  # Extract the first word of "$ac_prog", so it can be a program name with args.
23037set dummy $ac_prog; ac_word=$2
23038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23039$as_echo_n "checking for $ac_word... " >&6; }
23040if ${ac_cv_path_PATCH+:} false; then :
23041  $as_echo_n "(cached) " >&6
23042else
23043  case $PATCH in
23044  [\\/]* | ?:[\\/]*)
23045  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23046  ;;
23047  *)
23048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23049for as_dir in $PATH
23050do
23051  IFS=$as_save_IFS
23052  test -z "$as_dir" && as_dir=.
23053    for ac_exec_ext in '' $ac_executable_extensions; do
23054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23055    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23057    break 2
23058  fi
23059done
23060  done
23061IFS=$as_save_IFS
23062
23063  ;;
23064esac
23065fi
23066PATCH=$ac_cv_path_PATCH
23067if test -n "$PATCH"; then
23068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23069$as_echo "$PATCH" >&6; }
23070else
23071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23072$as_echo "no" >&6; }
23073fi
23074
23075
23076  test -n "$PATCH" && break
23077done
23078
23079    else
23080      # If it succeeded, then it was overridden by the user. We will use it
23081      # for the tool.
23082
23083      # First remove it from the list of overridden variables, so we can test
23084      # for unknown variables in the end.
23085      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23086
23087      # Check if we try to supply an empty value
23088      if test "x$PATCH" = x; then
23089        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23090$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23091        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23092$as_echo_n "checking for PATCH... " >&6; }
23093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23094$as_echo "disabled" >&6; }
23095      else
23096        # Check if the provided tool contains a complete path.
23097        tool_specified="$PATCH"
23098        tool_basename="${tool_specified##*/}"
23099        if test "x$tool_basename" = "x$tool_specified"; then
23100          # A command without a complete path is provided, search $PATH.
23101          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23102$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23103          # Extract the first word of "$tool_basename", so it can be a program name with args.
23104set dummy $tool_basename; ac_word=$2
23105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23106$as_echo_n "checking for $ac_word... " >&6; }
23107if ${ac_cv_path_PATCH+:} false; then :
23108  $as_echo_n "(cached) " >&6
23109else
23110  case $PATCH in
23111  [\\/]* | ?:[\\/]*)
23112  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23113  ;;
23114  *)
23115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23116for as_dir in $PATH
23117do
23118  IFS=$as_save_IFS
23119  test -z "$as_dir" && as_dir=.
23120    for ac_exec_ext in '' $ac_executable_extensions; do
23121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23122    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23124    break 2
23125  fi
23126done
23127  done
23128IFS=$as_save_IFS
23129
23130  ;;
23131esac
23132fi
23133PATCH=$ac_cv_path_PATCH
23134if test -n "$PATCH"; then
23135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23136$as_echo "$PATCH" >&6; }
23137else
23138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23139$as_echo "no" >&6; }
23140fi
23141
23142
23143          if test "x$PATCH" = x; then
23144            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23145          fi
23146        else
23147          # Otherwise we believe it is a complete path. Use it as it is.
23148          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23149$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23150          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23151$as_echo_n "checking for PATCH... " >&6; }
23152          if test ! -x "$tool_specified"; then
23153            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23154$as_echo "not found" >&6; }
23155            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23156          fi
23157          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23158$as_echo "$tool_specified" >&6; }
23159        fi
23160      fi
23161    fi
23162
23163  fi
23164
23165
23166  # Check if it's GNU time
23167  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23168  if test "x$IS_GNU_TIME" != x; then
23169    IS_GNU_TIME=yes
23170  else
23171    IS_GNU_TIME=no
23172  fi
23173
23174
23175  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23176
23177
23178
23179  # Publish this variable in the help.
23180
23181
23182  if [ -z "${DSYMUTIL+x}" ]; then
23183    # The variable is not set by user, try to locate tool using the code snippet
23184    for ac_prog in dsymutil
23185do
23186  # Extract the first word of "$ac_prog", so it can be a program name with args.
23187set dummy $ac_prog; ac_word=$2
23188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23189$as_echo_n "checking for $ac_word... " >&6; }
23190if ${ac_cv_path_DSYMUTIL+:} false; then :
23191  $as_echo_n "(cached) " >&6
23192else
23193  case $DSYMUTIL in
23194  [\\/]* | ?:[\\/]*)
23195  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23196  ;;
23197  *)
23198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23199for as_dir in $PATH
23200do
23201  IFS=$as_save_IFS
23202  test -z "$as_dir" && as_dir=.
23203    for ac_exec_ext in '' $ac_executable_extensions; do
23204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23205    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23207    break 2
23208  fi
23209done
23210  done
23211IFS=$as_save_IFS
23212
23213  ;;
23214esac
23215fi
23216DSYMUTIL=$ac_cv_path_DSYMUTIL
23217if test -n "$DSYMUTIL"; then
23218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23219$as_echo "$DSYMUTIL" >&6; }
23220else
23221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23222$as_echo "no" >&6; }
23223fi
23224
23225
23226  test -n "$DSYMUTIL" && break
23227done
23228
23229  else
23230    # The variable is set, but is it from the command line or the environment?
23231
23232    # Try to remove the string !DSYMUTIL! from our list.
23233    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23234    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23235      # If it failed, the variable was not from the command line. Ignore it,
23236      # but warn the user (except for BASH, which is always set by the calling BASH).
23237      if test "xDSYMUTIL" != xBASH; then
23238        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23239$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23240      fi
23241      # Try to locate tool using the code snippet
23242      for ac_prog in dsymutil
23243do
23244  # Extract the first word of "$ac_prog", so it can be a program name with args.
23245set dummy $ac_prog; ac_word=$2
23246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23247$as_echo_n "checking for $ac_word... " >&6; }
23248if ${ac_cv_path_DSYMUTIL+:} false; then :
23249  $as_echo_n "(cached) " >&6
23250else
23251  case $DSYMUTIL in
23252  [\\/]* | ?:[\\/]*)
23253  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23254  ;;
23255  *)
23256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23257for as_dir in $PATH
23258do
23259  IFS=$as_save_IFS
23260  test -z "$as_dir" && as_dir=.
23261    for ac_exec_ext in '' $ac_executable_extensions; do
23262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23263    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23265    break 2
23266  fi
23267done
23268  done
23269IFS=$as_save_IFS
23270
23271  ;;
23272esac
23273fi
23274DSYMUTIL=$ac_cv_path_DSYMUTIL
23275if test -n "$DSYMUTIL"; then
23276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23277$as_echo "$DSYMUTIL" >&6; }
23278else
23279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23280$as_echo "no" >&6; }
23281fi
23282
23283
23284  test -n "$DSYMUTIL" && break
23285done
23286
23287    else
23288      # If it succeeded, then it was overridden by the user. We will use it
23289      # for the tool.
23290
23291      # First remove it from the list of overridden variables, so we can test
23292      # for unknown variables in the end.
23293      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23294
23295      # Check if we try to supply an empty value
23296      if test "x$DSYMUTIL" = x; then
23297        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23298$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23299        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23300$as_echo_n "checking for DSYMUTIL... " >&6; }
23301        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23302$as_echo "disabled" >&6; }
23303      else
23304        # Check if the provided tool contains a complete path.
23305        tool_specified="$DSYMUTIL"
23306        tool_basename="${tool_specified##*/}"
23307        if test "x$tool_basename" = "x$tool_specified"; then
23308          # A command without a complete path is provided, search $PATH.
23309          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23310$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23311          # Extract the first word of "$tool_basename", so it can be a program name with args.
23312set dummy $tool_basename; ac_word=$2
23313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23314$as_echo_n "checking for $ac_word... " >&6; }
23315if ${ac_cv_path_DSYMUTIL+:} false; then :
23316  $as_echo_n "(cached) " >&6
23317else
23318  case $DSYMUTIL in
23319  [\\/]* | ?:[\\/]*)
23320  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23321  ;;
23322  *)
23323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23324for as_dir in $PATH
23325do
23326  IFS=$as_save_IFS
23327  test -z "$as_dir" && as_dir=.
23328    for ac_exec_ext in '' $ac_executable_extensions; do
23329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23330    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23332    break 2
23333  fi
23334done
23335  done
23336IFS=$as_save_IFS
23337
23338  ;;
23339esac
23340fi
23341DSYMUTIL=$ac_cv_path_DSYMUTIL
23342if test -n "$DSYMUTIL"; then
23343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23344$as_echo "$DSYMUTIL" >&6; }
23345else
23346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23347$as_echo "no" >&6; }
23348fi
23349
23350
23351          if test "x$DSYMUTIL" = x; then
23352            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23353          fi
23354        else
23355          # Otherwise we believe it is a complete path. Use it as it is.
23356          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23357$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23358          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23359$as_echo_n "checking for DSYMUTIL... " >&6; }
23360          if test ! -x "$tool_specified"; then
23361            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23362$as_echo "not found" >&6; }
23363            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23364          fi
23365          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23366$as_echo "$tool_specified" >&6; }
23367        fi
23368      fi
23369    fi
23370
23371  fi
23372
23373
23374
23375  if test "x$DSYMUTIL" = x; then
23376    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23377  fi
23378
23379
23380
23381
23382
23383  # Publish this variable in the help.
23384
23385
23386  if [ -z "${XATTR+x}" ]; then
23387    # The variable is not set by user, try to locate tool using the code snippet
23388    for ac_prog in xattr
23389do
23390  # Extract the first word of "$ac_prog", so it can be a program name with args.
23391set dummy $ac_prog; ac_word=$2
23392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23393$as_echo_n "checking for $ac_word... " >&6; }
23394if ${ac_cv_path_XATTR+:} false; then :
23395  $as_echo_n "(cached) " >&6
23396else
23397  case $XATTR in
23398  [\\/]* | ?:[\\/]*)
23399  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23400  ;;
23401  *)
23402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23403for as_dir in $PATH
23404do
23405  IFS=$as_save_IFS
23406  test -z "$as_dir" && as_dir=.
23407    for ac_exec_ext in '' $ac_executable_extensions; do
23408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23409    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23411    break 2
23412  fi
23413done
23414  done
23415IFS=$as_save_IFS
23416
23417  ;;
23418esac
23419fi
23420XATTR=$ac_cv_path_XATTR
23421if test -n "$XATTR"; then
23422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23423$as_echo "$XATTR" >&6; }
23424else
23425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23426$as_echo "no" >&6; }
23427fi
23428
23429
23430  test -n "$XATTR" && break
23431done
23432
23433  else
23434    # The variable is set, but is it from the command line or the environment?
23435
23436    # Try to remove the string !XATTR! from our list.
23437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23439      # If it failed, the variable was not from the command line. Ignore it,
23440      # but warn the user (except for BASH, which is always set by the calling BASH).
23441      if test "xXATTR" != xBASH; then
23442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23443$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23444      fi
23445      # Try to locate tool using the code snippet
23446      for ac_prog in xattr
23447do
23448  # Extract the first word of "$ac_prog", so it can be a program name with args.
23449set dummy $ac_prog; ac_word=$2
23450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23451$as_echo_n "checking for $ac_word... " >&6; }
23452if ${ac_cv_path_XATTR+:} false; then :
23453  $as_echo_n "(cached) " >&6
23454else
23455  case $XATTR in
23456  [\\/]* | ?:[\\/]*)
23457  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23458  ;;
23459  *)
23460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23461for as_dir in $PATH
23462do
23463  IFS=$as_save_IFS
23464  test -z "$as_dir" && as_dir=.
23465    for ac_exec_ext in '' $ac_executable_extensions; do
23466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23467    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23469    break 2
23470  fi
23471done
23472  done
23473IFS=$as_save_IFS
23474
23475  ;;
23476esac
23477fi
23478XATTR=$ac_cv_path_XATTR
23479if test -n "$XATTR"; then
23480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23481$as_echo "$XATTR" >&6; }
23482else
23483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23484$as_echo "no" >&6; }
23485fi
23486
23487
23488  test -n "$XATTR" && break
23489done
23490
23491    else
23492      # If it succeeded, then it was overridden by the user. We will use it
23493      # for the tool.
23494
23495      # First remove it from the list of overridden variables, so we can test
23496      # for unknown variables in the end.
23497      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23498
23499      # Check if we try to supply an empty value
23500      if test "x$XATTR" = x; then
23501        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23502$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23503        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23504$as_echo_n "checking for XATTR... " >&6; }
23505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23506$as_echo "disabled" >&6; }
23507      else
23508        # Check if the provided tool contains a complete path.
23509        tool_specified="$XATTR"
23510        tool_basename="${tool_specified##*/}"
23511        if test "x$tool_basename" = "x$tool_specified"; then
23512          # A command without a complete path is provided, search $PATH.
23513          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23514$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23515          # Extract the first word of "$tool_basename", so it can be a program name with args.
23516set dummy $tool_basename; ac_word=$2
23517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23518$as_echo_n "checking for $ac_word... " >&6; }
23519if ${ac_cv_path_XATTR+:} false; then :
23520  $as_echo_n "(cached) " >&6
23521else
23522  case $XATTR in
23523  [\\/]* | ?:[\\/]*)
23524  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23525  ;;
23526  *)
23527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23528for as_dir in $PATH
23529do
23530  IFS=$as_save_IFS
23531  test -z "$as_dir" && as_dir=.
23532    for ac_exec_ext in '' $ac_executable_extensions; do
23533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23534    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23536    break 2
23537  fi
23538done
23539  done
23540IFS=$as_save_IFS
23541
23542  ;;
23543esac
23544fi
23545XATTR=$ac_cv_path_XATTR
23546if test -n "$XATTR"; then
23547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23548$as_echo "$XATTR" >&6; }
23549else
23550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23551$as_echo "no" >&6; }
23552fi
23553
23554
23555          if test "x$XATTR" = x; then
23556            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23557          fi
23558        else
23559          # Otherwise we believe it is a complete path. Use it as it is.
23560          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23561$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23562          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23563$as_echo_n "checking for XATTR... " >&6; }
23564          if test ! -x "$tool_specified"; then
23565            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23566$as_echo "not found" >&6; }
23567            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23568          fi
23569          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23570$as_echo "$tool_specified" >&6; }
23571        fi
23572      fi
23573    fi
23574
23575  fi
23576
23577
23578
23579  if test "x$XATTR" = x; then
23580    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23581  fi
23582
23583
23584
23585
23586  # Publish this variable in the help.
23587
23588
23589  if [ -z "${CODESIGN+x}" ]; then
23590    # The variable is not set by user, try to locate tool using the code snippet
23591    for ac_prog in codesign
23592do
23593  # Extract the first word of "$ac_prog", so it can be a program name with args.
23594set dummy $ac_prog; ac_word=$2
23595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23596$as_echo_n "checking for $ac_word... " >&6; }
23597if ${ac_cv_path_CODESIGN+:} false; then :
23598  $as_echo_n "(cached) " >&6
23599else
23600  case $CODESIGN in
23601  [\\/]* | ?:[\\/]*)
23602  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23603  ;;
23604  *)
23605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23606for as_dir in $PATH
23607do
23608  IFS=$as_save_IFS
23609  test -z "$as_dir" && as_dir=.
23610    for ac_exec_ext in '' $ac_executable_extensions; do
23611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23612    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23614    break 2
23615  fi
23616done
23617  done
23618IFS=$as_save_IFS
23619
23620  ;;
23621esac
23622fi
23623CODESIGN=$ac_cv_path_CODESIGN
23624if test -n "$CODESIGN"; then
23625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23626$as_echo "$CODESIGN" >&6; }
23627else
23628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23629$as_echo "no" >&6; }
23630fi
23631
23632
23633  test -n "$CODESIGN" && break
23634done
23635
23636  else
23637    # The variable is set, but is it from the command line or the environment?
23638
23639    # Try to remove the string !CODESIGN! from our list.
23640    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23641    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23642      # If it failed, the variable was not from the command line. Ignore it,
23643      # but warn the user (except for BASH, which is always set by the calling BASH).
23644      if test "xCODESIGN" != xBASH; then
23645        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23646$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23647      fi
23648      # Try to locate tool using the code snippet
23649      for ac_prog in codesign
23650do
23651  # Extract the first word of "$ac_prog", so it can be a program name with args.
23652set dummy $ac_prog; ac_word=$2
23653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23654$as_echo_n "checking for $ac_word... " >&6; }
23655if ${ac_cv_path_CODESIGN+:} false; then :
23656  $as_echo_n "(cached) " >&6
23657else
23658  case $CODESIGN in
23659  [\\/]* | ?:[\\/]*)
23660  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23661  ;;
23662  *)
23663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23664for as_dir in $PATH
23665do
23666  IFS=$as_save_IFS
23667  test -z "$as_dir" && as_dir=.
23668    for ac_exec_ext in '' $ac_executable_extensions; do
23669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23670    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23672    break 2
23673  fi
23674done
23675  done
23676IFS=$as_save_IFS
23677
23678  ;;
23679esac
23680fi
23681CODESIGN=$ac_cv_path_CODESIGN
23682if test -n "$CODESIGN"; then
23683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23684$as_echo "$CODESIGN" >&6; }
23685else
23686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23687$as_echo "no" >&6; }
23688fi
23689
23690
23691  test -n "$CODESIGN" && break
23692done
23693
23694    else
23695      # If it succeeded, then it was overridden by the user. We will use it
23696      # for the tool.
23697
23698      # First remove it from the list of overridden variables, so we can test
23699      # for unknown variables in the end.
23700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23701
23702      # Check if we try to supply an empty value
23703      if test "x$CODESIGN" = x; then
23704        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23705$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23706        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23707$as_echo_n "checking for CODESIGN... " >&6; }
23708        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23709$as_echo "disabled" >&6; }
23710      else
23711        # Check if the provided tool contains a complete path.
23712        tool_specified="$CODESIGN"
23713        tool_basename="${tool_specified##*/}"
23714        if test "x$tool_basename" = "x$tool_specified"; then
23715          # A command without a complete path is provided, search $PATH.
23716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23717$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23718          # Extract the first word of "$tool_basename", so it can be a program name with args.
23719set dummy $tool_basename; ac_word=$2
23720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23721$as_echo_n "checking for $ac_word... " >&6; }
23722if ${ac_cv_path_CODESIGN+:} false; then :
23723  $as_echo_n "(cached) " >&6
23724else
23725  case $CODESIGN in
23726  [\\/]* | ?:[\\/]*)
23727  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23728  ;;
23729  *)
23730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23731for as_dir in $PATH
23732do
23733  IFS=$as_save_IFS
23734  test -z "$as_dir" && as_dir=.
23735    for ac_exec_ext in '' $ac_executable_extensions; do
23736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23737    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23739    break 2
23740  fi
23741done
23742  done
23743IFS=$as_save_IFS
23744
23745  ;;
23746esac
23747fi
23748CODESIGN=$ac_cv_path_CODESIGN
23749if test -n "$CODESIGN"; then
23750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23751$as_echo "$CODESIGN" >&6; }
23752else
23753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23754$as_echo "no" >&6; }
23755fi
23756
23757
23758          if test "x$CODESIGN" = x; then
23759            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23760          fi
23761        else
23762          # Otherwise we believe it is a complete path. Use it as it is.
23763          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23764$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23765          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23766$as_echo_n "checking for CODESIGN... " >&6; }
23767          if test ! -x "$tool_specified"; then
23768            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23769$as_echo "not found" >&6; }
23770            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23771          fi
23772          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23773$as_echo "$tool_specified" >&6; }
23774        fi
23775      fi
23776    fi
23777
23778  fi
23779
23780
23781    if test "x$CODESIGN" != "x"; then
23782      # Verify that the openjdk_codesign certificate is present
23783      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23784$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23785      $RM codesign-testfile
23786      $TOUCH codesign-testfile
23787      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23788      $RM codesign-testfile
23789      if test "x$CODESIGN" = x; then
23790        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23791$as_echo "no" >&6; }
23792      else
23793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23794$as_echo "yes" >&6; }
23795      fi
23796    fi
23797
23798
23799
23800  # Publish this variable in the help.
23801
23802
23803  if [ -z "${SETFILE+x}" ]; then
23804    # The variable is not set by user, try to locate tool using the code snippet
23805    for ac_prog in SetFile
23806do
23807  # Extract the first word of "$ac_prog", so it can be a program name with args.
23808set dummy $ac_prog; ac_word=$2
23809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23810$as_echo_n "checking for $ac_word... " >&6; }
23811if ${ac_cv_path_SETFILE+:} false; then :
23812  $as_echo_n "(cached) " >&6
23813else
23814  case $SETFILE in
23815  [\\/]* | ?:[\\/]*)
23816  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23817  ;;
23818  *)
23819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23820for as_dir in $PATH
23821do
23822  IFS=$as_save_IFS
23823  test -z "$as_dir" && as_dir=.
23824    for ac_exec_ext in '' $ac_executable_extensions; do
23825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23826    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23828    break 2
23829  fi
23830done
23831  done
23832IFS=$as_save_IFS
23833
23834  ;;
23835esac
23836fi
23837SETFILE=$ac_cv_path_SETFILE
23838if test -n "$SETFILE"; then
23839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23840$as_echo "$SETFILE" >&6; }
23841else
23842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23843$as_echo "no" >&6; }
23844fi
23845
23846
23847  test -n "$SETFILE" && break
23848done
23849
23850  else
23851    # The variable is set, but is it from the command line or the environment?
23852
23853    # Try to remove the string !SETFILE! from our list.
23854    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23855    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23856      # If it failed, the variable was not from the command line. Ignore it,
23857      # but warn the user (except for BASH, which is always set by the calling BASH).
23858      if test "xSETFILE" != xBASH; then
23859        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23860$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23861      fi
23862      # Try to locate tool using the code snippet
23863      for ac_prog in SetFile
23864do
23865  # Extract the first word of "$ac_prog", so it can be a program name with args.
23866set dummy $ac_prog; ac_word=$2
23867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23868$as_echo_n "checking for $ac_word... " >&6; }
23869if ${ac_cv_path_SETFILE+:} false; then :
23870  $as_echo_n "(cached) " >&6
23871else
23872  case $SETFILE in
23873  [\\/]* | ?:[\\/]*)
23874  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23875  ;;
23876  *)
23877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23878for as_dir in $PATH
23879do
23880  IFS=$as_save_IFS
23881  test -z "$as_dir" && as_dir=.
23882    for ac_exec_ext in '' $ac_executable_extensions; do
23883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23884    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23886    break 2
23887  fi
23888done
23889  done
23890IFS=$as_save_IFS
23891
23892  ;;
23893esac
23894fi
23895SETFILE=$ac_cv_path_SETFILE
23896if test -n "$SETFILE"; then
23897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23898$as_echo "$SETFILE" >&6; }
23899else
23900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23901$as_echo "no" >&6; }
23902fi
23903
23904
23905  test -n "$SETFILE" && break
23906done
23907
23908    else
23909      # If it succeeded, then it was overridden by the user. We will use it
23910      # for the tool.
23911
23912      # First remove it from the list of overridden variables, so we can test
23913      # for unknown variables in the end.
23914      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23915
23916      # Check if we try to supply an empty value
23917      if test "x$SETFILE" = x; then
23918        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23919$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23920        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23921$as_echo_n "checking for SETFILE... " >&6; }
23922        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23923$as_echo "disabled" >&6; }
23924      else
23925        # Check if the provided tool contains a complete path.
23926        tool_specified="$SETFILE"
23927        tool_basename="${tool_specified##*/}"
23928        if test "x$tool_basename" = "x$tool_specified"; then
23929          # A command without a complete path is provided, search $PATH.
23930          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23931$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23932          # Extract the first word of "$tool_basename", so it can be a program name with args.
23933set dummy $tool_basename; ac_word=$2
23934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23935$as_echo_n "checking for $ac_word... " >&6; }
23936if ${ac_cv_path_SETFILE+:} false; then :
23937  $as_echo_n "(cached) " >&6
23938else
23939  case $SETFILE in
23940  [\\/]* | ?:[\\/]*)
23941  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23942  ;;
23943  *)
23944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23945for as_dir in $PATH
23946do
23947  IFS=$as_save_IFS
23948  test -z "$as_dir" && as_dir=.
23949    for ac_exec_ext in '' $ac_executable_extensions; do
23950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23951    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23953    break 2
23954  fi
23955done
23956  done
23957IFS=$as_save_IFS
23958
23959  ;;
23960esac
23961fi
23962SETFILE=$ac_cv_path_SETFILE
23963if test -n "$SETFILE"; then
23964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23965$as_echo "$SETFILE" >&6; }
23966else
23967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23968$as_echo "no" >&6; }
23969fi
23970
23971
23972          if test "x$SETFILE" = x; then
23973            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23974          fi
23975        else
23976          # Otherwise we believe it is a complete path. Use it as it is.
23977          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23978$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23979          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23980$as_echo_n "checking for SETFILE... " >&6; }
23981          if test ! -x "$tool_specified"; then
23982            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23983$as_echo "not found" >&6; }
23984            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23985          fi
23986          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23987$as_echo "$tool_specified" >&6; }
23988        fi
23989      fi
23990    fi
23991
23992  fi
23993
23994
23995
23996  if test "x$SETFILE" = x; then
23997    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23998  fi
23999
24000
24001  fi
24002
24003
24004  # Test if bash supports pipefail.
24005  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24006$as_echo_n "checking if bash supports pipefail... " >&6; }
24007  if ${BASH} -c 'set -o pipefail'; then
24008    BASH_ARGS="$BASH_ARGS -o pipefail"
24009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24010$as_echo "yes" >&6; }
24011  else
24012    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24013$as_echo "no" >&6; }
24014  fi
24015
24016  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24017$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24018  if ${BASH} -e -c 'true'; then
24019    BASH_ARGS="$BASH_ARGS -e"
24020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24021$as_echo "yes" >&6; }
24022  else
24023    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24024$as_echo "no" >&6; }
24025  fi
24026
24027
24028
24029
24030# Check if pkg-config is available.
24031
24032
24033if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24034	if test -n "$ac_tool_prefix"; then
24035  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24036set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24038$as_echo_n "checking for $ac_word... " >&6; }
24039if ${ac_cv_path_PKG_CONFIG+:} false; then :
24040  $as_echo_n "(cached) " >&6
24041else
24042  case $PKG_CONFIG in
24043  [\\/]* | ?:[\\/]*)
24044  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24045  ;;
24046  *)
24047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24048for as_dir in $PATH
24049do
24050  IFS=$as_save_IFS
24051  test -z "$as_dir" && as_dir=.
24052    for ac_exec_ext in '' $ac_executable_extensions; do
24053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24054    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24056    break 2
24057  fi
24058done
24059  done
24060IFS=$as_save_IFS
24061
24062  ;;
24063esac
24064fi
24065PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24066if test -n "$PKG_CONFIG"; then
24067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24068$as_echo "$PKG_CONFIG" >&6; }
24069else
24070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24071$as_echo "no" >&6; }
24072fi
24073
24074
24075fi
24076if test -z "$ac_cv_path_PKG_CONFIG"; then
24077  ac_pt_PKG_CONFIG=$PKG_CONFIG
24078  # Extract the first word of "pkg-config", so it can be a program name with args.
24079set dummy pkg-config; ac_word=$2
24080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24081$as_echo_n "checking for $ac_word... " >&6; }
24082if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24083  $as_echo_n "(cached) " >&6
24084else
24085  case $ac_pt_PKG_CONFIG in
24086  [\\/]* | ?:[\\/]*)
24087  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24088  ;;
24089  *)
24090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24091for as_dir in $PATH
24092do
24093  IFS=$as_save_IFS
24094  test -z "$as_dir" && as_dir=.
24095    for ac_exec_ext in '' $ac_executable_extensions; do
24096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24097    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24099    break 2
24100  fi
24101done
24102  done
24103IFS=$as_save_IFS
24104
24105  ;;
24106esac
24107fi
24108ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24109if test -n "$ac_pt_PKG_CONFIG"; then
24110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24111$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24112else
24113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24114$as_echo "no" >&6; }
24115fi
24116
24117  if test "x$ac_pt_PKG_CONFIG" = x; then
24118    PKG_CONFIG=""
24119  else
24120    case $cross_compiling:$ac_tool_warned in
24121yes:)
24122{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24123$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24124ac_tool_warned=yes ;;
24125esac
24126    PKG_CONFIG=$ac_pt_PKG_CONFIG
24127  fi
24128else
24129  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24130fi
24131
24132fi
24133if test -n "$PKG_CONFIG"; then
24134	_pkg_min_version=0.9.0
24135	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24136$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24137	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24138		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24139$as_echo "yes" >&6; }
24140	else
24141		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24142$as_echo "no" >&6; }
24143		PKG_CONFIG=""
24144	fi
24145
24146fi
24147
24148# After basic tools have been setup, we can check build os specific details.
24149
24150  ###############################################################################
24151
24152  # Note that this is the build platform OS version!
24153
24154  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24155  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24156  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24157  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24158
24159
24160
24161
24162
24163# Misc basic settings
24164
24165
24166# Check whether --with-default-make-target was given.
24167if test "${with_default_make_target+set}" = set; then :
24168  withval=$with_default_make_target;
24169fi
24170
24171  if test "x$with_default_make_target" = "x" \
24172      || test "x$with_default_make_target" = "xyes"; then
24173    DEFAULT_MAKE_TARGET="exploded-image"
24174  elif test "x$with_default_make_target" = "xno"; then
24175    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24176  else
24177    DEFAULT_MAKE_TARGET="$with_default_make_target"
24178  fi
24179
24180
24181
24182
24183###############################################################################
24184#
24185# Determine OpenJDK variants, options and version numbers.
24186#
24187###############################################################################
24188
24189# We need build & target for this.
24190
24191  # Should we build a JDK without a graphical UI?
24192  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24193$as_echo_n "checking headless only... " >&6; }
24194  # Check whether --enable-headless-only was given.
24195if test "${enable_headless_only+set}" = set; then :
24196  enableval=$enable_headless_only;
24197fi
24198
24199
24200  if test "x$enable_headless_only" = "xyes"; then
24201    ENABLE_HEADLESS_ONLY="true"
24202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24203$as_echo "yes" >&6; }
24204  elif test "x$enable_headless_only" = "xno"; then
24205    ENABLE_HEADLESS_ONLY="false"
24206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24207$as_echo "no" >&6; }
24208  elif test "x$enable_headless_only" = "x"; then
24209    ENABLE_HEADLESS_ONLY="false"
24210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24211$as_echo "no" >&6; }
24212  else
24213    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24214  fi
24215
24216
24217
24218  # Choose cacerts source file
24219
24220# Check whether --with-cacerts-file was given.
24221if test "${with_cacerts_file+set}" = set; then :
24222  withval=$with_cacerts_file;
24223fi
24224
24225  if test "x$with_cacerts_file" != x; then
24226    CACERTS_FILE=$with_cacerts_file
24227  fi
24228
24229
24230  # Enable or disable unlimited crypto
24231  # Check whether --enable-unlimited-crypto was given.
24232if test "${enable_unlimited_crypto+set}" = set; then :
24233  enableval=$enable_unlimited_crypto;
24234else
24235  enable_unlimited_crypto=no
24236fi
24237
24238  if test "x$enable_unlimited_crypto" = "xyes"; then
24239    UNLIMITED_CRYPTO=true
24240  else
24241    UNLIMITED_CRYPTO=false
24242  fi
24243
24244
24245  # Should we build the serviceability agent (SA)?
24246  INCLUDE_SA=true
24247  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24248    INCLUDE_SA=false
24249  fi
24250  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24251    INCLUDE_SA=false
24252  fi
24253
24254
24255  # Compress jars
24256  COMPRESS_JARS=false
24257
24258
24259
24260  # Setup default copyright year. Mostly overridden when building close to a new year.
24261
24262# Check whether --with-copyright-year was given.
24263if test "${with_copyright_year+set}" = set; then :
24264  withval=$with_copyright_year;
24265fi
24266
24267  if test "x$with_copyright_year" = xyes; then
24268    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24269  elif test "x$with_copyright_year" != x; then
24270    COPYRIGHT_YEAR="$with_copyright_year"
24271  else
24272    COPYRIGHT_YEAR=`$DATE +'%Y'`
24273  fi
24274
24275
24276
24277  # Check whether --enable-keep-packaged-modules was given.
24278if test "${enable_keep_packaged_modules+set}" = set; then :
24279  enableval=$enable_keep_packaged_modules;
24280fi
24281
24282
24283  if test "x$enable_keep_packaged_modules" = "xyes"; then
24284    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24285$as_echo_n "checking if packaged modules are kept... " >&6; }
24286    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24287$as_echo "yes" >&6; }
24288    JLINK_KEEP_PACKAGED_MODULES=true
24289  elif test "x$enable_keep_packaged_modules" = "xno"; then
24290    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24291$as_echo_n "checking if packaged modules are kept... " >&6; }
24292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24293$as_echo "no" >&6; }
24294    JLINK_KEEP_PACKAGED_MODULES=false
24295  elif test "x$enable_keep_packaged_modules" = "x"; then
24296    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24297$as_echo "yes (default)" >&6; }
24298    JLINK_KEEP_PACKAGED_MODULES=true
24299  else
24300    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24301  fi
24302
24303
24304
24305
24306  # Warn user that old version arguments are deprecated.
24307
24308
24309# Check whether --with-milestone was given.
24310if test "${with_milestone+set}" = set; then :
24311  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24312$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24313fi
24314
24315
24316
24317
24318# Check whether --with-update-version was given.
24319if test "${with_update_version+set}" = set; then :
24320  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24321$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24322fi
24323
24324
24325
24326
24327# Check whether --with-user-release-suffix was given.
24328if test "${with_user_release_suffix+set}" = set; then :
24329  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
24330$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24331fi
24332
24333
24334
24335
24336# Check whether --with-build-number was given.
24337if test "${with_build_number+set}" = set; then :
24338  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24339$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24340fi
24341
24342
24343
24344  # Source the version numbers file
24345  . $AUTOCONF_DIR/version-numbers
24346
24347  # Some non-version number information is set in that file
24348
24349
24350
24351
24352
24353
24354
24355
24356
24357  # Override version from arguments
24358
24359  # If --with-version-string is set, process it first. It is possible to
24360  # override parts with more specific flags, since these are processed later.
24361
24362# Check whether --with-version-string was given.
24363if test "${with_version_string+set}" = set; then :
24364  withval=$with_version_string;
24365fi
24366
24367  if test "x$with_version_string" = xyes; then
24368    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24369  elif test "x$with_version_string" != x; then
24370    # Additional [] needed to keep m4 from mangling shell constructs.
24371    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24372      VERSION_MAJOR=${BASH_REMATCH[1]}
24373      VERSION_MINOR=${BASH_REMATCH[3]}
24374      VERSION_SECURITY=${BASH_REMATCH[5]}
24375      VERSION_PATCH=${BASH_REMATCH[7]}
24376      VERSION_PRE=${BASH_REMATCH[9]}
24377      version_plus_separator=${BASH_REMATCH[11]}
24378      VERSION_BUILD=${BASH_REMATCH[12]}
24379      VERSION_OPT=${BASH_REMATCH[14]}
24380      # Unspecified numerical fields are interpreted as 0.
24381      if test "x$VERSION_MINOR" = x; then
24382        VERSION_MINOR=0
24383      fi
24384      if test "x$VERSION_SECURITY" = x; then
24385        VERSION_SECURITY=0
24386      fi
24387      if test "x$VERSION_PATCH" = x; then
24388        VERSION_PATCH=0
24389      fi
24390      if test "x$version_plus_separator" != x \
24391          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24392        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24393      fi
24394      # Stop the version part process from setting default values.
24395      # We still allow them to explicitely override though.
24396      NO_DEFAULT_VERSION_PARTS=true
24397    else
24398      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24399    fi
24400  fi
24401
24402
24403# Check whether --with-version-pre was given.
24404if test "${with_version_pre+set}" = set; then :
24405  withval=$with_version_pre; with_version_pre_present=true
24406else
24407  with_version_pre_present=false
24408fi
24409
24410
24411  if test "x$with_version_pre_present" = xtrue; then
24412    if test "x$with_version_pre" = xyes; then
24413      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24414    elif test "x$with_version_pre" = xno; then
24415      # Interpret --without-* as empty string instead of the literal "no"
24416      VERSION_PRE=
24417    else
24418      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24419       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24420      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24422$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24423      fi
24424    fi
24425  else
24426    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24427      # Default is to use "internal" as pre
24428      VERSION_PRE="internal"
24429    fi
24430  fi
24431
24432
24433# Check whether --with-version-opt was given.
24434if test "${with_version_opt+set}" = set; then :
24435  withval=$with_version_opt; with_version_opt_present=true
24436else
24437  with_version_opt_present=false
24438fi
24439
24440
24441  if test "x$with_version_opt_present" = xtrue; then
24442    if test "x$with_version_opt" = xyes; then
24443      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24444    elif test "x$with_version_opt" = xno; then
24445      # Interpret --without-* as empty string instead of the literal "no"
24446      VERSION_OPT=
24447    else
24448      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24449       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24450      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24451        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24452$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24453      fi
24454    fi
24455  else
24456    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24457      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24458      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24459      # Outer [ ] to quote m4.
24460       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24461      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24462    fi
24463  fi
24464
24465
24466# Check whether --with-version-build was given.
24467if test "${with_version_build+set}" = set; then :
24468  withval=$with_version_build; with_version_build_present=true
24469else
24470  with_version_build_present=false
24471fi
24472
24473
24474  if test "x$with_version_build_present" = xtrue; then
24475    if test "x$with_version_build" = xyes; then
24476      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24477    elif test "x$with_version_build" = xno; then
24478      # Interpret --without-* as empty string instead of the literal "no"
24479      VERSION_BUILD=
24480    elif test "x$with_version_build" = x; then
24481      VERSION_BUILD=
24482    else
24483
24484  # Additional [] needed to keep m4 from mangling shell constructs.
24485  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24486    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24487  fi
24488  # Extract the version number without leading zeros.
24489  cleaned_value=${BASH_REMATCH[1]}
24490  if test "x$cleaned_value" = x; then
24491    # Special case for zero
24492    cleaned_value=${BASH_REMATCH[2]}
24493  fi
24494
24495  if test $cleaned_value -gt 255; then
24496    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24497  fi
24498  if test "x$cleaned_value" != "x$with_version_build"; then
24499    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24500$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24501  fi
24502  VERSION_BUILD=$cleaned_value
24503
24504    fi
24505  else
24506    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24507      # Default is to not have a build number.
24508      VERSION_BUILD=""
24509      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24510      VERSION_BUILD=0
24511    fi
24512  fi
24513
24514
24515# Check whether --with-version-major was given.
24516if test "${with_version_major+set}" = set; then :
24517  withval=$with_version_major; with_version_major_present=true
24518else
24519  with_version_major_present=false
24520fi
24521
24522
24523  if test "x$with_version_major_present" = xtrue; then
24524    if test "x$with_version_major" = xyes; then
24525      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24526    else
24527
24528  # Additional [] needed to keep m4 from mangling shell constructs.
24529  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24530    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24531  fi
24532  # Extract the version number without leading zeros.
24533  cleaned_value=${BASH_REMATCH[1]}
24534  if test "x$cleaned_value" = x; then
24535    # Special case for zero
24536    cleaned_value=${BASH_REMATCH[2]}
24537  fi
24538
24539  if test $cleaned_value -gt 255; then
24540    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24541  fi
24542  if test "x$cleaned_value" != "x$with_version_major"; then
24543    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24544$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24545  fi
24546  VERSION_MAJOR=$cleaned_value
24547
24548    fi
24549  else
24550    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24551      # Default is to get value from version-numbers
24552      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24553    fi
24554  fi
24555
24556
24557# Check whether --with-version-minor was given.
24558if test "${with_version_minor+set}" = set; then :
24559  withval=$with_version_minor; with_version_minor_present=true
24560else
24561  with_version_minor_present=false
24562fi
24563
24564
24565  if test "x$with_version_minor_present" = xtrue; then
24566    if test "x$with_version_minor" = xyes; then
24567      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24568    elif test "x$with_version_minor" = xno; then
24569      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24570      VERSION_MINOR=0
24571    elif test "x$with_version_minor" = x; then
24572      VERSION_MINOR=0
24573    else
24574
24575  # Additional [] needed to keep m4 from mangling shell constructs.
24576  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24577    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24578  fi
24579  # Extract the version number without leading zeros.
24580  cleaned_value=${BASH_REMATCH[1]}
24581  if test "x$cleaned_value" = x; then
24582    # Special case for zero
24583    cleaned_value=${BASH_REMATCH[2]}
24584  fi
24585
24586  if test $cleaned_value -gt 255; then
24587    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24588  fi
24589  if test "x$cleaned_value" != "x$with_version_minor"; then
24590    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24591$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24592  fi
24593  VERSION_MINOR=$cleaned_value
24594
24595    fi
24596  else
24597    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24598      # Default is 0, if unspecified
24599      VERSION_MINOR=0
24600    fi
24601  fi
24602
24603
24604# Check whether --with-version-security was given.
24605if test "${with_version_security+set}" = set; then :
24606  withval=$with_version_security; with_version_security_present=true
24607else
24608  with_version_security_present=false
24609fi
24610
24611
24612  if test "x$with_version_security_present" = xtrue; then
24613    if test "x$with_version_security" = xyes; then
24614      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24615    elif test "x$with_version_security" = xno; then
24616      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24617      VERSION_SECURITY=0
24618    elif test "x$with_version_security" = x; then
24619      VERSION_SECURITY=0
24620    else
24621
24622  # Additional [] needed to keep m4 from mangling shell constructs.
24623  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24624    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24625  fi
24626  # Extract the version number without leading zeros.
24627  cleaned_value=${BASH_REMATCH[1]}
24628  if test "x$cleaned_value" = x; then
24629    # Special case for zero
24630    cleaned_value=${BASH_REMATCH[2]}
24631  fi
24632
24633  if test $cleaned_value -gt 255; then
24634    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24635  fi
24636  if test "x$cleaned_value" != "x$with_version_security"; then
24637    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24638$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24639  fi
24640  VERSION_SECURITY=$cleaned_value
24641
24642    fi
24643  else
24644    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24645      # Default is 0, if unspecified
24646      VERSION_SECURITY=0
24647    fi
24648  fi
24649
24650
24651# Check whether --with-version-patch was given.
24652if test "${with_version_patch+set}" = set; then :
24653  withval=$with_version_patch; with_version_patch_present=true
24654else
24655  with_version_patch_present=false
24656fi
24657
24658
24659  if test "x$with_version_patch_present" = xtrue; then
24660    if test "x$with_version_patch" = xyes; then
24661      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24662    elif test "x$with_version_patch" = xno; then
24663      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24664      VERSION_PATCH=0
24665    elif test "x$with_version_patch" = x; then
24666      VERSION_PATCH=0
24667    else
24668
24669  # Additional [] needed to keep m4 from mangling shell constructs.
24670  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24671    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24672  fi
24673  # Extract the version number without leading zeros.
24674  cleaned_value=${BASH_REMATCH[1]}
24675  if test "x$cleaned_value" = x; then
24676    # Special case for zero
24677    cleaned_value=${BASH_REMATCH[2]}
24678  fi
24679
24680  if test $cleaned_value -gt 255; then
24681    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24682  fi
24683  if test "x$cleaned_value" != "x$with_version_patch"; then
24684    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24685$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24686  fi
24687  VERSION_PATCH=$cleaned_value
24688
24689    fi
24690  else
24691    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24692      # Default is 0, if unspecified
24693      VERSION_PATCH=0
24694    fi
24695  fi
24696
24697  # Calculate derived version properties
24698
24699  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24700  if test "x$VERSION_PRE" = x; then
24701    VERSION_IS_GA=true
24702  else
24703    VERSION_IS_GA=false
24704  fi
24705
24706  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24707  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24708
24709  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24710  # Strip trailing zeroes from stripped_version_number
24711  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24712  VERSION_NUMBER=$stripped_version_number
24713
24714  # The complete version string, with additional build information
24715  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24716    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24717  else
24718    # If either build or opt is set, we need a + separator
24719    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24720  fi
24721
24722  # The short version string, just VERSION_NUMBER and PRE, if present.
24723  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24724
24725  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24726$as_echo_n "checking for version string... " >&6; }
24727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24728$as_echo "$VERSION_STRING" >&6; }
24729
24730
24731
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744###############################################################################
24745#
24746# Setup BootJDK, used to bootstrap the build.
24747#
24748###############################################################################
24749
24750
24751  BOOT_JDK_FOUND=no
24752
24753# Check whether --with-boot-jdk was given.
24754if test "${with_boot_jdk+set}" = set; then :
24755  withval=$with_boot_jdk;
24756fi
24757
24758
24759  # We look for the Boot JDK through various means, going from more certain to
24760  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24761  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24762  # must check if this is indeed valid; otherwise we'll continue looking.
24763
24764  # Test: Is bootjdk explicitely set by command line arguments?
24765
24766  if test "x$BOOT_JDK_FOUND" = xno; then
24767    # Now execute the test
24768
24769  if test "x$with_boot_jdk" != x; then
24770    BOOT_JDK=$with_boot_jdk
24771    BOOT_JDK_FOUND=maybe
24772    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24773$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24774  fi
24775
24776
24777    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24778    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24779      # Do we have a bin/java?
24780      if test ! -x "$BOOT_JDK/bin/java"; then
24781        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24782$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24783        BOOT_JDK_FOUND=no
24784      else
24785        # Do we have a bin/javac?
24786        if test ! -x "$BOOT_JDK/bin/javac"; then
24787          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24789          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24790$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24791          BOOT_JDK_FOUND=no
24792        else
24793          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24794          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24795
24796          # Extra M4 quote needed to protect [] in grep expression.
24797          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24798          if test "x$FOUND_CORRECT_VERSION" = x; then
24799            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24801            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24802$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24803            BOOT_JDK_FOUND=no
24804          else
24805            # We're done! :-)
24806            BOOT_JDK_FOUND=yes
24807
24808  # Only process if variable expands to non-empty
24809
24810  if test "x$BOOT_JDK" != x; then
24811    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24812
24813  # Input might be given as Windows format, start by converting to
24814  # unix format.
24815  path="$BOOT_JDK"
24816  new_path=`$CYGPATH -u "$path"`
24817
24818  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24819  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24820  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24821  # "foo.exe" is OK but "foo" is an error.
24822  #
24823  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24824  # It is also a way to make sure we got the proper file name for the real test later on.
24825  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24826  if test "x$test_shortpath" = x; then
24827    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24828$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24829    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24830  fi
24831
24832  # Call helper function which possibly converts this using DOS-style short mode.
24833  # If so, the updated path is stored in $new_path.
24834
24835  input_path="$new_path"
24836  # Check if we need to convert this using DOS-style short mode. If the path
24837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24838  # take no chances and rewrite it.
24839  # Note: m4 eats our [], so we need to use [ and ] instead.
24840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24841  if test "x$has_forbidden_chars" != x; then
24842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24843    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24844    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24845    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24846      # Going to short mode and back again did indeed matter. Since short mode is
24847      # case insensitive, let's make it lowercase to improve readability.
24848      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24849      # Now convert it back to Unix-style (cygpath)
24850      input_path=`$CYGPATH -u "$shortmode_path"`
24851      new_path="$input_path"
24852    fi
24853  fi
24854
24855  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24856  if test "x$test_cygdrive_prefix" = x; then
24857    # As a simple fix, exclude /usr/bin since it's not a real path.
24858    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24859      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24860      # a path prefixed by /cygdrive for fixpath to work.
24861      new_path="$CYGWIN_ROOT_PATH$input_path"
24862    fi
24863  fi
24864
24865
24866  if test "x$path" != "x$new_path"; then
24867    BOOT_JDK="$new_path"
24868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24869$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24870  fi
24871
24872    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24873
24874  path="$BOOT_JDK"
24875  has_colon=`$ECHO $path | $GREP ^.:`
24876  new_path="$path"
24877  if test "x$has_colon" = x; then
24878    # Not in mixed or Windows style, start by that.
24879    new_path=`cmd //c echo $path`
24880  fi
24881
24882
24883  input_path="$new_path"
24884  # Check if we need to convert this using DOS-style short mode. If the path
24885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24886  # take no chances and rewrite it.
24887  # Note: m4 eats our [], so we need to use [ and ] instead.
24888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24889  if test "x$has_forbidden_chars" != x; then
24890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24891    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24892  fi
24893
24894
24895  windows_path="$new_path"
24896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24897    unix_path=`$CYGPATH -u "$windows_path"`
24898    new_path="$unix_path"
24899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24901    new_path="$unix_path"
24902  fi
24903
24904  if test "x$path" != "x$new_path"; then
24905    BOOT_JDK="$new_path"
24906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24907$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24908  fi
24909
24910  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24911  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24912
24913    else
24914      # We're on a unix platform. Hooray! :)
24915      path="$BOOT_JDK"
24916      has_space=`$ECHO "$path" | $GREP " "`
24917      if test "x$has_space" != x; then
24918        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24919$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24920        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24921      fi
24922
24923      # Use eval to expand a potential ~
24924      eval path="$path"
24925      if test ! -f "$path" && test ! -d "$path"; then
24926        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24927      fi
24928
24929      if test -d "$path"; then
24930        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24931      else
24932        dir="`$DIRNAME "$path"`"
24933        base="`$BASENAME "$path"`"
24934        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24935      fi
24936    fi
24937  fi
24938
24939            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24940$as_echo_n "checking for Boot JDK... " >&6; }
24941            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24942$as_echo "$BOOT_JDK" >&6; }
24943            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24944$as_echo_n "checking Boot JDK version... " >&6; }
24945            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24946            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24947$as_echo "$BOOT_JDK_VERSION" >&6; }
24948          fi # end check jdk version
24949        fi # end check javac
24950      fi # end check java
24951    fi # end check boot jdk found
24952  fi
24953
24954  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24955    # Having specified an argument which is incorrect will produce an instant failure;
24956    # we should not go on looking
24957    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24958  fi
24959
24960  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24961
24962  if test "x$BOOT_JDK_FOUND" = xno; then
24963    # Now execute the test
24964
24965  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24966    # First check at user selected default
24967
24968  if test "x$BOOT_JDK_FOUND" = xno; then
24969    # Now execute the test
24970
24971  if test -x /usr/libexec/java_home; then
24972    BOOT_JDK=`/usr/libexec/java_home `
24973    BOOT_JDK_FOUND=maybe
24974    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24975$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24976  fi
24977
24978
24979    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24980    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24981      # Do we have a bin/java?
24982      if test ! -x "$BOOT_JDK/bin/java"; then
24983        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24984$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24985        BOOT_JDK_FOUND=no
24986      else
24987        # Do we have a bin/javac?
24988        if test ! -x "$BOOT_JDK/bin/javac"; then
24989          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24991          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24992$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24993          BOOT_JDK_FOUND=no
24994        else
24995          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24996          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24997
24998          # Extra M4 quote needed to protect [] in grep expression.
24999          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25000          if test "x$FOUND_CORRECT_VERSION" = x; then
25001            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25003            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25004$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25005            BOOT_JDK_FOUND=no
25006          else
25007            # We're done! :-)
25008            BOOT_JDK_FOUND=yes
25009
25010  # Only process if variable expands to non-empty
25011
25012  if test "x$BOOT_JDK" != x; then
25013    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25014
25015  # Input might be given as Windows format, start by converting to
25016  # unix format.
25017  path="$BOOT_JDK"
25018  new_path=`$CYGPATH -u "$path"`
25019
25020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25023  # "foo.exe" is OK but "foo" is an error.
25024  #
25025  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25026  # It is also a way to make sure we got the proper file name for the real test later on.
25027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25028  if test "x$test_shortpath" = x; then
25029    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25030$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25031    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25032  fi
25033
25034  # Call helper function which possibly converts this using DOS-style short mode.
25035  # If so, the updated path is stored in $new_path.
25036
25037  input_path="$new_path"
25038  # Check if we need to convert this using DOS-style short mode. If the path
25039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25040  # take no chances and rewrite it.
25041  # Note: m4 eats our [], so we need to use [ and ] instead.
25042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25043  if test "x$has_forbidden_chars" != x; then
25044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25045    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25046    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25047    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25048      # Going to short mode and back again did indeed matter. Since short mode is
25049      # case insensitive, let's make it lowercase to improve readability.
25050      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25051      # Now convert it back to Unix-style (cygpath)
25052      input_path=`$CYGPATH -u "$shortmode_path"`
25053      new_path="$input_path"
25054    fi
25055  fi
25056
25057  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25058  if test "x$test_cygdrive_prefix" = x; then
25059    # As a simple fix, exclude /usr/bin since it's not a real path.
25060    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25061      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25062      # a path prefixed by /cygdrive for fixpath to work.
25063      new_path="$CYGWIN_ROOT_PATH$input_path"
25064    fi
25065  fi
25066
25067
25068  if test "x$path" != "x$new_path"; then
25069    BOOT_JDK="$new_path"
25070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25071$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25072  fi
25073
25074    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25075
25076  path="$BOOT_JDK"
25077  has_colon=`$ECHO $path | $GREP ^.:`
25078  new_path="$path"
25079  if test "x$has_colon" = x; then
25080    # Not in mixed or Windows style, start by that.
25081    new_path=`cmd //c echo $path`
25082  fi
25083
25084
25085  input_path="$new_path"
25086  # Check if we need to convert this using DOS-style short mode. If the path
25087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25088  # take no chances and rewrite it.
25089  # Note: m4 eats our [], so we need to use [ and ] instead.
25090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25091  if test "x$has_forbidden_chars" != x; then
25092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25093    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25094  fi
25095
25096
25097  windows_path="$new_path"
25098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25099    unix_path=`$CYGPATH -u "$windows_path"`
25100    new_path="$unix_path"
25101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25103    new_path="$unix_path"
25104  fi
25105
25106  if test "x$path" != "x$new_path"; then
25107    BOOT_JDK="$new_path"
25108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25109$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25110  fi
25111
25112  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25113  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25114
25115    else
25116      # We're on a unix platform. Hooray! :)
25117      path="$BOOT_JDK"
25118      has_space=`$ECHO "$path" | $GREP " "`
25119      if test "x$has_space" != x; then
25120        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25121$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25122        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25123      fi
25124
25125      # Use eval to expand a potential ~
25126      eval path="$path"
25127      if test ! -f "$path" && test ! -d "$path"; then
25128        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25129      fi
25130
25131      if test -d "$path"; then
25132        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25133      else
25134        dir="`$DIRNAME "$path"`"
25135        base="`$BASENAME "$path"`"
25136        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25137      fi
25138    fi
25139  fi
25140
25141            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25142$as_echo_n "checking for Boot JDK... " >&6; }
25143            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25144$as_echo "$BOOT_JDK" >&6; }
25145            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25146$as_echo_n "checking Boot JDK version... " >&6; }
25147            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25148            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25149$as_echo "$BOOT_JDK_VERSION" >&6; }
25150          fi # end check jdk version
25151        fi # end check javac
25152      fi # end check java
25153    fi # end check boot jdk found
25154  fi
25155
25156    # If that did not work out (e.g. too old), try explicit versions instead
25157
25158  if test "x$BOOT_JDK_FOUND" = xno; then
25159    # Now execute the test
25160
25161  if test -x /usr/libexec/java_home; then
25162    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25163    BOOT_JDK_FOUND=maybe
25164    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25165$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25166  fi
25167
25168
25169    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25170    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25171      # Do we have a bin/java?
25172      if test ! -x "$BOOT_JDK/bin/java"; then
25173        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25174$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25175        BOOT_JDK_FOUND=no
25176      else
25177        # Do we have a bin/javac?
25178        if test ! -x "$BOOT_JDK/bin/javac"; then
25179          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25180$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25181          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25182$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25183          BOOT_JDK_FOUND=no
25184        else
25185          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25186          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25187
25188          # Extra M4 quote needed to protect [] in grep expression.
25189          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25190          if test "x$FOUND_CORRECT_VERSION" = x; then
25191            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25193            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25194$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25195            BOOT_JDK_FOUND=no
25196          else
25197            # We're done! :-)
25198            BOOT_JDK_FOUND=yes
25199
25200  # Only process if variable expands to non-empty
25201
25202  if test "x$BOOT_JDK" != x; then
25203    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25204
25205  # Input might be given as Windows format, start by converting to
25206  # unix format.
25207  path="$BOOT_JDK"
25208  new_path=`$CYGPATH -u "$path"`
25209
25210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25213  # "foo.exe" is OK but "foo" is an error.
25214  #
25215  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25216  # It is also a way to make sure we got the proper file name for the real test later on.
25217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25218  if test "x$test_shortpath" = x; then
25219    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25220$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25221    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25222  fi
25223
25224  # Call helper function which possibly converts this using DOS-style short mode.
25225  # If so, the updated path is stored in $new_path.
25226
25227  input_path="$new_path"
25228  # Check if we need to convert this using DOS-style short mode. If the path
25229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25230  # take no chances and rewrite it.
25231  # Note: m4 eats our [], so we need to use [ and ] instead.
25232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25233  if test "x$has_forbidden_chars" != x; then
25234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25238      # Going to short mode and back again did indeed matter. Since short mode is
25239      # case insensitive, let's make it lowercase to improve readability.
25240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25241      # Now convert it back to Unix-style (cygpath)
25242      input_path=`$CYGPATH -u "$shortmode_path"`
25243      new_path="$input_path"
25244    fi
25245  fi
25246
25247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25248  if test "x$test_cygdrive_prefix" = x; then
25249    # As a simple fix, exclude /usr/bin since it's not a real path.
25250    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25252      # a path prefixed by /cygdrive for fixpath to work.
25253      new_path="$CYGWIN_ROOT_PATH$input_path"
25254    fi
25255  fi
25256
25257
25258  if test "x$path" != "x$new_path"; then
25259    BOOT_JDK="$new_path"
25260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25261$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25262  fi
25263
25264    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25265
25266  path="$BOOT_JDK"
25267  has_colon=`$ECHO $path | $GREP ^.:`
25268  new_path="$path"
25269  if test "x$has_colon" = x; then
25270    # Not in mixed or Windows style, start by that.
25271    new_path=`cmd //c echo $path`
25272  fi
25273
25274
25275  input_path="$new_path"
25276  # Check if we need to convert this using DOS-style short mode. If the path
25277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25278  # take no chances and rewrite it.
25279  # Note: m4 eats our [], so we need to use [ and ] instead.
25280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25281  if test "x$has_forbidden_chars" != x; then
25282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25284  fi
25285
25286
25287  windows_path="$new_path"
25288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25289    unix_path=`$CYGPATH -u "$windows_path"`
25290    new_path="$unix_path"
25291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25293    new_path="$unix_path"
25294  fi
25295
25296  if test "x$path" != "x$new_path"; then
25297    BOOT_JDK="$new_path"
25298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25299$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25300  fi
25301
25302  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25303  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25304
25305    else
25306      # We're on a unix platform. Hooray! :)
25307      path="$BOOT_JDK"
25308      has_space=`$ECHO "$path" | $GREP " "`
25309      if test "x$has_space" != x; then
25310        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25311$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25312        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25313      fi
25314
25315      # Use eval to expand a potential ~
25316      eval path="$path"
25317      if test ! -f "$path" && test ! -d "$path"; then
25318        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25319      fi
25320
25321      if test -d "$path"; then
25322        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25323      else
25324        dir="`$DIRNAME "$path"`"
25325        base="`$BASENAME "$path"`"
25326        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25327      fi
25328    fi
25329  fi
25330
25331            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25332$as_echo_n "checking for Boot JDK... " >&6; }
25333            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25334$as_echo "$BOOT_JDK" >&6; }
25335            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25336$as_echo_n "checking Boot JDK version... " >&6; }
25337            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25338            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25339$as_echo "$BOOT_JDK_VERSION" >&6; }
25340          fi # end check jdk version
25341        fi # end check javac
25342      fi # end check java
25343    fi # end check boot jdk found
25344  fi
25345
25346
25347  if test "x$BOOT_JDK_FOUND" = xno; then
25348    # Now execute the test
25349
25350  if test -x /usr/libexec/java_home; then
25351    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25352    BOOT_JDK_FOUND=maybe
25353    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25354$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25355  fi
25356
25357
25358    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25359    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25360      # Do we have a bin/java?
25361      if test ! -x "$BOOT_JDK/bin/java"; then
25362        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25363$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25364        BOOT_JDK_FOUND=no
25365      else
25366        # Do we have a bin/javac?
25367        if test ! -x "$BOOT_JDK/bin/javac"; then
25368          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25369$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25370          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25371$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25372          BOOT_JDK_FOUND=no
25373        else
25374          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25375          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25376
25377          # Extra M4 quote needed to protect [] in grep expression.
25378          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25379          if test "x$FOUND_CORRECT_VERSION" = x; then
25380            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25381$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25382            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25383$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25384            BOOT_JDK_FOUND=no
25385          else
25386            # We're done! :-)
25387            BOOT_JDK_FOUND=yes
25388
25389  # Only process if variable expands to non-empty
25390
25391  if test "x$BOOT_JDK" != x; then
25392    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25393
25394  # Input might be given as Windows format, start by converting to
25395  # unix format.
25396  path="$BOOT_JDK"
25397  new_path=`$CYGPATH -u "$path"`
25398
25399  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25400  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25401  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25402  # "foo.exe" is OK but "foo" is an error.
25403  #
25404  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25405  # It is also a way to make sure we got the proper file name for the real test later on.
25406  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25407  if test "x$test_shortpath" = x; then
25408    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25409$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25410    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25411  fi
25412
25413  # Call helper function which possibly converts this using DOS-style short mode.
25414  # If so, the updated path is stored in $new_path.
25415
25416  input_path="$new_path"
25417  # Check if we need to convert this using DOS-style short mode. If the path
25418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25419  # take no chances and rewrite it.
25420  # Note: m4 eats our [], so we need to use [ and ] instead.
25421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25422  if test "x$has_forbidden_chars" != x; then
25423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25424    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25425    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25426    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25427      # Going to short mode and back again did indeed matter. Since short mode is
25428      # case insensitive, let's make it lowercase to improve readability.
25429      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25430      # Now convert it back to Unix-style (cygpath)
25431      input_path=`$CYGPATH -u "$shortmode_path"`
25432      new_path="$input_path"
25433    fi
25434  fi
25435
25436  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25437  if test "x$test_cygdrive_prefix" = x; then
25438    # As a simple fix, exclude /usr/bin since it's not a real path.
25439    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25440      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25441      # a path prefixed by /cygdrive for fixpath to work.
25442      new_path="$CYGWIN_ROOT_PATH$input_path"
25443    fi
25444  fi
25445
25446
25447  if test "x$path" != "x$new_path"; then
25448    BOOT_JDK="$new_path"
25449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25450$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25451  fi
25452
25453    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25454
25455  path="$BOOT_JDK"
25456  has_colon=`$ECHO $path | $GREP ^.:`
25457  new_path="$path"
25458  if test "x$has_colon" = x; then
25459    # Not in mixed or Windows style, start by that.
25460    new_path=`cmd //c echo $path`
25461  fi
25462
25463
25464  input_path="$new_path"
25465  # Check if we need to convert this using DOS-style short mode. If the path
25466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25467  # take no chances and rewrite it.
25468  # Note: m4 eats our [], so we need to use [ and ] instead.
25469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25470  if test "x$has_forbidden_chars" != x; then
25471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25472    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25473  fi
25474
25475
25476  windows_path="$new_path"
25477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25478    unix_path=`$CYGPATH -u "$windows_path"`
25479    new_path="$unix_path"
25480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25482    new_path="$unix_path"
25483  fi
25484
25485  if test "x$path" != "x$new_path"; then
25486    BOOT_JDK="$new_path"
25487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25488$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25489  fi
25490
25491  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25492  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25493
25494    else
25495      # We're on a unix platform. Hooray! :)
25496      path="$BOOT_JDK"
25497      has_space=`$ECHO "$path" | $GREP " "`
25498      if test "x$has_space" != x; then
25499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25500$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25501        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25502      fi
25503
25504      # Use eval to expand a potential ~
25505      eval path="$path"
25506      if test ! -f "$path" && test ! -d "$path"; then
25507        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25508      fi
25509
25510      if test -d "$path"; then
25511        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25512      else
25513        dir="`$DIRNAME "$path"`"
25514        base="`$BASENAME "$path"`"
25515        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25516      fi
25517    fi
25518  fi
25519
25520            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25521$as_echo_n "checking for Boot JDK... " >&6; }
25522            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25523$as_echo "$BOOT_JDK" >&6; }
25524            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25525$as_echo_n "checking Boot JDK version... " >&6; }
25526            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25527            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25528$as_echo "$BOOT_JDK_VERSION" >&6; }
25529          fi # end check jdk version
25530        fi # end check javac
25531      fi # end check java
25532    fi # end check boot jdk found
25533  fi
25534
25535
25536  if test "x$BOOT_JDK_FOUND" = xno; then
25537    # Now execute the test
25538
25539  if test -x /usr/libexec/java_home; then
25540    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25541    BOOT_JDK_FOUND=maybe
25542    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25543$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25544  fi
25545
25546
25547    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25548    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25549      # Do we have a bin/java?
25550      if test ! -x "$BOOT_JDK/bin/java"; then
25551        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25552$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25553        BOOT_JDK_FOUND=no
25554      else
25555        # Do we have a bin/javac?
25556        if test ! -x "$BOOT_JDK/bin/javac"; then
25557          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25558$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25559          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25560$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25561          BOOT_JDK_FOUND=no
25562        else
25563          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25564          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25565
25566          # Extra M4 quote needed to protect [] in grep expression.
25567          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25568          if test "x$FOUND_CORRECT_VERSION" = x; then
25569            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25571            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25572$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25573            BOOT_JDK_FOUND=no
25574          else
25575            # We're done! :-)
25576            BOOT_JDK_FOUND=yes
25577
25578  # Only process if variable expands to non-empty
25579
25580  if test "x$BOOT_JDK" != x; then
25581    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25582
25583  # Input might be given as Windows format, start by converting to
25584  # unix format.
25585  path="$BOOT_JDK"
25586  new_path=`$CYGPATH -u "$path"`
25587
25588  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25589  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25590  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25591  # "foo.exe" is OK but "foo" is an error.
25592  #
25593  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25594  # It is also a way to make sure we got the proper file name for the real test later on.
25595  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25596  if test "x$test_shortpath" = x; then
25597    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25598$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25599    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25600  fi
25601
25602  # Call helper function which possibly converts this using DOS-style short mode.
25603  # If so, the updated path is stored in $new_path.
25604
25605  input_path="$new_path"
25606  # Check if we need to convert this using DOS-style short mode. If the path
25607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25608  # take no chances and rewrite it.
25609  # Note: m4 eats our [], so we need to use [ and ] instead.
25610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25611  if test "x$has_forbidden_chars" != x; then
25612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25616      # Going to short mode and back again did indeed matter. Since short mode is
25617      # case insensitive, let's make it lowercase to improve readability.
25618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25619      # Now convert it back to Unix-style (cygpath)
25620      input_path=`$CYGPATH -u "$shortmode_path"`
25621      new_path="$input_path"
25622    fi
25623  fi
25624
25625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25626  if test "x$test_cygdrive_prefix" = x; then
25627    # As a simple fix, exclude /usr/bin since it's not a real path.
25628    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25630      # a path prefixed by /cygdrive for fixpath to work.
25631      new_path="$CYGWIN_ROOT_PATH$input_path"
25632    fi
25633  fi
25634
25635
25636  if test "x$path" != "x$new_path"; then
25637    BOOT_JDK="$new_path"
25638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25639$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25640  fi
25641
25642    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25643
25644  path="$BOOT_JDK"
25645  has_colon=`$ECHO $path | $GREP ^.:`
25646  new_path="$path"
25647  if test "x$has_colon" = x; then
25648    # Not in mixed or Windows style, start by that.
25649    new_path=`cmd //c echo $path`
25650  fi
25651
25652
25653  input_path="$new_path"
25654  # Check if we need to convert this using DOS-style short mode. If the path
25655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25656  # take no chances and rewrite it.
25657  # Note: m4 eats our [], so we need to use [ and ] instead.
25658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25659  if test "x$has_forbidden_chars" != x; then
25660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25661    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25662  fi
25663
25664
25665  windows_path="$new_path"
25666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25667    unix_path=`$CYGPATH -u "$windows_path"`
25668    new_path="$unix_path"
25669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25671    new_path="$unix_path"
25672  fi
25673
25674  if test "x$path" != "x$new_path"; then
25675    BOOT_JDK="$new_path"
25676    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25677$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25678  fi
25679
25680  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25681  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25682
25683    else
25684      # We're on a unix platform. Hooray! :)
25685      path="$BOOT_JDK"
25686      has_space=`$ECHO "$path" | $GREP " "`
25687      if test "x$has_space" != x; then
25688        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25689$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25690        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25691      fi
25692
25693      # Use eval to expand a potential ~
25694      eval path="$path"
25695      if test ! -f "$path" && test ! -d "$path"; then
25696        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25697      fi
25698
25699      if test -d "$path"; then
25700        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25701      else
25702        dir="`$DIRNAME "$path"`"
25703        base="`$BASENAME "$path"`"
25704        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25705      fi
25706    fi
25707  fi
25708
25709            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25710$as_echo_n "checking for Boot JDK... " >&6; }
25711            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25712$as_echo "$BOOT_JDK" >&6; }
25713            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25714$as_echo_n "checking Boot JDK version... " >&6; }
25715            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25716            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25717$as_echo "$BOOT_JDK_VERSION" >&6; }
25718          fi # end check jdk version
25719        fi # end check javac
25720      fi # end check java
25721    fi # end check boot jdk found
25722  fi
25723
25724  fi
25725
25726
25727    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25728    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25729      # Do we have a bin/java?
25730      if test ! -x "$BOOT_JDK/bin/java"; then
25731        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25733        BOOT_JDK_FOUND=no
25734      else
25735        # Do we have a bin/javac?
25736        if test ! -x "$BOOT_JDK/bin/javac"; then
25737          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25738$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25739          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25740$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25741          BOOT_JDK_FOUND=no
25742        else
25743          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25744          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25745
25746          # Extra M4 quote needed to protect [] in grep expression.
25747          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25748          if test "x$FOUND_CORRECT_VERSION" = x; then
25749            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25751            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25752$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25753            BOOT_JDK_FOUND=no
25754          else
25755            # We're done! :-)
25756            BOOT_JDK_FOUND=yes
25757
25758  # Only process if variable expands to non-empty
25759
25760  if test "x$BOOT_JDK" != x; then
25761    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25762
25763  # Input might be given as Windows format, start by converting to
25764  # unix format.
25765  path="$BOOT_JDK"
25766  new_path=`$CYGPATH -u "$path"`
25767
25768  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25769  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25770  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25771  # "foo.exe" is OK but "foo" is an error.
25772  #
25773  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25774  # It is also a way to make sure we got the proper file name for the real test later on.
25775  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25776  if test "x$test_shortpath" = x; then
25777    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25778$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25779    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25780  fi
25781
25782  # Call helper function which possibly converts this using DOS-style short mode.
25783  # If so, the updated path is stored in $new_path.
25784
25785  input_path="$new_path"
25786  # Check if we need to convert this using DOS-style short mode. If the path
25787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25788  # take no chances and rewrite it.
25789  # Note: m4 eats our [], so we need to use [ and ] instead.
25790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25791  if test "x$has_forbidden_chars" != x; then
25792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25793    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25794    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25795    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25796      # Going to short mode and back again did indeed matter. Since short mode is
25797      # case insensitive, let's make it lowercase to improve readability.
25798      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25799      # Now convert it back to Unix-style (cygpath)
25800      input_path=`$CYGPATH -u "$shortmode_path"`
25801      new_path="$input_path"
25802    fi
25803  fi
25804
25805  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25806  if test "x$test_cygdrive_prefix" = x; then
25807    # As a simple fix, exclude /usr/bin since it's not a real path.
25808    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25809      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25810      # a path prefixed by /cygdrive for fixpath to work.
25811      new_path="$CYGWIN_ROOT_PATH$input_path"
25812    fi
25813  fi
25814
25815
25816  if test "x$path" != "x$new_path"; then
25817    BOOT_JDK="$new_path"
25818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25819$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25820  fi
25821
25822    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25823
25824  path="$BOOT_JDK"
25825  has_colon=`$ECHO $path | $GREP ^.:`
25826  new_path="$path"
25827  if test "x$has_colon" = x; then
25828    # Not in mixed or Windows style, start by that.
25829    new_path=`cmd //c echo $path`
25830  fi
25831
25832
25833  input_path="$new_path"
25834  # Check if we need to convert this using DOS-style short mode. If the path
25835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25836  # take no chances and rewrite it.
25837  # Note: m4 eats our [], so we need to use [ and ] instead.
25838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25839  if test "x$has_forbidden_chars" != x; then
25840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25842  fi
25843
25844
25845  windows_path="$new_path"
25846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25847    unix_path=`$CYGPATH -u "$windows_path"`
25848    new_path="$unix_path"
25849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25851    new_path="$unix_path"
25852  fi
25853
25854  if test "x$path" != "x$new_path"; then
25855    BOOT_JDK="$new_path"
25856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25857$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25858  fi
25859
25860  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25861  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25862
25863    else
25864      # We're on a unix platform. Hooray! :)
25865      path="$BOOT_JDK"
25866      has_space=`$ECHO "$path" | $GREP " "`
25867      if test "x$has_space" != x; then
25868        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25869$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25870        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25871      fi
25872
25873      # Use eval to expand a potential ~
25874      eval path="$path"
25875      if test ! -f "$path" && test ! -d "$path"; then
25876        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25877      fi
25878
25879      if test -d "$path"; then
25880        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25881      else
25882        dir="`$DIRNAME "$path"`"
25883        base="`$BASENAME "$path"`"
25884        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25885      fi
25886    fi
25887  fi
25888
25889            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25890$as_echo_n "checking for Boot JDK... " >&6; }
25891            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25892$as_echo "$BOOT_JDK" >&6; }
25893            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25894$as_echo_n "checking Boot JDK version... " >&6; }
25895            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25896            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25897$as_echo "$BOOT_JDK_VERSION" >&6; }
25898          fi # end check jdk version
25899        fi # end check javac
25900      fi # end check java
25901    fi # end check boot jdk found
25902  fi
25903
25904
25905  # Test: Is $JAVA_HOME set?
25906
25907  if test "x$BOOT_JDK_FOUND" = xno; then
25908    # Now execute the test
25909
25910  if test "x$JAVA_HOME" != x; then
25911    JAVA_HOME_PROCESSED="$JAVA_HOME"
25912
25913  # Only process if variable expands to non-empty
25914
25915  if test "x$JAVA_HOME_PROCESSED" != x; then
25916    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25917
25918  # Input might be given as Windows format, start by converting to
25919  # unix format.
25920  path="$JAVA_HOME_PROCESSED"
25921  new_path=`$CYGPATH -u "$path"`
25922
25923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25926  # "foo.exe" is OK but "foo" is an error.
25927  #
25928  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25929  # It is also a way to make sure we got the proper file name for the real test later on.
25930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25931  if test "x$test_shortpath" = x; then
25932    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25933$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25934    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25935  fi
25936
25937  # Call helper function which possibly converts this using DOS-style short mode.
25938  # If so, the updated path is stored in $new_path.
25939
25940  input_path="$new_path"
25941  # Check if we need to convert this using DOS-style short mode. If the path
25942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25943  # take no chances and rewrite it.
25944  # Note: m4 eats our [], so we need to use [ and ] instead.
25945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25946  if test "x$has_forbidden_chars" != x; then
25947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25948    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25949    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25950    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25951      # Going to short mode and back again did indeed matter. Since short mode is
25952      # case insensitive, let's make it lowercase to improve readability.
25953      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25954      # Now convert it back to Unix-style (cygpath)
25955      input_path=`$CYGPATH -u "$shortmode_path"`
25956      new_path="$input_path"
25957    fi
25958  fi
25959
25960  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25961  if test "x$test_cygdrive_prefix" = x; then
25962    # As a simple fix, exclude /usr/bin since it's not a real path.
25963    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25964      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25965      # a path prefixed by /cygdrive for fixpath to work.
25966      new_path="$CYGWIN_ROOT_PATH$input_path"
25967    fi
25968  fi
25969
25970
25971  if test "x$path" != "x$new_path"; then
25972    JAVA_HOME_PROCESSED="$new_path"
25973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25974$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25975  fi
25976
25977    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25978
25979  path="$JAVA_HOME_PROCESSED"
25980  has_colon=`$ECHO $path | $GREP ^.:`
25981  new_path="$path"
25982  if test "x$has_colon" = x; then
25983    # Not in mixed or Windows style, start by that.
25984    new_path=`cmd //c echo $path`
25985  fi
25986
25987
25988  input_path="$new_path"
25989  # Check if we need to convert this using DOS-style short mode. If the path
25990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25991  # take no chances and rewrite it.
25992  # Note: m4 eats our [], so we need to use [ and ] instead.
25993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25994  if test "x$has_forbidden_chars" != x; then
25995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25996    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25997  fi
25998
25999
26000  windows_path="$new_path"
26001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26002    unix_path=`$CYGPATH -u "$windows_path"`
26003    new_path="$unix_path"
26004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26006    new_path="$unix_path"
26007  fi
26008
26009  if test "x$path" != "x$new_path"; then
26010    JAVA_HOME_PROCESSED="$new_path"
26011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26012$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26013  fi
26014
26015  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26016  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26017
26018    else
26019      # We're on a unix platform. Hooray! :)
26020      path="$JAVA_HOME_PROCESSED"
26021      has_space=`$ECHO "$path" | $GREP " "`
26022      if test "x$has_space" != x; then
26023        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26024$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26025        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26026      fi
26027
26028      # Use eval to expand a potential ~
26029      eval path="$path"
26030      if test ! -f "$path" && test ! -d "$path"; then
26031        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26032      fi
26033
26034      if test -d "$path"; then
26035        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26036      else
26037        dir="`$DIRNAME "$path"`"
26038        base="`$BASENAME "$path"`"
26039        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26040      fi
26041    fi
26042  fi
26043
26044    if test ! -d "$JAVA_HOME_PROCESSED"; then
26045      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26046$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26047    else
26048      # Aha, the user has set a JAVA_HOME
26049      # let us use that as the Boot JDK.
26050      BOOT_JDK="$JAVA_HOME_PROCESSED"
26051      BOOT_JDK_FOUND=maybe
26052      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26053$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26054    fi
26055  fi
26056
26057
26058    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26059    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26060      # Do we have a bin/java?
26061      if test ! -x "$BOOT_JDK/bin/java"; then
26062        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26063$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26064        BOOT_JDK_FOUND=no
26065      else
26066        # Do we have a bin/javac?
26067        if test ! -x "$BOOT_JDK/bin/javac"; then
26068          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26069$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26070          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26071$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26072          BOOT_JDK_FOUND=no
26073        else
26074          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26075          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26076
26077          # Extra M4 quote needed to protect [] in grep expression.
26078          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26079          if test "x$FOUND_CORRECT_VERSION" = x; then
26080            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26081$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26082            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26083$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26084            BOOT_JDK_FOUND=no
26085          else
26086            # We're done! :-)
26087            BOOT_JDK_FOUND=yes
26088
26089  # Only process if variable expands to non-empty
26090
26091  if test "x$BOOT_JDK" != x; then
26092    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26093
26094  # Input might be given as Windows format, start by converting to
26095  # unix format.
26096  path="$BOOT_JDK"
26097  new_path=`$CYGPATH -u "$path"`
26098
26099  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26100  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26101  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26102  # "foo.exe" is OK but "foo" is an error.
26103  #
26104  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26105  # It is also a way to make sure we got the proper file name for the real test later on.
26106  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26107  if test "x$test_shortpath" = x; then
26108    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26109$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26110    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26111  fi
26112
26113  # Call helper function which possibly converts this using DOS-style short mode.
26114  # If so, the updated path is stored in $new_path.
26115
26116  input_path="$new_path"
26117  # Check if we need to convert this using DOS-style short mode. If the path
26118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26119  # take no chances and rewrite it.
26120  # Note: m4 eats our [], so we need to use [ and ] instead.
26121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26122  if test "x$has_forbidden_chars" != x; then
26123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26124    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26125    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26126    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26127      # Going to short mode and back again did indeed matter. Since short mode is
26128      # case insensitive, let's make it lowercase to improve readability.
26129      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26130      # Now convert it back to Unix-style (cygpath)
26131      input_path=`$CYGPATH -u "$shortmode_path"`
26132      new_path="$input_path"
26133    fi
26134  fi
26135
26136  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26137  if test "x$test_cygdrive_prefix" = x; then
26138    # As a simple fix, exclude /usr/bin since it's not a real path.
26139    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26140      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26141      # a path prefixed by /cygdrive for fixpath to work.
26142      new_path="$CYGWIN_ROOT_PATH$input_path"
26143    fi
26144  fi
26145
26146
26147  if test "x$path" != "x$new_path"; then
26148    BOOT_JDK="$new_path"
26149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26150$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26151  fi
26152
26153    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26154
26155  path="$BOOT_JDK"
26156  has_colon=`$ECHO $path | $GREP ^.:`
26157  new_path="$path"
26158  if test "x$has_colon" = x; then
26159    # Not in mixed or Windows style, start by that.
26160    new_path=`cmd //c echo $path`
26161  fi
26162
26163
26164  input_path="$new_path"
26165  # Check if we need to convert this using DOS-style short mode. If the path
26166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26167  # take no chances and rewrite it.
26168  # Note: m4 eats our [], so we need to use [ and ] instead.
26169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26170  if test "x$has_forbidden_chars" != x; then
26171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26173  fi
26174
26175
26176  windows_path="$new_path"
26177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26178    unix_path=`$CYGPATH -u "$windows_path"`
26179    new_path="$unix_path"
26180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26182    new_path="$unix_path"
26183  fi
26184
26185  if test "x$path" != "x$new_path"; then
26186    BOOT_JDK="$new_path"
26187    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26188$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26189  fi
26190
26191  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26192  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26193
26194    else
26195      # We're on a unix platform. Hooray! :)
26196      path="$BOOT_JDK"
26197      has_space=`$ECHO "$path" | $GREP " "`
26198      if test "x$has_space" != x; then
26199        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26200$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26201        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26202      fi
26203
26204      # Use eval to expand a potential ~
26205      eval path="$path"
26206      if test ! -f "$path" && test ! -d "$path"; then
26207        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26208      fi
26209
26210      if test -d "$path"; then
26211        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26212      else
26213        dir="`$DIRNAME "$path"`"
26214        base="`$BASENAME "$path"`"
26215        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26216      fi
26217    fi
26218  fi
26219
26220            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26221$as_echo_n "checking for Boot JDK... " >&6; }
26222            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26223$as_echo "$BOOT_JDK" >&6; }
26224            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26225$as_echo_n "checking Boot JDK version... " >&6; }
26226            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26227            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26228$as_echo "$BOOT_JDK_VERSION" >&6; }
26229          fi # end check jdk version
26230        fi # end check javac
26231      fi # end check java
26232    fi # end check boot jdk found
26233  fi
26234
26235
26236  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26237
26238  if test "x$BOOT_JDK_FOUND" = xno; then
26239    # Now execute the test
26240
26241  # Extract the first word of "javac", so it can be a program name with args.
26242set dummy javac; ac_word=$2
26243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26244$as_echo_n "checking for $ac_word... " >&6; }
26245if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26246  $as_echo_n "(cached) " >&6
26247else
26248  case $JAVAC_CHECK in
26249  [\\/]* | ?:[\\/]*)
26250  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26251  ;;
26252  *)
26253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26254for as_dir in $PATH
26255do
26256  IFS=$as_save_IFS
26257  test -z "$as_dir" && as_dir=.
26258    for ac_exec_ext in '' $ac_executable_extensions; do
26259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26260    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26262    break 2
26263  fi
26264done
26265  done
26266IFS=$as_save_IFS
26267
26268  ;;
26269esac
26270fi
26271JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26272if test -n "$JAVAC_CHECK"; then
26273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26274$as_echo "$JAVAC_CHECK" >&6; }
26275else
26276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26277$as_echo "no" >&6; }
26278fi
26279
26280
26281  # Extract the first word of "java", so it can be a program name with args.
26282set dummy java; ac_word=$2
26283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26284$as_echo_n "checking for $ac_word... " >&6; }
26285if ${ac_cv_path_JAVA_CHECK+:} false; then :
26286  $as_echo_n "(cached) " >&6
26287else
26288  case $JAVA_CHECK in
26289  [\\/]* | ?:[\\/]*)
26290  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26291  ;;
26292  *)
26293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26294for as_dir in $PATH
26295do
26296  IFS=$as_save_IFS
26297  test -z "$as_dir" && as_dir=.
26298    for ac_exec_ext in '' $ac_executable_extensions; do
26299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26300    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26302    break 2
26303  fi
26304done
26305  done
26306IFS=$as_save_IFS
26307
26308  ;;
26309esac
26310fi
26311JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26312if test -n "$JAVA_CHECK"; then
26313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26314$as_echo "$JAVA_CHECK" >&6; }
26315else
26316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26317$as_echo "no" >&6; }
26318fi
26319
26320
26321  BINARY="$JAVAC_CHECK"
26322  if test "x$JAVAC_CHECK" = x; then
26323    BINARY="$JAVA_CHECK"
26324  fi
26325  if test "x$BINARY" != x; then
26326    # So there is a java(c) binary, it might be part of a JDK.
26327    # Lets find the JDK/JRE directory by following symbolic links.
26328    # Linux/GNU systems often have links from /usr/bin/java to
26329    # /etc/alternatives/java to the real JDK binary.
26330
26331  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26332    # Follow a chain of symbolic links. Use readlink
26333    # where it exists, else fall back to horribly
26334    # complicated shell code.
26335    if test "x$READLINK_TESTED" != yes; then
26336      # On MacOSX there is a readlink tool with a different
26337      # purpose than the GNU readlink tool. Check the found readlink.
26338      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26339      if test "x$ISGNU" = x; then
26340        # A readlink that we do not know how to use.
26341        # Are there other non-GNU readlinks out there?
26342        READLINK_TESTED=yes
26343        READLINK=
26344      fi
26345    fi
26346
26347    if test "x$READLINK" != x; then
26348      BINARY=`$READLINK -f $BINARY`
26349    else
26350      # Save the current directory for restoring afterwards
26351      STARTDIR=$PWD
26352      COUNTER=0
26353      sym_link_dir=`$DIRNAME $BINARY`
26354      sym_link_file=`$BASENAME $BINARY`
26355      cd $sym_link_dir
26356      # Use -P flag to resolve symlinks in directories.
26357      cd `$THEPWDCMD -P`
26358      sym_link_dir=`$THEPWDCMD -P`
26359      # Resolve file symlinks
26360      while test $COUNTER -lt 20; do
26361        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26362        if test "x$ISLINK" == x; then
26363          # This is not a symbolic link! We are done!
26364          break
26365        fi
26366        # Again resolve directory symlinks since the target of the just found
26367        # link could be in a different directory
26368        cd `$DIRNAME $ISLINK`
26369        sym_link_dir=`$THEPWDCMD -P`
26370        sym_link_file=`$BASENAME $ISLINK`
26371        let COUNTER=COUNTER+1
26372      done
26373      cd $STARTDIR
26374      BINARY=$sym_link_dir/$sym_link_file
26375    fi
26376  fi
26377
26378    BOOT_JDK=`dirname "$BINARY"`
26379    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26380    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26381      # Looks like we found ourselves an JDK
26382      BOOT_JDK_FOUND=maybe
26383      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26384$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26385    fi
26386  fi
26387
26388
26389    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26390    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26391      # Do we have a bin/java?
26392      if test ! -x "$BOOT_JDK/bin/java"; then
26393        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26394$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26395        BOOT_JDK_FOUND=no
26396      else
26397        # Do we have a bin/javac?
26398        if test ! -x "$BOOT_JDK/bin/javac"; then
26399          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26400$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26401          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26402$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26403          BOOT_JDK_FOUND=no
26404        else
26405          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26406          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26407
26408          # Extra M4 quote needed to protect [] in grep expression.
26409          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26410          if test "x$FOUND_CORRECT_VERSION" = x; then
26411            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26412$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26413            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26414$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26415            BOOT_JDK_FOUND=no
26416          else
26417            # We're done! :-)
26418            BOOT_JDK_FOUND=yes
26419
26420  # Only process if variable expands to non-empty
26421
26422  if test "x$BOOT_JDK" != x; then
26423    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26424
26425  # Input might be given as Windows format, start by converting to
26426  # unix format.
26427  path="$BOOT_JDK"
26428  new_path=`$CYGPATH -u "$path"`
26429
26430  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26431  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26432  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26433  # "foo.exe" is OK but "foo" is an error.
26434  #
26435  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26436  # It is also a way to make sure we got the proper file name for the real test later on.
26437  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26438  if test "x$test_shortpath" = x; then
26439    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26440$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26441    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26442  fi
26443
26444  # Call helper function which possibly converts this using DOS-style short mode.
26445  # If so, the updated path is stored in $new_path.
26446
26447  input_path="$new_path"
26448  # Check if we need to convert this using DOS-style short mode. If the path
26449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26450  # take no chances and rewrite it.
26451  # Note: m4 eats our [], so we need to use [ and ] instead.
26452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26453  if test "x$has_forbidden_chars" != x; then
26454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26455    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26456    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26457    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26458      # Going to short mode and back again did indeed matter. Since short mode is
26459      # case insensitive, let's make it lowercase to improve readability.
26460      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26461      # Now convert it back to Unix-style (cygpath)
26462      input_path=`$CYGPATH -u "$shortmode_path"`
26463      new_path="$input_path"
26464    fi
26465  fi
26466
26467  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26468  if test "x$test_cygdrive_prefix" = x; then
26469    # As a simple fix, exclude /usr/bin since it's not a real path.
26470    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26471      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26472      # a path prefixed by /cygdrive for fixpath to work.
26473      new_path="$CYGWIN_ROOT_PATH$input_path"
26474    fi
26475  fi
26476
26477
26478  if test "x$path" != "x$new_path"; then
26479    BOOT_JDK="$new_path"
26480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26481$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26482  fi
26483
26484    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26485
26486  path="$BOOT_JDK"
26487  has_colon=`$ECHO $path | $GREP ^.:`
26488  new_path="$path"
26489  if test "x$has_colon" = x; then
26490    # Not in mixed or Windows style, start by that.
26491    new_path=`cmd //c echo $path`
26492  fi
26493
26494
26495  input_path="$new_path"
26496  # Check if we need to convert this using DOS-style short mode. If the path
26497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26498  # take no chances and rewrite it.
26499  # Note: m4 eats our [], so we need to use [ and ] instead.
26500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26501  if test "x$has_forbidden_chars" != x; then
26502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26503    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26504  fi
26505
26506
26507  windows_path="$new_path"
26508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26509    unix_path=`$CYGPATH -u "$windows_path"`
26510    new_path="$unix_path"
26511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26513    new_path="$unix_path"
26514  fi
26515
26516  if test "x$path" != "x$new_path"; then
26517    BOOT_JDK="$new_path"
26518    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26519$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26520  fi
26521
26522  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26523  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26524
26525    else
26526      # We're on a unix platform. Hooray! :)
26527      path="$BOOT_JDK"
26528      has_space=`$ECHO "$path" | $GREP " "`
26529      if test "x$has_space" != x; then
26530        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26531$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26532        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26533      fi
26534
26535      # Use eval to expand a potential ~
26536      eval path="$path"
26537      if test ! -f "$path" && test ! -d "$path"; then
26538        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26539      fi
26540
26541      if test -d "$path"; then
26542        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26543      else
26544        dir="`$DIRNAME "$path"`"
26545        base="`$BASENAME "$path"`"
26546        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26547      fi
26548    fi
26549  fi
26550
26551            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26552$as_echo_n "checking for Boot JDK... " >&6; }
26553            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26554$as_echo "$BOOT_JDK" >&6; }
26555            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26556$as_echo_n "checking Boot JDK version... " >&6; }
26557            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26558            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26559$as_echo "$BOOT_JDK_VERSION" >&6; }
26560          fi # end check jdk version
26561        fi # end check javac
26562      fi # end check java
26563    fi # end check boot jdk found
26564  fi
26565
26566
26567  # Test: Is there a JDK installed in default, well-known locations?
26568
26569  if test "x$BOOT_JDK_FOUND" = xno; then
26570    # Now execute the test
26571
26572  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26573
26574  if test "x$BOOT_JDK_FOUND" = xno; then
26575    # Now execute the test
26576
26577  if test "x$ProgramW6432" != x; then
26578    VIRTUAL_DIR="$ProgramW6432/Java"
26579
26580  windows_path="$VIRTUAL_DIR"
26581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26582    unix_path=`$CYGPATH -u "$windows_path"`
26583    VIRTUAL_DIR="$unix_path"
26584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26586    VIRTUAL_DIR="$unix_path"
26587  fi
26588
26589
26590  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26591  BOOT_JDK_SUFFIX=""
26592  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26593  if test "x$ALL_JDKS_FOUND" != x; then
26594    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26595
26596  if test "x$BOOT_JDK_FOUND" = xno; then
26597    # Now execute the test
26598
26599        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26600        if test -d "$BOOT_JDK"; then
26601          BOOT_JDK_FOUND=maybe
26602          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26603$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26604        fi
26605
26606
26607    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26608    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26609      # Do we have a bin/java?
26610      if test ! -x "$BOOT_JDK/bin/java"; then
26611        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26613        BOOT_JDK_FOUND=no
26614      else
26615        # Do we have a bin/javac?
26616        if test ! -x "$BOOT_JDK/bin/javac"; then
26617          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26618$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26619          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26620$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26621          BOOT_JDK_FOUND=no
26622        else
26623          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26624          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26625
26626          # Extra M4 quote needed to protect [] in grep expression.
26627          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26628          if test "x$FOUND_CORRECT_VERSION" = x; then
26629            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26630$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26631            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26632$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26633            BOOT_JDK_FOUND=no
26634          else
26635            # We're done! :-)
26636            BOOT_JDK_FOUND=yes
26637
26638  # Only process if variable expands to non-empty
26639
26640  if test "x$BOOT_JDK" != x; then
26641    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26642
26643  # Input might be given as Windows format, start by converting to
26644  # unix format.
26645  path="$BOOT_JDK"
26646  new_path=`$CYGPATH -u "$path"`
26647
26648  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26649  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26650  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26651  # "foo.exe" is OK but "foo" is an error.
26652  #
26653  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26654  # It is also a way to make sure we got the proper file name for the real test later on.
26655  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26656  if test "x$test_shortpath" = x; then
26657    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26658$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26659    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26660  fi
26661
26662  # Call helper function which possibly converts this using DOS-style short mode.
26663  # If so, the updated path is stored in $new_path.
26664
26665  input_path="$new_path"
26666  # Check if we need to convert this using DOS-style short mode. If the path
26667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26668  # take no chances and rewrite it.
26669  # Note: m4 eats our [], so we need to use [ and ] instead.
26670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26671  if test "x$has_forbidden_chars" != x; then
26672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26673    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26674    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26675    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26676      # Going to short mode and back again did indeed matter. Since short mode is
26677      # case insensitive, let's make it lowercase to improve readability.
26678      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26679      # Now convert it back to Unix-style (cygpath)
26680      input_path=`$CYGPATH -u "$shortmode_path"`
26681      new_path="$input_path"
26682    fi
26683  fi
26684
26685  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26686  if test "x$test_cygdrive_prefix" = x; then
26687    # As a simple fix, exclude /usr/bin since it's not a real path.
26688    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26689      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26690      # a path prefixed by /cygdrive for fixpath to work.
26691      new_path="$CYGWIN_ROOT_PATH$input_path"
26692    fi
26693  fi
26694
26695
26696  if test "x$path" != "x$new_path"; then
26697    BOOT_JDK="$new_path"
26698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26699$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26700  fi
26701
26702    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26703
26704  path="$BOOT_JDK"
26705  has_colon=`$ECHO $path | $GREP ^.:`
26706  new_path="$path"
26707  if test "x$has_colon" = x; then
26708    # Not in mixed or Windows style, start by that.
26709    new_path=`cmd //c echo $path`
26710  fi
26711
26712
26713  input_path="$new_path"
26714  # Check if we need to convert this using DOS-style short mode. If the path
26715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26716  # take no chances and rewrite it.
26717  # Note: m4 eats our [], so we need to use [ and ] instead.
26718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26719  if test "x$has_forbidden_chars" != x; then
26720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26721    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26722  fi
26723
26724
26725  windows_path="$new_path"
26726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26727    unix_path=`$CYGPATH -u "$windows_path"`
26728    new_path="$unix_path"
26729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26731    new_path="$unix_path"
26732  fi
26733
26734  if test "x$path" != "x$new_path"; then
26735    BOOT_JDK="$new_path"
26736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26737$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26738  fi
26739
26740  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26741  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26742
26743    else
26744      # We're on a unix platform. Hooray! :)
26745      path="$BOOT_JDK"
26746      has_space=`$ECHO "$path" | $GREP " "`
26747      if test "x$has_space" != x; then
26748        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26749$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26750        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26751      fi
26752
26753      # Use eval to expand a potential ~
26754      eval path="$path"
26755      if test ! -f "$path" && test ! -d "$path"; then
26756        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26757      fi
26758
26759      if test -d "$path"; then
26760        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26761      else
26762        dir="`$DIRNAME "$path"`"
26763        base="`$BASENAME "$path"`"
26764        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26765      fi
26766    fi
26767  fi
26768
26769            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26770$as_echo_n "checking for Boot JDK... " >&6; }
26771            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26772$as_echo "$BOOT_JDK" >&6; }
26773            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26774$as_echo_n "checking Boot JDK version... " >&6; }
26775            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26776            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26777$as_echo "$BOOT_JDK_VERSION" >&6; }
26778          fi # end check jdk version
26779        fi # end check javac
26780      fi # end check java
26781    fi # end check boot jdk found
26782  fi
26783
26784    done
26785  fi
26786
26787  fi
26788
26789
26790    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26791    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26792      # Do we have a bin/java?
26793      if test ! -x "$BOOT_JDK/bin/java"; then
26794        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26796        BOOT_JDK_FOUND=no
26797      else
26798        # Do we have a bin/javac?
26799        if test ! -x "$BOOT_JDK/bin/javac"; then
26800          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26801$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26802          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26803$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26804          BOOT_JDK_FOUND=no
26805        else
26806          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26807          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26808
26809          # Extra M4 quote needed to protect [] in grep expression.
26810          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26811          if test "x$FOUND_CORRECT_VERSION" = x; then
26812            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26813$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26814            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26815$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26816            BOOT_JDK_FOUND=no
26817          else
26818            # We're done! :-)
26819            BOOT_JDK_FOUND=yes
26820
26821  # Only process if variable expands to non-empty
26822
26823  if test "x$BOOT_JDK" != x; then
26824    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26825
26826  # Input might be given as Windows format, start by converting to
26827  # unix format.
26828  path="$BOOT_JDK"
26829  new_path=`$CYGPATH -u "$path"`
26830
26831  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26832  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26833  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26834  # "foo.exe" is OK but "foo" is an error.
26835  #
26836  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26837  # It is also a way to make sure we got the proper file name for the real test later on.
26838  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26839  if test "x$test_shortpath" = x; then
26840    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26841$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26842    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26843  fi
26844
26845  # Call helper function which possibly converts this using DOS-style short mode.
26846  # If so, the updated path is stored in $new_path.
26847
26848  input_path="$new_path"
26849  # Check if we need to convert this using DOS-style short mode. If the path
26850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26851  # take no chances and rewrite it.
26852  # Note: m4 eats our [], so we need to use [ and ] instead.
26853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26854  if test "x$has_forbidden_chars" != x; then
26855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26856    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26857    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26858    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26859      # Going to short mode and back again did indeed matter. Since short mode is
26860      # case insensitive, let's make it lowercase to improve readability.
26861      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26862      # Now convert it back to Unix-style (cygpath)
26863      input_path=`$CYGPATH -u "$shortmode_path"`
26864      new_path="$input_path"
26865    fi
26866  fi
26867
26868  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26869  if test "x$test_cygdrive_prefix" = x; then
26870    # As a simple fix, exclude /usr/bin since it's not a real path.
26871    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26872      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26873      # a path prefixed by /cygdrive for fixpath to work.
26874      new_path="$CYGWIN_ROOT_PATH$input_path"
26875    fi
26876  fi
26877
26878
26879  if test "x$path" != "x$new_path"; then
26880    BOOT_JDK="$new_path"
26881    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26882$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26883  fi
26884
26885    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26886
26887  path="$BOOT_JDK"
26888  has_colon=`$ECHO $path | $GREP ^.:`
26889  new_path="$path"
26890  if test "x$has_colon" = x; then
26891    # Not in mixed or Windows style, start by that.
26892    new_path=`cmd //c echo $path`
26893  fi
26894
26895
26896  input_path="$new_path"
26897  # Check if we need to convert this using DOS-style short mode. If the path
26898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26899  # take no chances and rewrite it.
26900  # Note: m4 eats our [], so we need to use [ and ] instead.
26901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26902  if test "x$has_forbidden_chars" != x; then
26903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26904    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26905  fi
26906
26907
26908  windows_path="$new_path"
26909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26910    unix_path=`$CYGPATH -u "$windows_path"`
26911    new_path="$unix_path"
26912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26914    new_path="$unix_path"
26915  fi
26916
26917  if test "x$path" != "x$new_path"; then
26918    BOOT_JDK="$new_path"
26919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26920$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26921  fi
26922
26923  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26924  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26925
26926    else
26927      # We're on a unix platform. Hooray! :)
26928      path="$BOOT_JDK"
26929      has_space=`$ECHO "$path" | $GREP " "`
26930      if test "x$has_space" != x; then
26931        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26932$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26933        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26934      fi
26935
26936      # Use eval to expand a potential ~
26937      eval path="$path"
26938      if test ! -f "$path" && test ! -d "$path"; then
26939        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26940      fi
26941
26942      if test -d "$path"; then
26943        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26944      else
26945        dir="`$DIRNAME "$path"`"
26946        base="`$BASENAME "$path"`"
26947        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26948      fi
26949    fi
26950  fi
26951
26952            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26953$as_echo_n "checking for Boot JDK... " >&6; }
26954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26955$as_echo "$BOOT_JDK" >&6; }
26956            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26957$as_echo_n "checking Boot JDK version... " >&6; }
26958            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26959            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26960$as_echo "$BOOT_JDK_VERSION" >&6; }
26961          fi # end check jdk version
26962        fi # end check javac
26963      fi # end check java
26964    fi # end check boot jdk found
26965  fi
26966
26967
26968  if test "x$BOOT_JDK_FOUND" = xno; then
26969    # Now execute the test
26970
26971  if test "x$PROGRAMW6432" != x; then
26972    VIRTUAL_DIR="$PROGRAMW6432/Java"
26973
26974  windows_path="$VIRTUAL_DIR"
26975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26976    unix_path=`$CYGPATH -u "$windows_path"`
26977    VIRTUAL_DIR="$unix_path"
26978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26980    VIRTUAL_DIR="$unix_path"
26981  fi
26982
26983
26984  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26985  BOOT_JDK_SUFFIX=""
26986  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26987  if test "x$ALL_JDKS_FOUND" != x; then
26988    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26989
26990  if test "x$BOOT_JDK_FOUND" = xno; then
26991    # Now execute the test
26992
26993        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26994        if test -d "$BOOT_JDK"; then
26995          BOOT_JDK_FOUND=maybe
26996          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26997$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26998        fi
26999
27000
27001    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27002    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27003      # Do we have a bin/java?
27004      if test ! -x "$BOOT_JDK/bin/java"; then
27005        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27007        BOOT_JDK_FOUND=no
27008      else
27009        # Do we have a bin/javac?
27010        if test ! -x "$BOOT_JDK/bin/javac"; then
27011          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27013          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27014$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27015          BOOT_JDK_FOUND=no
27016        else
27017          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27018          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27019
27020          # Extra M4 quote needed to protect [] in grep expression.
27021          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27022          if test "x$FOUND_CORRECT_VERSION" = x; then
27023            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27024$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27025            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27026$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27027            BOOT_JDK_FOUND=no
27028          else
27029            # We're done! :-)
27030            BOOT_JDK_FOUND=yes
27031
27032  # Only process if variable expands to non-empty
27033
27034  if test "x$BOOT_JDK" != x; then
27035    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27036
27037  # Input might be given as Windows format, start by converting to
27038  # unix format.
27039  path="$BOOT_JDK"
27040  new_path=`$CYGPATH -u "$path"`
27041
27042  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27043  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27044  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27045  # "foo.exe" is OK but "foo" is an error.
27046  #
27047  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27048  # It is also a way to make sure we got the proper file name for the real test later on.
27049  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27050  if test "x$test_shortpath" = x; then
27051    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27052$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27053    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27054  fi
27055
27056  # Call helper function which possibly converts this using DOS-style short mode.
27057  # If so, the updated path is stored in $new_path.
27058
27059  input_path="$new_path"
27060  # Check if we need to convert this using DOS-style short mode. If the path
27061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27062  # take no chances and rewrite it.
27063  # Note: m4 eats our [], so we need to use [ and ] instead.
27064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27065  if test "x$has_forbidden_chars" != x; then
27066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27067    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27068    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27069    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27070      # Going to short mode and back again did indeed matter. Since short mode is
27071      # case insensitive, let's make it lowercase to improve readability.
27072      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27073      # Now convert it back to Unix-style (cygpath)
27074      input_path=`$CYGPATH -u "$shortmode_path"`
27075      new_path="$input_path"
27076    fi
27077  fi
27078
27079  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27080  if test "x$test_cygdrive_prefix" = x; then
27081    # As a simple fix, exclude /usr/bin since it's not a real path.
27082    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27083      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27084      # a path prefixed by /cygdrive for fixpath to work.
27085      new_path="$CYGWIN_ROOT_PATH$input_path"
27086    fi
27087  fi
27088
27089
27090  if test "x$path" != "x$new_path"; then
27091    BOOT_JDK="$new_path"
27092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27093$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27094  fi
27095
27096    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27097
27098  path="$BOOT_JDK"
27099  has_colon=`$ECHO $path | $GREP ^.:`
27100  new_path="$path"
27101  if test "x$has_colon" = x; then
27102    # Not in mixed or Windows style, start by that.
27103    new_path=`cmd //c echo $path`
27104  fi
27105
27106
27107  input_path="$new_path"
27108  # Check if we need to convert this using DOS-style short mode. If the path
27109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27110  # take no chances and rewrite it.
27111  # Note: m4 eats our [], so we need to use [ and ] instead.
27112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27113  if test "x$has_forbidden_chars" != x; then
27114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27115    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27116  fi
27117
27118
27119  windows_path="$new_path"
27120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27121    unix_path=`$CYGPATH -u "$windows_path"`
27122    new_path="$unix_path"
27123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27125    new_path="$unix_path"
27126  fi
27127
27128  if test "x$path" != "x$new_path"; then
27129    BOOT_JDK="$new_path"
27130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27131$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27132  fi
27133
27134  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27135  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27136
27137    else
27138      # We're on a unix platform. Hooray! :)
27139      path="$BOOT_JDK"
27140      has_space=`$ECHO "$path" | $GREP " "`
27141      if test "x$has_space" != x; then
27142        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27143$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27144        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27145      fi
27146
27147      # Use eval to expand a potential ~
27148      eval path="$path"
27149      if test ! -f "$path" && test ! -d "$path"; then
27150        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27151      fi
27152
27153      if test -d "$path"; then
27154        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27155      else
27156        dir="`$DIRNAME "$path"`"
27157        base="`$BASENAME "$path"`"
27158        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27159      fi
27160    fi
27161  fi
27162
27163            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27164$as_echo_n "checking for Boot JDK... " >&6; }
27165            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27166$as_echo "$BOOT_JDK" >&6; }
27167            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27168$as_echo_n "checking Boot JDK version... " >&6; }
27169            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27170            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27171$as_echo "$BOOT_JDK_VERSION" >&6; }
27172          fi # end check jdk version
27173        fi # end check javac
27174      fi # end check java
27175    fi # end check boot jdk found
27176  fi
27177
27178    done
27179  fi
27180
27181  fi
27182
27183
27184    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27185    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27186      # Do we have a bin/java?
27187      if test ! -x "$BOOT_JDK/bin/java"; then
27188        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27190        BOOT_JDK_FOUND=no
27191      else
27192        # Do we have a bin/javac?
27193        if test ! -x "$BOOT_JDK/bin/javac"; then
27194          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27195$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27196          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27197$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27198          BOOT_JDK_FOUND=no
27199        else
27200          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27201          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27202
27203          # Extra M4 quote needed to protect [] in grep expression.
27204          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27205          if test "x$FOUND_CORRECT_VERSION" = x; then
27206            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27208            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27209$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27210            BOOT_JDK_FOUND=no
27211          else
27212            # We're done! :-)
27213            BOOT_JDK_FOUND=yes
27214
27215  # Only process if variable expands to non-empty
27216
27217  if test "x$BOOT_JDK" != x; then
27218    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27219
27220  # Input might be given as Windows format, start by converting to
27221  # unix format.
27222  path="$BOOT_JDK"
27223  new_path=`$CYGPATH -u "$path"`
27224
27225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27228  # "foo.exe" is OK but "foo" is an error.
27229  #
27230  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27231  # It is also a way to make sure we got the proper file name for the real test later on.
27232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27233  if test "x$test_shortpath" = x; then
27234    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27235$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27236    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27237  fi
27238
27239  # Call helper function which possibly converts this using DOS-style short mode.
27240  # If so, the updated path is stored in $new_path.
27241
27242  input_path="$new_path"
27243  # Check if we need to convert this using DOS-style short mode. If the path
27244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27245  # take no chances and rewrite it.
27246  # Note: m4 eats our [], so we need to use [ and ] instead.
27247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27248  if test "x$has_forbidden_chars" != x; then
27249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27250    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27251    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27252    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27253      # Going to short mode and back again did indeed matter. Since short mode is
27254      # case insensitive, let's make it lowercase to improve readability.
27255      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27256      # Now convert it back to Unix-style (cygpath)
27257      input_path=`$CYGPATH -u "$shortmode_path"`
27258      new_path="$input_path"
27259    fi
27260  fi
27261
27262  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27263  if test "x$test_cygdrive_prefix" = x; then
27264    # As a simple fix, exclude /usr/bin since it's not a real path.
27265    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27266      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27267      # a path prefixed by /cygdrive for fixpath to work.
27268      new_path="$CYGWIN_ROOT_PATH$input_path"
27269    fi
27270  fi
27271
27272
27273  if test "x$path" != "x$new_path"; then
27274    BOOT_JDK="$new_path"
27275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27276$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27277  fi
27278
27279    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27280
27281  path="$BOOT_JDK"
27282  has_colon=`$ECHO $path | $GREP ^.:`
27283  new_path="$path"
27284  if test "x$has_colon" = x; then
27285    # Not in mixed or Windows style, start by that.
27286    new_path=`cmd //c echo $path`
27287  fi
27288
27289
27290  input_path="$new_path"
27291  # Check if we need to convert this using DOS-style short mode. If the path
27292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27293  # take no chances and rewrite it.
27294  # Note: m4 eats our [], so we need to use [ and ] instead.
27295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27296  if test "x$has_forbidden_chars" != x; then
27297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27298    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27299  fi
27300
27301
27302  windows_path="$new_path"
27303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27304    unix_path=`$CYGPATH -u "$windows_path"`
27305    new_path="$unix_path"
27306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27308    new_path="$unix_path"
27309  fi
27310
27311  if test "x$path" != "x$new_path"; then
27312    BOOT_JDK="$new_path"
27313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27314$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27315  fi
27316
27317  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27318  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27319
27320    else
27321      # We're on a unix platform. Hooray! :)
27322      path="$BOOT_JDK"
27323      has_space=`$ECHO "$path" | $GREP " "`
27324      if test "x$has_space" != x; then
27325        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27326$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27327        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27328      fi
27329
27330      # Use eval to expand a potential ~
27331      eval path="$path"
27332      if test ! -f "$path" && test ! -d "$path"; then
27333        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27334      fi
27335
27336      if test -d "$path"; then
27337        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27338      else
27339        dir="`$DIRNAME "$path"`"
27340        base="`$BASENAME "$path"`"
27341        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27342      fi
27343    fi
27344  fi
27345
27346            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27347$as_echo_n "checking for Boot JDK... " >&6; }
27348            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27349$as_echo "$BOOT_JDK" >&6; }
27350            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27351$as_echo_n "checking Boot JDK version... " >&6; }
27352            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27353            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27354$as_echo "$BOOT_JDK_VERSION" >&6; }
27355          fi # end check jdk version
27356        fi # end check javac
27357      fi # end check java
27358    fi # end check boot jdk found
27359  fi
27360
27361
27362  if test "x$BOOT_JDK_FOUND" = xno; then
27363    # Now execute the test
27364
27365  if test "x$PROGRAMFILES" != x; then
27366    VIRTUAL_DIR="$PROGRAMFILES/Java"
27367
27368  windows_path="$VIRTUAL_DIR"
27369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27370    unix_path=`$CYGPATH -u "$windows_path"`
27371    VIRTUAL_DIR="$unix_path"
27372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27374    VIRTUAL_DIR="$unix_path"
27375  fi
27376
27377
27378  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27379  BOOT_JDK_SUFFIX=""
27380  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27381  if test "x$ALL_JDKS_FOUND" != x; then
27382    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27383
27384  if test "x$BOOT_JDK_FOUND" = xno; then
27385    # Now execute the test
27386
27387        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27388        if test -d "$BOOT_JDK"; then
27389          BOOT_JDK_FOUND=maybe
27390          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27391$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27392        fi
27393
27394
27395    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27396    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27397      # Do we have a bin/java?
27398      if test ! -x "$BOOT_JDK/bin/java"; then
27399        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27400$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27401        BOOT_JDK_FOUND=no
27402      else
27403        # Do we have a bin/javac?
27404        if test ! -x "$BOOT_JDK/bin/javac"; then
27405          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27406$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27407          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27408$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27409          BOOT_JDK_FOUND=no
27410        else
27411          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27412          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27413
27414          # Extra M4 quote needed to protect [] in grep expression.
27415          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27416          if test "x$FOUND_CORRECT_VERSION" = x; then
27417            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27418$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27419            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27420$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27421            BOOT_JDK_FOUND=no
27422          else
27423            # We're done! :-)
27424            BOOT_JDK_FOUND=yes
27425
27426  # Only process if variable expands to non-empty
27427
27428  if test "x$BOOT_JDK" != x; then
27429    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27430
27431  # Input might be given as Windows format, start by converting to
27432  # unix format.
27433  path="$BOOT_JDK"
27434  new_path=`$CYGPATH -u "$path"`
27435
27436  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27437  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27438  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27439  # "foo.exe" is OK but "foo" is an error.
27440  #
27441  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27442  # It is also a way to make sure we got the proper file name for the real test later on.
27443  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27444  if test "x$test_shortpath" = x; then
27445    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27446$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27447    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27448  fi
27449
27450  # Call helper function which possibly converts this using DOS-style short mode.
27451  # If so, the updated path is stored in $new_path.
27452
27453  input_path="$new_path"
27454  # Check if we need to convert this using DOS-style short mode. If the path
27455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27456  # take no chances and rewrite it.
27457  # Note: m4 eats our [], so we need to use [ and ] instead.
27458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27459  if test "x$has_forbidden_chars" != x; then
27460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27461    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27462    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27463    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27464      # Going to short mode and back again did indeed matter. Since short mode is
27465      # case insensitive, let's make it lowercase to improve readability.
27466      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27467      # Now convert it back to Unix-style (cygpath)
27468      input_path=`$CYGPATH -u "$shortmode_path"`
27469      new_path="$input_path"
27470    fi
27471  fi
27472
27473  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27474  if test "x$test_cygdrive_prefix" = x; then
27475    # As a simple fix, exclude /usr/bin since it's not a real path.
27476    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27477      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27478      # a path prefixed by /cygdrive for fixpath to work.
27479      new_path="$CYGWIN_ROOT_PATH$input_path"
27480    fi
27481  fi
27482
27483
27484  if test "x$path" != "x$new_path"; then
27485    BOOT_JDK="$new_path"
27486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27487$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27488  fi
27489
27490    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27491
27492  path="$BOOT_JDK"
27493  has_colon=`$ECHO $path | $GREP ^.:`
27494  new_path="$path"
27495  if test "x$has_colon" = x; then
27496    # Not in mixed or Windows style, start by that.
27497    new_path=`cmd //c echo $path`
27498  fi
27499
27500
27501  input_path="$new_path"
27502  # Check if we need to convert this using DOS-style short mode. If the path
27503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27504  # take no chances and rewrite it.
27505  # Note: m4 eats our [], so we need to use [ and ] instead.
27506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27507  if test "x$has_forbidden_chars" != x; then
27508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27509    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27510  fi
27511
27512
27513  windows_path="$new_path"
27514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27515    unix_path=`$CYGPATH -u "$windows_path"`
27516    new_path="$unix_path"
27517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27519    new_path="$unix_path"
27520  fi
27521
27522  if test "x$path" != "x$new_path"; then
27523    BOOT_JDK="$new_path"
27524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27525$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27526  fi
27527
27528  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27529  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27530
27531    else
27532      # We're on a unix platform. Hooray! :)
27533      path="$BOOT_JDK"
27534      has_space=`$ECHO "$path" | $GREP " "`
27535      if test "x$has_space" != x; then
27536        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27537$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27538        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27539      fi
27540
27541      # Use eval to expand a potential ~
27542      eval path="$path"
27543      if test ! -f "$path" && test ! -d "$path"; then
27544        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27545      fi
27546
27547      if test -d "$path"; then
27548        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27549      else
27550        dir="`$DIRNAME "$path"`"
27551        base="`$BASENAME "$path"`"
27552        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27553      fi
27554    fi
27555  fi
27556
27557            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27558$as_echo_n "checking for Boot JDK... " >&6; }
27559            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27560$as_echo "$BOOT_JDK" >&6; }
27561            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27562$as_echo_n "checking Boot JDK version... " >&6; }
27563            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27565$as_echo "$BOOT_JDK_VERSION" >&6; }
27566          fi # end check jdk version
27567        fi # end check javac
27568      fi # end check java
27569    fi # end check boot jdk found
27570  fi
27571
27572    done
27573  fi
27574
27575  fi
27576
27577
27578    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27579    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27580      # Do we have a bin/java?
27581      if test ! -x "$BOOT_JDK/bin/java"; then
27582        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27583$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27584        BOOT_JDK_FOUND=no
27585      else
27586        # Do we have a bin/javac?
27587        if test ! -x "$BOOT_JDK/bin/javac"; then
27588          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27589$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27590          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27591$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27592          BOOT_JDK_FOUND=no
27593        else
27594          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27595          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27596
27597          # Extra M4 quote needed to protect [] in grep expression.
27598          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27599          if test "x$FOUND_CORRECT_VERSION" = x; then
27600            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27601$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27602            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27603$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27604            BOOT_JDK_FOUND=no
27605          else
27606            # We're done! :-)
27607            BOOT_JDK_FOUND=yes
27608
27609  # Only process if variable expands to non-empty
27610
27611  if test "x$BOOT_JDK" != x; then
27612    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27613
27614  # Input might be given as Windows format, start by converting to
27615  # unix format.
27616  path="$BOOT_JDK"
27617  new_path=`$CYGPATH -u "$path"`
27618
27619  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27620  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27621  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27622  # "foo.exe" is OK but "foo" is an error.
27623  #
27624  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27625  # It is also a way to make sure we got the proper file name for the real test later on.
27626  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27627  if test "x$test_shortpath" = x; then
27628    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27629$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27630    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27631  fi
27632
27633  # Call helper function which possibly converts this using DOS-style short mode.
27634  # If so, the updated path is stored in $new_path.
27635
27636  input_path="$new_path"
27637  # Check if we need to convert this using DOS-style short mode. If the path
27638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27639  # take no chances and rewrite it.
27640  # Note: m4 eats our [], so we need to use [ and ] instead.
27641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27642  if test "x$has_forbidden_chars" != x; then
27643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27644    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27645    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27646    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27647      # Going to short mode and back again did indeed matter. Since short mode is
27648      # case insensitive, let's make it lowercase to improve readability.
27649      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27650      # Now convert it back to Unix-style (cygpath)
27651      input_path=`$CYGPATH -u "$shortmode_path"`
27652      new_path="$input_path"
27653    fi
27654  fi
27655
27656  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27657  if test "x$test_cygdrive_prefix" = x; then
27658    # As a simple fix, exclude /usr/bin since it's not a real path.
27659    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27660      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27661      # a path prefixed by /cygdrive for fixpath to work.
27662      new_path="$CYGWIN_ROOT_PATH$input_path"
27663    fi
27664  fi
27665
27666
27667  if test "x$path" != "x$new_path"; then
27668    BOOT_JDK="$new_path"
27669    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27670$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27671  fi
27672
27673    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27674
27675  path="$BOOT_JDK"
27676  has_colon=`$ECHO $path | $GREP ^.:`
27677  new_path="$path"
27678  if test "x$has_colon" = x; then
27679    # Not in mixed or Windows style, start by that.
27680    new_path=`cmd //c echo $path`
27681  fi
27682
27683
27684  input_path="$new_path"
27685  # Check if we need to convert this using DOS-style short mode. If the path
27686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27687  # take no chances and rewrite it.
27688  # Note: m4 eats our [], so we need to use [ and ] instead.
27689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27690  if test "x$has_forbidden_chars" != x; then
27691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27692    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27693  fi
27694
27695
27696  windows_path="$new_path"
27697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27698    unix_path=`$CYGPATH -u "$windows_path"`
27699    new_path="$unix_path"
27700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27702    new_path="$unix_path"
27703  fi
27704
27705  if test "x$path" != "x$new_path"; then
27706    BOOT_JDK="$new_path"
27707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27708$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27709  fi
27710
27711  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27712  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27713
27714    else
27715      # We're on a unix platform. Hooray! :)
27716      path="$BOOT_JDK"
27717      has_space=`$ECHO "$path" | $GREP " "`
27718      if test "x$has_space" != x; then
27719        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27720$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27721        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27722      fi
27723
27724      # Use eval to expand a potential ~
27725      eval path="$path"
27726      if test ! -f "$path" && test ! -d "$path"; then
27727        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27728      fi
27729
27730      if test -d "$path"; then
27731        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27732      else
27733        dir="`$DIRNAME "$path"`"
27734        base="`$BASENAME "$path"`"
27735        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27736      fi
27737    fi
27738  fi
27739
27740            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27741$as_echo_n "checking for Boot JDK... " >&6; }
27742            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27743$as_echo "$BOOT_JDK" >&6; }
27744            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27745$as_echo_n "checking Boot JDK version... " >&6; }
27746            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27747            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27748$as_echo "$BOOT_JDK_VERSION" >&6; }
27749          fi # end check jdk version
27750        fi # end check javac
27751      fi # end check java
27752    fi # end check boot jdk found
27753  fi
27754
27755
27756  if test "x$BOOT_JDK_FOUND" = xno; then
27757    # Now execute the test
27758
27759  if test "x$ProgramFiles" != x; then
27760    VIRTUAL_DIR="$ProgramFiles/Java"
27761
27762  windows_path="$VIRTUAL_DIR"
27763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27764    unix_path=`$CYGPATH -u "$windows_path"`
27765    VIRTUAL_DIR="$unix_path"
27766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27768    VIRTUAL_DIR="$unix_path"
27769  fi
27770
27771
27772  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27773  BOOT_JDK_SUFFIX=""
27774  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27775  if test "x$ALL_JDKS_FOUND" != x; then
27776    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27777
27778  if test "x$BOOT_JDK_FOUND" = xno; then
27779    # Now execute the test
27780
27781        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27782        if test -d "$BOOT_JDK"; then
27783          BOOT_JDK_FOUND=maybe
27784          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27785$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27786        fi
27787
27788
27789    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27790    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27791      # Do we have a bin/java?
27792      if test ! -x "$BOOT_JDK/bin/java"; then
27793        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27795        BOOT_JDK_FOUND=no
27796      else
27797        # Do we have a bin/javac?
27798        if test ! -x "$BOOT_JDK/bin/javac"; then
27799          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27801          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27802$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27803          BOOT_JDK_FOUND=no
27804        else
27805          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27806          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27807
27808          # Extra M4 quote needed to protect [] in grep expression.
27809          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27810          if test "x$FOUND_CORRECT_VERSION" = x; then
27811            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27813            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27814$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27815            BOOT_JDK_FOUND=no
27816          else
27817            # We're done! :-)
27818            BOOT_JDK_FOUND=yes
27819
27820  # Only process if variable expands to non-empty
27821
27822  if test "x$BOOT_JDK" != x; then
27823    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27824
27825  # Input might be given as Windows format, start by converting to
27826  # unix format.
27827  path="$BOOT_JDK"
27828  new_path=`$CYGPATH -u "$path"`
27829
27830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27833  # "foo.exe" is OK but "foo" is an error.
27834  #
27835  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27836  # It is also a way to make sure we got the proper file name for the real test later on.
27837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27838  if test "x$test_shortpath" = x; then
27839    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27840$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27841    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27842  fi
27843
27844  # Call helper function which possibly converts this using DOS-style short mode.
27845  # If so, the updated path is stored in $new_path.
27846
27847  input_path="$new_path"
27848  # Check if we need to convert this using DOS-style short mode. If the path
27849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27850  # take no chances and rewrite it.
27851  # Note: m4 eats our [], so we need to use [ and ] instead.
27852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27853  if test "x$has_forbidden_chars" != x; then
27854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27855    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27856    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27857    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27858      # Going to short mode and back again did indeed matter. Since short mode is
27859      # case insensitive, let's make it lowercase to improve readability.
27860      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27861      # Now convert it back to Unix-style (cygpath)
27862      input_path=`$CYGPATH -u "$shortmode_path"`
27863      new_path="$input_path"
27864    fi
27865  fi
27866
27867  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27868  if test "x$test_cygdrive_prefix" = x; then
27869    # As a simple fix, exclude /usr/bin since it's not a real path.
27870    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27871      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27872      # a path prefixed by /cygdrive for fixpath to work.
27873      new_path="$CYGWIN_ROOT_PATH$input_path"
27874    fi
27875  fi
27876
27877
27878  if test "x$path" != "x$new_path"; then
27879    BOOT_JDK="$new_path"
27880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27881$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27882  fi
27883
27884    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27885
27886  path="$BOOT_JDK"
27887  has_colon=`$ECHO $path | $GREP ^.:`
27888  new_path="$path"
27889  if test "x$has_colon" = x; then
27890    # Not in mixed or Windows style, start by that.
27891    new_path=`cmd //c echo $path`
27892  fi
27893
27894
27895  input_path="$new_path"
27896  # Check if we need to convert this using DOS-style short mode. If the path
27897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27898  # take no chances and rewrite it.
27899  # Note: m4 eats our [], so we need to use [ and ] instead.
27900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27901  if test "x$has_forbidden_chars" != x; then
27902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27904  fi
27905
27906
27907  windows_path="$new_path"
27908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27909    unix_path=`$CYGPATH -u "$windows_path"`
27910    new_path="$unix_path"
27911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27913    new_path="$unix_path"
27914  fi
27915
27916  if test "x$path" != "x$new_path"; then
27917    BOOT_JDK="$new_path"
27918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27919$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27920  fi
27921
27922  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27923  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27924
27925    else
27926      # We're on a unix platform. Hooray! :)
27927      path="$BOOT_JDK"
27928      has_space=`$ECHO "$path" | $GREP " "`
27929      if test "x$has_space" != x; then
27930        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27931$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27932        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27933      fi
27934
27935      # Use eval to expand a potential ~
27936      eval path="$path"
27937      if test ! -f "$path" && test ! -d "$path"; then
27938        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27939      fi
27940
27941      if test -d "$path"; then
27942        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27943      else
27944        dir="`$DIRNAME "$path"`"
27945        base="`$BASENAME "$path"`"
27946        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27947      fi
27948    fi
27949  fi
27950
27951            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27952$as_echo_n "checking for Boot JDK... " >&6; }
27953            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27954$as_echo "$BOOT_JDK" >&6; }
27955            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27956$as_echo_n "checking Boot JDK version... " >&6; }
27957            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27958            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27959$as_echo "$BOOT_JDK_VERSION" >&6; }
27960          fi # end check jdk version
27961        fi # end check javac
27962      fi # end check java
27963    fi # end check boot jdk found
27964  fi
27965
27966    done
27967  fi
27968
27969  fi
27970
27971
27972    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27973    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27974      # Do we have a bin/java?
27975      if test ! -x "$BOOT_JDK/bin/java"; then
27976        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27977$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27978        BOOT_JDK_FOUND=no
27979      else
27980        # Do we have a bin/javac?
27981        if test ! -x "$BOOT_JDK/bin/javac"; then
27982          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27984          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27985$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27986          BOOT_JDK_FOUND=no
27987        else
27988          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27989          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27990
27991          # Extra M4 quote needed to protect [] in grep expression.
27992          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27993          if test "x$FOUND_CORRECT_VERSION" = x; then
27994            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27996            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27997$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27998            BOOT_JDK_FOUND=no
27999          else
28000            # We're done! :-)
28001            BOOT_JDK_FOUND=yes
28002
28003  # Only process if variable expands to non-empty
28004
28005  if test "x$BOOT_JDK" != x; then
28006    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28007
28008  # Input might be given as Windows format, start by converting to
28009  # unix format.
28010  path="$BOOT_JDK"
28011  new_path=`$CYGPATH -u "$path"`
28012
28013  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28014  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28015  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28016  # "foo.exe" is OK but "foo" is an error.
28017  #
28018  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28019  # It is also a way to make sure we got the proper file name for the real test later on.
28020  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28021  if test "x$test_shortpath" = x; then
28022    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28023$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28024    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28025  fi
28026
28027  # Call helper function which possibly converts this using DOS-style short mode.
28028  # If so, the updated path is stored in $new_path.
28029
28030  input_path="$new_path"
28031  # Check if we need to convert this using DOS-style short mode. If the path
28032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28033  # take no chances and rewrite it.
28034  # Note: m4 eats our [], so we need to use [ and ] instead.
28035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28036  if test "x$has_forbidden_chars" != x; then
28037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28038    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28039    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28040    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28041      # Going to short mode and back again did indeed matter. Since short mode is
28042      # case insensitive, let's make it lowercase to improve readability.
28043      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28044      # Now convert it back to Unix-style (cygpath)
28045      input_path=`$CYGPATH -u "$shortmode_path"`
28046      new_path="$input_path"
28047    fi
28048  fi
28049
28050  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28051  if test "x$test_cygdrive_prefix" = x; then
28052    # As a simple fix, exclude /usr/bin since it's not a real path.
28053    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28054      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28055      # a path prefixed by /cygdrive for fixpath to work.
28056      new_path="$CYGWIN_ROOT_PATH$input_path"
28057    fi
28058  fi
28059
28060
28061  if test "x$path" != "x$new_path"; then
28062    BOOT_JDK="$new_path"
28063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28064$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28065  fi
28066
28067    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28068
28069  path="$BOOT_JDK"
28070  has_colon=`$ECHO $path | $GREP ^.:`
28071  new_path="$path"
28072  if test "x$has_colon" = x; then
28073    # Not in mixed or Windows style, start by that.
28074    new_path=`cmd //c echo $path`
28075  fi
28076
28077
28078  input_path="$new_path"
28079  # Check if we need to convert this using DOS-style short mode. If the path
28080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28081  # take no chances and rewrite it.
28082  # Note: m4 eats our [], so we need to use [ and ] instead.
28083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28084  if test "x$has_forbidden_chars" != x; then
28085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28086    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28087  fi
28088
28089
28090  windows_path="$new_path"
28091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28092    unix_path=`$CYGPATH -u "$windows_path"`
28093    new_path="$unix_path"
28094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28096    new_path="$unix_path"
28097  fi
28098
28099  if test "x$path" != "x$new_path"; then
28100    BOOT_JDK="$new_path"
28101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28102$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28103  fi
28104
28105  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28106  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28107
28108    else
28109      # We're on a unix platform. Hooray! :)
28110      path="$BOOT_JDK"
28111      has_space=`$ECHO "$path" | $GREP " "`
28112      if test "x$has_space" != x; then
28113        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28114$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28115        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28116      fi
28117
28118      # Use eval to expand a potential ~
28119      eval path="$path"
28120      if test ! -f "$path" && test ! -d "$path"; then
28121        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28122      fi
28123
28124      if test -d "$path"; then
28125        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28126      else
28127        dir="`$DIRNAME "$path"`"
28128        base="`$BASENAME "$path"`"
28129        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28130      fi
28131    fi
28132  fi
28133
28134            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28135$as_echo_n "checking for Boot JDK... " >&6; }
28136            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28137$as_echo "$BOOT_JDK" >&6; }
28138            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28139$as_echo_n "checking Boot JDK version... " >&6; }
28140            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28141            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28142$as_echo "$BOOT_JDK_VERSION" >&6; }
28143          fi # end check jdk version
28144        fi # end check javac
28145      fi # end check java
28146    fi # end check boot jdk found
28147  fi
28148
28149
28150  if test "x$BOOT_JDK_FOUND" = xno; then
28151    # Now execute the test
28152
28153  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28154  BOOT_JDK_SUFFIX=""
28155  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28156  if test "x$ALL_JDKS_FOUND" != x; then
28157    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28158
28159  if test "x$BOOT_JDK_FOUND" = xno; then
28160    # Now execute the test
28161
28162        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28163        if test -d "$BOOT_JDK"; then
28164          BOOT_JDK_FOUND=maybe
28165          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28166$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28167        fi
28168
28169
28170    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28171    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28172      # Do we have a bin/java?
28173      if test ! -x "$BOOT_JDK/bin/java"; then
28174        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28175$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28176        BOOT_JDK_FOUND=no
28177      else
28178        # Do we have a bin/javac?
28179        if test ! -x "$BOOT_JDK/bin/javac"; then
28180          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28181$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28182          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28183$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28184          BOOT_JDK_FOUND=no
28185        else
28186          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28187          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28188
28189          # Extra M4 quote needed to protect [] in grep expression.
28190          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28191          if test "x$FOUND_CORRECT_VERSION" = x; then
28192            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28193$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28194            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28195$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28196            BOOT_JDK_FOUND=no
28197          else
28198            # We're done! :-)
28199            BOOT_JDK_FOUND=yes
28200
28201  # Only process if variable expands to non-empty
28202
28203  if test "x$BOOT_JDK" != x; then
28204    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28205
28206  # Input might be given as Windows format, start by converting to
28207  # unix format.
28208  path="$BOOT_JDK"
28209  new_path=`$CYGPATH -u "$path"`
28210
28211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28214  # "foo.exe" is OK but "foo" is an error.
28215  #
28216  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28217  # It is also a way to make sure we got the proper file name for the real test later on.
28218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28219  if test "x$test_shortpath" = x; then
28220    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28221$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28222    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28223  fi
28224
28225  # Call helper function which possibly converts this using DOS-style short mode.
28226  # If so, the updated path is stored in $new_path.
28227
28228  input_path="$new_path"
28229  # Check if we need to convert this using DOS-style short mode. If the path
28230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28231  # take no chances and rewrite it.
28232  # Note: m4 eats our [], so we need to use [ and ] instead.
28233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28234  if test "x$has_forbidden_chars" != x; then
28235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28236    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28237    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28238    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28239      # Going to short mode and back again did indeed matter. Since short mode is
28240      # case insensitive, let's make it lowercase to improve readability.
28241      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28242      # Now convert it back to Unix-style (cygpath)
28243      input_path=`$CYGPATH -u "$shortmode_path"`
28244      new_path="$input_path"
28245    fi
28246  fi
28247
28248  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28249  if test "x$test_cygdrive_prefix" = x; then
28250    # As a simple fix, exclude /usr/bin since it's not a real path.
28251    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28252      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28253      # a path prefixed by /cygdrive for fixpath to work.
28254      new_path="$CYGWIN_ROOT_PATH$input_path"
28255    fi
28256  fi
28257
28258
28259  if test "x$path" != "x$new_path"; then
28260    BOOT_JDK="$new_path"
28261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28262$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28263  fi
28264
28265    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28266
28267  path="$BOOT_JDK"
28268  has_colon=`$ECHO $path | $GREP ^.:`
28269  new_path="$path"
28270  if test "x$has_colon" = x; then
28271    # Not in mixed or Windows style, start by that.
28272    new_path=`cmd //c echo $path`
28273  fi
28274
28275
28276  input_path="$new_path"
28277  # Check if we need to convert this using DOS-style short mode. If the path
28278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28279  # take no chances and rewrite it.
28280  # Note: m4 eats our [], so we need to use [ and ] instead.
28281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28282  if test "x$has_forbidden_chars" != x; then
28283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28284    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28285  fi
28286
28287
28288  windows_path="$new_path"
28289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28290    unix_path=`$CYGPATH -u "$windows_path"`
28291    new_path="$unix_path"
28292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28294    new_path="$unix_path"
28295  fi
28296
28297  if test "x$path" != "x$new_path"; then
28298    BOOT_JDK="$new_path"
28299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28300$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28301  fi
28302
28303  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28304  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28305
28306    else
28307      # We're on a unix platform. Hooray! :)
28308      path="$BOOT_JDK"
28309      has_space=`$ECHO "$path" | $GREP " "`
28310      if test "x$has_space" != x; then
28311        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28312$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28313        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28314      fi
28315
28316      # Use eval to expand a potential ~
28317      eval path="$path"
28318      if test ! -f "$path" && test ! -d "$path"; then
28319        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28320      fi
28321
28322      if test -d "$path"; then
28323        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28324      else
28325        dir="`$DIRNAME "$path"`"
28326        base="`$BASENAME "$path"`"
28327        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28328      fi
28329    fi
28330  fi
28331
28332            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28333$as_echo_n "checking for Boot JDK... " >&6; }
28334            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28335$as_echo "$BOOT_JDK" >&6; }
28336            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28337$as_echo_n "checking Boot JDK version... " >&6; }
28338            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28339            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28340$as_echo "$BOOT_JDK_VERSION" >&6; }
28341          fi # end check jdk version
28342        fi # end check javac
28343      fi # end check java
28344    fi # end check boot jdk found
28345  fi
28346
28347    done
28348  fi
28349
28350
28351    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28352    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28353      # Do we have a bin/java?
28354      if test ! -x "$BOOT_JDK/bin/java"; then
28355        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28357        BOOT_JDK_FOUND=no
28358      else
28359        # Do we have a bin/javac?
28360        if test ! -x "$BOOT_JDK/bin/javac"; then
28361          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28362$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28363          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28364$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28365          BOOT_JDK_FOUND=no
28366        else
28367          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28368          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28369
28370          # Extra M4 quote needed to protect [] in grep expression.
28371          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28372          if test "x$FOUND_CORRECT_VERSION" = x; then
28373            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28374$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28375            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28376$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28377            BOOT_JDK_FOUND=no
28378          else
28379            # We're done! :-)
28380            BOOT_JDK_FOUND=yes
28381
28382  # Only process if variable expands to non-empty
28383
28384  if test "x$BOOT_JDK" != x; then
28385    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28386
28387  # Input might be given as Windows format, start by converting to
28388  # unix format.
28389  path="$BOOT_JDK"
28390  new_path=`$CYGPATH -u "$path"`
28391
28392  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28393  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28394  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28395  # "foo.exe" is OK but "foo" is an error.
28396  #
28397  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28398  # It is also a way to make sure we got the proper file name for the real test later on.
28399  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28400  if test "x$test_shortpath" = x; then
28401    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28402$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28403    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28404  fi
28405
28406  # Call helper function which possibly converts this using DOS-style short mode.
28407  # If so, the updated path is stored in $new_path.
28408
28409  input_path="$new_path"
28410  # Check if we need to convert this using DOS-style short mode. If the path
28411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28412  # take no chances and rewrite it.
28413  # Note: m4 eats our [], so we need to use [ and ] instead.
28414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28415  if test "x$has_forbidden_chars" != x; then
28416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28420      # Going to short mode and back again did indeed matter. Since short mode is
28421      # case insensitive, let's make it lowercase to improve readability.
28422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28423      # Now convert it back to Unix-style (cygpath)
28424      input_path=`$CYGPATH -u "$shortmode_path"`
28425      new_path="$input_path"
28426    fi
28427  fi
28428
28429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28430  if test "x$test_cygdrive_prefix" = x; then
28431    # As a simple fix, exclude /usr/bin since it's not a real path.
28432    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28434      # a path prefixed by /cygdrive for fixpath to work.
28435      new_path="$CYGWIN_ROOT_PATH$input_path"
28436    fi
28437  fi
28438
28439
28440  if test "x$path" != "x$new_path"; then
28441    BOOT_JDK="$new_path"
28442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28443$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28444  fi
28445
28446    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28447
28448  path="$BOOT_JDK"
28449  has_colon=`$ECHO $path | $GREP ^.:`
28450  new_path="$path"
28451  if test "x$has_colon" = x; then
28452    # Not in mixed or Windows style, start by that.
28453    new_path=`cmd //c echo $path`
28454  fi
28455
28456
28457  input_path="$new_path"
28458  # Check if we need to convert this using DOS-style short mode. If the path
28459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28460  # take no chances and rewrite it.
28461  # Note: m4 eats our [], so we need to use [ and ] instead.
28462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28463  if test "x$has_forbidden_chars" != x; then
28464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28466  fi
28467
28468
28469  windows_path="$new_path"
28470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28471    unix_path=`$CYGPATH -u "$windows_path"`
28472    new_path="$unix_path"
28473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28475    new_path="$unix_path"
28476  fi
28477
28478  if test "x$path" != "x$new_path"; then
28479    BOOT_JDK="$new_path"
28480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28481$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28482  fi
28483
28484  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28485  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28486
28487    else
28488      # We're on a unix platform. Hooray! :)
28489      path="$BOOT_JDK"
28490      has_space=`$ECHO "$path" | $GREP " "`
28491      if test "x$has_space" != x; then
28492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28493$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28494        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28495      fi
28496
28497      # Use eval to expand a potential ~
28498      eval path="$path"
28499      if test ! -f "$path" && test ! -d "$path"; then
28500        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28501      fi
28502
28503      if test -d "$path"; then
28504        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28505      else
28506        dir="`$DIRNAME "$path"`"
28507        base="`$BASENAME "$path"`"
28508        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28509      fi
28510    fi
28511  fi
28512
28513            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28514$as_echo_n "checking for Boot JDK... " >&6; }
28515            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28516$as_echo "$BOOT_JDK" >&6; }
28517            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28518$as_echo_n "checking Boot JDK version... " >&6; }
28519            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28520            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28521$as_echo "$BOOT_JDK_VERSION" >&6; }
28522          fi # end check jdk version
28523        fi # end check javac
28524      fi # end check java
28525    fi # end check boot jdk found
28526  fi
28527
28528  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28529
28530  if test "x$BOOT_JDK_FOUND" = xno; then
28531    # Now execute the test
28532
28533  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28534  BOOT_JDK_SUFFIX="/Contents/Home"
28535  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28536  if test "x$ALL_JDKS_FOUND" != x; then
28537    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28538
28539  if test "x$BOOT_JDK_FOUND" = xno; then
28540    # Now execute the test
28541
28542        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28543        if test -d "$BOOT_JDK"; then
28544          BOOT_JDK_FOUND=maybe
28545          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28546$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28547        fi
28548
28549
28550    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28551    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28552      # Do we have a bin/java?
28553      if test ! -x "$BOOT_JDK/bin/java"; then
28554        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28555$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28556        BOOT_JDK_FOUND=no
28557      else
28558        # Do we have a bin/javac?
28559        if test ! -x "$BOOT_JDK/bin/javac"; then
28560          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28561$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28562          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28563$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28564          BOOT_JDK_FOUND=no
28565        else
28566          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28567          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28568
28569          # Extra M4 quote needed to protect [] in grep expression.
28570          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28571          if test "x$FOUND_CORRECT_VERSION" = x; then
28572            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28574            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28575$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28576            BOOT_JDK_FOUND=no
28577          else
28578            # We're done! :-)
28579            BOOT_JDK_FOUND=yes
28580
28581  # Only process if variable expands to non-empty
28582
28583  if test "x$BOOT_JDK" != x; then
28584    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28585
28586  # Input might be given as Windows format, start by converting to
28587  # unix format.
28588  path="$BOOT_JDK"
28589  new_path=`$CYGPATH -u "$path"`
28590
28591  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28592  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28593  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28594  # "foo.exe" is OK but "foo" is an error.
28595  #
28596  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28597  # It is also a way to make sure we got the proper file name for the real test later on.
28598  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28599  if test "x$test_shortpath" = x; then
28600    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28601$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28602    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28603  fi
28604
28605  # Call helper function which possibly converts this using DOS-style short mode.
28606  # If so, the updated path is stored in $new_path.
28607
28608  input_path="$new_path"
28609  # Check if we need to convert this using DOS-style short mode. If the path
28610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28611  # take no chances and rewrite it.
28612  # Note: m4 eats our [], so we need to use [ and ] instead.
28613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28614  if test "x$has_forbidden_chars" != x; then
28615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28616    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28617    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28618    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28619      # Going to short mode and back again did indeed matter. Since short mode is
28620      # case insensitive, let's make it lowercase to improve readability.
28621      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28622      # Now convert it back to Unix-style (cygpath)
28623      input_path=`$CYGPATH -u "$shortmode_path"`
28624      new_path="$input_path"
28625    fi
28626  fi
28627
28628  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28629  if test "x$test_cygdrive_prefix" = x; then
28630    # As a simple fix, exclude /usr/bin since it's not a real path.
28631    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28632      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28633      # a path prefixed by /cygdrive for fixpath to work.
28634      new_path="$CYGWIN_ROOT_PATH$input_path"
28635    fi
28636  fi
28637
28638
28639  if test "x$path" != "x$new_path"; then
28640    BOOT_JDK="$new_path"
28641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28642$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28643  fi
28644
28645    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28646
28647  path="$BOOT_JDK"
28648  has_colon=`$ECHO $path | $GREP ^.:`
28649  new_path="$path"
28650  if test "x$has_colon" = x; then
28651    # Not in mixed or Windows style, start by that.
28652    new_path=`cmd //c echo $path`
28653  fi
28654
28655
28656  input_path="$new_path"
28657  # Check if we need to convert this using DOS-style short mode. If the path
28658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28659  # take no chances and rewrite it.
28660  # Note: m4 eats our [], so we need to use [ and ] instead.
28661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28662  if test "x$has_forbidden_chars" != x; then
28663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28664    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28665  fi
28666
28667
28668  windows_path="$new_path"
28669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28670    unix_path=`$CYGPATH -u "$windows_path"`
28671    new_path="$unix_path"
28672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28674    new_path="$unix_path"
28675  fi
28676
28677  if test "x$path" != "x$new_path"; then
28678    BOOT_JDK="$new_path"
28679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28680$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28681  fi
28682
28683  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28684  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28685
28686    else
28687      # We're on a unix platform. Hooray! :)
28688      path="$BOOT_JDK"
28689      has_space=`$ECHO "$path" | $GREP " "`
28690      if test "x$has_space" != x; then
28691        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28692$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28693        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28694      fi
28695
28696      # Use eval to expand a potential ~
28697      eval path="$path"
28698      if test ! -f "$path" && test ! -d "$path"; then
28699        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28700      fi
28701
28702      if test -d "$path"; then
28703        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28704      else
28705        dir="`$DIRNAME "$path"`"
28706        base="`$BASENAME "$path"`"
28707        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28708      fi
28709    fi
28710  fi
28711
28712            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28713$as_echo_n "checking for Boot JDK... " >&6; }
28714            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28715$as_echo "$BOOT_JDK" >&6; }
28716            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28717$as_echo_n "checking Boot JDK version... " >&6; }
28718            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28719            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28720$as_echo "$BOOT_JDK_VERSION" >&6; }
28721          fi # end check jdk version
28722        fi # end check javac
28723      fi # end check java
28724    fi # end check boot jdk found
28725  fi
28726
28727    done
28728  fi
28729
28730
28731    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28732    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28733      # Do we have a bin/java?
28734      if test ! -x "$BOOT_JDK/bin/java"; then
28735        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28736$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28737        BOOT_JDK_FOUND=no
28738      else
28739        # Do we have a bin/javac?
28740        if test ! -x "$BOOT_JDK/bin/javac"; then
28741          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28742$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28743          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28744$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28745          BOOT_JDK_FOUND=no
28746        else
28747          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28748          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28749
28750          # Extra M4 quote needed to protect [] in grep expression.
28751          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28752          if test "x$FOUND_CORRECT_VERSION" = x; then
28753            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28754$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28755            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28756$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28757            BOOT_JDK_FOUND=no
28758          else
28759            # We're done! :-)
28760            BOOT_JDK_FOUND=yes
28761
28762  # Only process if variable expands to non-empty
28763
28764  if test "x$BOOT_JDK" != x; then
28765    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28766
28767  # Input might be given as Windows format, start by converting to
28768  # unix format.
28769  path="$BOOT_JDK"
28770  new_path=`$CYGPATH -u "$path"`
28771
28772  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28773  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28774  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28775  # "foo.exe" is OK but "foo" is an error.
28776  #
28777  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28778  # It is also a way to make sure we got the proper file name for the real test later on.
28779  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28780  if test "x$test_shortpath" = x; then
28781    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28782$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28783    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28784  fi
28785
28786  # Call helper function which possibly converts this using DOS-style short mode.
28787  # If so, the updated path is stored in $new_path.
28788
28789  input_path="$new_path"
28790  # Check if we need to convert this using DOS-style short mode. If the path
28791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28792  # take no chances and rewrite it.
28793  # Note: m4 eats our [], so we need to use [ and ] instead.
28794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28795  if test "x$has_forbidden_chars" != x; then
28796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28797    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28798    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28799    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28800      # Going to short mode and back again did indeed matter. Since short mode is
28801      # case insensitive, let's make it lowercase to improve readability.
28802      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28803      # Now convert it back to Unix-style (cygpath)
28804      input_path=`$CYGPATH -u "$shortmode_path"`
28805      new_path="$input_path"
28806    fi
28807  fi
28808
28809  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28810  if test "x$test_cygdrive_prefix" = x; then
28811    # As a simple fix, exclude /usr/bin since it's not a real path.
28812    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28813      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28814      # a path prefixed by /cygdrive for fixpath to work.
28815      new_path="$CYGWIN_ROOT_PATH$input_path"
28816    fi
28817  fi
28818
28819
28820  if test "x$path" != "x$new_path"; then
28821    BOOT_JDK="$new_path"
28822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28823$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28824  fi
28825
28826    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28827
28828  path="$BOOT_JDK"
28829  has_colon=`$ECHO $path | $GREP ^.:`
28830  new_path="$path"
28831  if test "x$has_colon" = x; then
28832    # Not in mixed or Windows style, start by that.
28833    new_path=`cmd //c echo $path`
28834  fi
28835
28836
28837  input_path="$new_path"
28838  # Check if we need to convert this using DOS-style short mode. If the path
28839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28840  # take no chances and rewrite it.
28841  # Note: m4 eats our [], so we need to use [ and ] instead.
28842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28843  if test "x$has_forbidden_chars" != x; then
28844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28845    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28846  fi
28847
28848
28849  windows_path="$new_path"
28850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28851    unix_path=`$CYGPATH -u "$windows_path"`
28852    new_path="$unix_path"
28853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28855    new_path="$unix_path"
28856  fi
28857
28858  if test "x$path" != "x$new_path"; then
28859    BOOT_JDK="$new_path"
28860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28861$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28862  fi
28863
28864  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28865  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28866
28867    else
28868      # We're on a unix platform. Hooray! :)
28869      path="$BOOT_JDK"
28870      has_space=`$ECHO "$path" | $GREP " "`
28871      if test "x$has_space" != x; then
28872        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28873$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28874        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28875      fi
28876
28877      # Use eval to expand a potential ~
28878      eval path="$path"
28879      if test ! -f "$path" && test ! -d "$path"; then
28880        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28881      fi
28882
28883      if test -d "$path"; then
28884        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28885      else
28886        dir="`$DIRNAME "$path"`"
28887        base="`$BASENAME "$path"`"
28888        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28889      fi
28890    fi
28891  fi
28892
28893            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28894$as_echo_n "checking for Boot JDK... " >&6; }
28895            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28896$as_echo "$BOOT_JDK" >&6; }
28897            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28898$as_echo_n "checking Boot JDK version... " >&6; }
28899            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28900            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28901$as_echo "$BOOT_JDK_VERSION" >&6; }
28902          fi # end check jdk version
28903        fi # end check javac
28904      fi # end check java
28905    fi # end check boot jdk found
28906  fi
28907
28908
28909  if test "x$BOOT_JDK_FOUND" = xno; then
28910    # Now execute the test
28911
28912  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28913  BOOT_JDK_SUFFIX="/Contents/Home"
28914  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28915  if test "x$ALL_JDKS_FOUND" != x; then
28916    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28917
28918  if test "x$BOOT_JDK_FOUND" = xno; then
28919    # Now execute the test
28920
28921        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28922        if test -d "$BOOT_JDK"; then
28923          BOOT_JDK_FOUND=maybe
28924          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28925$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28926        fi
28927
28928
28929    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28930    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28931      # Do we have a bin/java?
28932      if test ! -x "$BOOT_JDK/bin/java"; then
28933        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28934$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28935        BOOT_JDK_FOUND=no
28936      else
28937        # Do we have a bin/javac?
28938        if test ! -x "$BOOT_JDK/bin/javac"; then
28939          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28940$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28941          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28942$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28943          BOOT_JDK_FOUND=no
28944        else
28945          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28946          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28947
28948          # Extra M4 quote needed to protect [] in grep expression.
28949          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28950          if test "x$FOUND_CORRECT_VERSION" = x; then
28951            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28952$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28953            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28954$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28955            BOOT_JDK_FOUND=no
28956          else
28957            # We're done! :-)
28958            BOOT_JDK_FOUND=yes
28959
28960  # Only process if variable expands to non-empty
28961
28962  if test "x$BOOT_JDK" != x; then
28963    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28964
28965  # Input might be given as Windows format, start by converting to
28966  # unix format.
28967  path="$BOOT_JDK"
28968  new_path=`$CYGPATH -u "$path"`
28969
28970  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28971  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28972  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28973  # "foo.exe" is OK but "foo" is an error.
28974  #
28975  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28976  # It is also a way to make sure we got the proper file name for the real test later on.
28977  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28978  if test "x$test_shortpath" = x; then
28979    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28980$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28981    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28982  fi
28983
28984  # Call helper function which possibly converts this using DOS-style short mode.
28985  # If so, the updated path is stored in $new_path.
28986
28987  input_path="$new_path"
28988  # Check if we need to convert this using DOS-style short mode. If the path
28989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28990  # take no chances and rewrite it.
28991  # Note: m4 eats our [], so we need to use [ and ] instead.
28992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28993  if test "x$has_forbidden_chars" != x; then
28994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28995    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28996    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28997    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28998      # Going to short mode and back again did indeed matter. Since short mode is
28999      # case insensitive, let's make it lowercase to improve readability.
29000      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29001      # Now convert it back to Unix-style (cygpath)
29002      input_path=`$CYGPATH -u "$shortmode_path"`
29003      new_path="$input_path"
29004    fi
29005  fi
29006
29007  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29008  if test "x$test_cygdrive_prefix" = x; then
29009    # As a simple fix, exclude /usr/bin since it's not a real path.
29010    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29011      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29012      # a path prefixed by /cygdrive for fixpath to work.
29013      new_path="$CYGWIN_ROOT_PATH$input_path"
29014    fi
29015  fi
29016
29017
29018  if test "x$path" != "x$new_path"; then
29019    BOOT_JDK="$new_path"
29020    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29021$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29022  fi
29023
29024    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29025
29026  path="$BOOT_JDK"
29027  has_colon=`$ECHO $path | $GREP ^.:`
29028  new_path="$path"
29029  if test "x$has_colon" = x; then
29030    # Not in mixed or Windows style, start by that.
29031    new_path=`cmd //c echo $path`
29032  fi
29033
29034
29035  input_path="$new_path"
29036  # Check if we need to convert this using DOS-style short mode. If the path
29037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29038  # take no chances and rewrite it.
29039  # Note: m4 eats our [], so we need to use [ and ] instead.
29040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29041  if test "x$has_forbidden_chars" != x; then
29042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29043    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29044  fi
29045
29046
29047  windows_path="$new_path"
29048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29049    unix_path=`$CYGPATH -u "$windows_path"`
29050    new_path="$unix_path"
29051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29053    new_path="$unix_path"
29054  fi
29055
29056  if test "x$path" != "x$new_path"; then
29057    BOOT_JDK="$new_path"
29058    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29059$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29060  fi
29061
29062  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29063  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29064
29065    else
29066      # We're on a unix platform. Hooray! :)
29067      path="$BOOT_JDK"
29068      has_space=`$ECHO "$path" | $GREP " "`
29069      if test "x$has_space" != x; then
29070        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29071$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29072        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29073      fi
29074
29075      # Use eval to expand a potential ~
29076      eval path="$path"
29077      if test ! -f "$path" && test ! -d "$path"; then
29078        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29079      fi
29080
29081      if test -d "$path"; then
29082        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29083      else
29084        dir="`$DIRNAME "$path"`"
29085        base="`$BASENAME "$path"`"
29086        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29087      fi
29088    fi
29089  fi
29090
29091            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29092$as_echo_n "checking for Boot JDK... " >&6; }
29093            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29094$as_echo "$BOOT_JDK" >&6; }
29095            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29096$as_echo_n "checking Boot JDK version... " >&6; }
29097            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29098            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29099$as_echo "$BOOT_JDK_VERSION" >&6; }
29100          fi # end check jdk version
29101        fi # end check javac
29102      fi # end check java
29103    fi # end check boot jdk found
29104  fi
29105
29106    done
29107  fi
29108
29109
29110    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29111    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29112      # Do we have a bin/java?
29113      if test ! -x "$BOOT_JDK/bin/java"; then
29114        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29115$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29116        BOOT_JDK_FOUND=no
29117      else
29118        # Do we have a bin/javac?
29119        if test ! -x "$BOOT_JDK/bin/javac"; then
29120          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29121$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29122          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29123$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29124          BOOT_JDK_FOUND=no
29125        else
29126          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29127          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29128
29129          # Extra M4 quote needed to protect [] in grep expression.
29130          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29131          if test "x$FOUND_CORRECT_VERSION" = x; then
29132            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29133$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29134            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29135$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29136            BOOT_JDK_FOUND=no
29137          else
29138            # We're done! :-)
29139            BOOT_JDK_FOUND=yes
29140
29141  # Only process if variable expands to non-empty
29142
29143  if test "x$BOOT_JDK" != x; then
29144    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29145
29146  # Input might be given as Windows format, start by converting to
29147  # unix format.
29148  path="$BOOT_JDK"
29149  new_path=`$CYGPATH -u "$path"`
29150
29151  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29152  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29153  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29154  # "foo.exe" is OK but "foo" is an error.
29155  #
29156  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29157  # It is also a way to make sure we got the proper file name for the real test later on.
29158  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29159  if test "x$test_shortpath" = x; then
29160    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29161$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29162    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29163  fi
29164
29165  # Call helper function which possibly converts this using DOS-style short mode.
29166  # If so, the updated path is stored in $new_path.
29167
29168  input_path="$new_path"
29169  # Check if we need to convert this using DOS-style short mode. If the path
29170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29171  # take no chances and rewrite it.
29172  # Note: m4 eats our [], so we need to use [ and ] instead.
29173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29174  if test "x$has_forbidden_chars" != x; then
29175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29176    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29177    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29178    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29179      # Going to short mode and back again did indeed matter. Since short mode is
29180      # case insensitive, let's make it lowercase to improve readability.
29181      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29182      # Now convert it back to Unix-style (cygpath)
29183      input_path=`$CYGPATH -u "$shortmode_path"`
29184      new_path="$input_path"
29185    fi
29186  fi
29187
29188  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29189  if test "x$test_cygdrive_prefix" = x; then
29190    # As a simple fix, exclude /usr/bin since it's not a real path.
29191    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29192      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29193      # a path prefixed by /cygdrive for fixpath to work.
29194      new_path="$CYGWIN_ROOT_PATH$input_path"
29195    fi
29196  fi
29197
29198
29199  if test "x$path" != "x$new_path"; then
29200    BOOT_JDK="$new_path"
29201    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29202$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29203  fi
29204
29205    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29206
29207  path="$BOOT_JDK"
29208  has_colon=`$ECHO $path | $GREP ^.:`
29209  new_path="$path"
29210  if test "x$has_colon" = x; then
29211    # Not in mixed or Windows style, start by that.
29212    new_path=`cmd //c echo $path`
29213  fi
29214
29215
29216  input_path="$new_path"
29217  # Check if we need to convert this using DOS-style short mode. If the path
29218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29219  # take no chances and rewrite it.
29220  # Note: m4 eats our [], so we need to use [ and ] instead.
29221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29222  if test "x$has_forbidden_chars" != x; then
29223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29225  fi
29226
29227
29228  windows_path="$new_path"
29229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29230    unix_path=`$CYGPATH -u "$windows_path"`
29231    new_path="$unix_path"
29232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29234    new_path="$unix_path"
29235  fi
29236
29237  if test "x$path" != "x$new_path"; then
29238    BOOT_JDK="$new_path"
29239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29240$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29241  fi
29242
29243  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29244  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29245
29246    else
29247      # We're on a unix platform. Hooray! :)
29248      path="$BOOT_JDK"
29249      has_space=`$ECHO "$path" | $GREP " "`
29250      if test "x$has_space" != x; then
29251        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29252$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29253        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29254      fi
29255
29256      # Use eval to expand a potential ~
29257      eval path="$path"
29258      if test ! -f "$path" && test ! -d "$path"; then
29259        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29260      fi
29261
29262      if test -d "$path"; then
29263        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29264      else
29265        dir="`$DIRNAME "$path"`"
29266        base="`$BASENAME "$path"`"
29267        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29268      fi
29269    fi
29270  fi
29271
29272            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29273$as_echo_n "checking for Boot JDK... " >&6; }
29274            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29275$as_echo "$BOOT_JDK" >&6; }
29276            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29277$as_echo_n "checking Boot JDK version... " >&6; }
29278            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29279            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29280$as_echo "$BOOT_JDK_VERSION" >&6; }
29281          fi # end check jdk version
29282        fi # end check javac
29283      fi # end check java
29284    fi # end check boot jdk found
29285  fi
29286
29287  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29288
29289  if test "x$BOOT_JDK_FOUND" = xno; then
29290    # Now execute the test
29291
29292  BOOT_JDK_PREFIX="/usr/lib/jvm"
29293  BOOT_JDK_SUFFIX=""
29294  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29295  if test "x$ALL_JDKS_FOUND" != x; then
29296    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29297
29298  if test "x$BOOT_JDK_FOUND" = xno; then
29299    # Now execute the test
29300
29301        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29302        if test -d "$BOOT_JDK"; then
29303          BOOT_JDK_FOUND=maybe
29304          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29305$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29306        fi
29307
29308
29309    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29310    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29311      # Do we have a bin/java?
29312      if test ! -x "$BOOT_JDK/bin/java"; then
29313        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29314$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29315        BOOT_JDK_FOUND=no
29316      else
29317        # Do we have a bin/javac?
29318        if test ! -x "$BOOT_JDK/bin/javac"; then
29319          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29321          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29322$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29323          BOOT_JDK_FOUND=no
29324        else
29325          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29326          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29327
29328          # Extra M4 quote needed to protect [] in grep expression.
29329          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29330          if test "x$FOUND_CORRECT_VERSION" = x; then
29331            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29332$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29333            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29334$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29335            BOOT_JDK_FOUND=no
29336          else
29337            # We're done! :-)
29338            BOOT_JDK_FOUND=yes
29339
29340  # Only process if variable expands to non-empty
29341
29342  if test "x$BOOT_JDK" != x; then
29343    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29344
29345  # Input might be given as Windows format, start by converting to
29346  # unix format.
29347  path="$BOOT_JDK"
29348  new_path=`$CYGPATH -u "$path"`
29349
29350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29353  # "foo.exe" is OK but "foo" is an error.
29354  #
29355  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29356  # It is also a way to make sure we got the proper file name for the real test later on.
29357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29358  if test "x$test_shortpath" = x; then
29359    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29360$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29361    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29362  fi
29363
29364  # Call helper function which possibly converts this using DOS-style short mode.
29365  # If so, the updated path is stored in $new_path.
29366
29367  input_path="$new_path"
29368  # Check if we need to convert this using DOS-style short mode. If the path
29369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29370  # take no chances and rewrite it.
29371  # Note: m4 eats our [], so we need to use [ and ] instead.
29372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29373  if test "x$has_forbidden_chars" != x; then
29374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29378      # Going to short mode and back again did indeed matter. Since short mode is
29379      # case insensitive, let's make it lowercase to improve readability.
29380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29381      # Now convert it back to Unix-style (cygpath)
29382      input_path=`$CYGPATH -u "$shortmode_path"`
29383      new_path="$input_path"
29384    fi
29385  fi
29386
29387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29388  if test "x$test_cygdrive_prefix" = x; then
29389    # As a simple fix, exclude /usr/bin since it's not a real path.
29390    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29392      # a path prefixed by /cygdrive for fixpath to work.
29393      new_path="$CYGWIN_ROOT_PATH$input_path"
29394    fi
29395  fi
29396
29397
29398  if test "x$path" != "x$new_path"; then
29399    BOOT_JDK="$new_path"
29400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29401$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29402  fi
29403
29404    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29405
29406  path="$BOOT_JDK"
29407  has_colon=`$ECHO $path | $GREP ^.:`
29408  new_path="$path"
29409  if test "x$has_colon" = x; then
29410    # Not in mixed or Windows style, start by that.
29411    new_path=`cmd //c echo $path`
29412  fi
29413
29414
29415  input_path="$new_path"
29416  # Check if we need to convert this using DOS-style short mode. If the path
29417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29418  # take no chances and rewrite it.
29419  # Note: m4 eats our [], so we need to use [ and ] instead.
29420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29421  if test "x$has_forbidden_chars" != x; then
29422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29424  fi
29425
29426
29427  windows_path="$new_path"
29428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29429    unix_path=`$CYGPATH -u "$windows_path"`
29430    new_path="$unix_path"
29431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29433    new_path="$unix_path"
29434  fi
29435
29436  if test "x$path" != "x$new_path"; then
29437    BOOT_JDK="$new_path"
29438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29439$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29440  fi
29441
29442  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29443  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29444
29445    else
29446      # We're on a unix platform. Hooray! :)
29447      path="$BOOT_JDK"
29448      has_space=`$ECHO "$path" | $GREP " "`
29449      if test "x$has_space" != x; then
29450        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29451$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29452        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29453      fi
29454
29455      # Use eval to expand a potential ~
29456      eval path="$path"
29457      if test ! -f "$path" && test ! -d "$path"; then
29458        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29459      fi
29460
29461      if test -d "$path"; then
29462        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29463      else
29464        dir="`$DIRNAME "$path"`"
29465        base="`$BASENAME "$path"`"
29466        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29467      fi
29468    fi
29469  fi
29470
29471            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29472$as_echo_n "checking for Boot JDK... " >&6; }
29473            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29474$as_echo "$BOOT_JDK" >&6; }
29475            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29476$as_echo_n "checking Boot JDK version... " >&6; }
29477            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29478            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29479$as_echo "$BOOT_JDK_VERSION" >&6; }
29480          fi # end check jdk version
29481        fi # end check javac
29482      fi # end check java
29483    fi # end check boot jdk found
29484  fi
29485
29486    done
29487  fi
29488
29489
29490    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29491    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29492      # Do we have a bin/java?
29493      if test ! -x "$BOOT_JDK/bin/java"; then
29494        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29495$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29496        BOOT_JDK_FOUND=no
29497      else
29498        # Do we have a bin/javac?
29499        if test ! -x "$BOOT_JDK/bin/javac"; then
29500          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29501$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29502          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29503$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29504          BOOT_JDK_FOUND=no
29505        else
29506          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29507          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29508
29509          # Extra M4 quote needed to protect [] in grep expression.
29510          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29511          if test "x$FOUND_CORRECT_VERSION" = x; then
29512            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29514            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29515$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29516            BOOT_JDK_FOUND=no
29517          else
29518            # We're done! :-)
29519            BOOT_JDK_FOUND=yes
29520
29521  # Only process if variable expands to non-empty
29522
29523  if test "x$BOOT_JDK" != x; then
29524    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29525
29526  # Input might be given as Windows format, start by converting to
29527  # unix format.
29528  path="$BOOT_JDK"
29529  new_path=`$CYGPATH -u "$path"`
29530
29531  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29532  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29533  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29534  # "foo.exe" is OK but "foo" is an error.
29535  #
29536  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29537  # It is also a way to make sure we got the proper file name for the real test later on.
29538  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29539  if test "x$test_shortpath" = x; then
29540    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29541$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29542    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29543  fi
29544
29545  # Call helper function which possibly converts this using DOS-style short mode.
29546  # If so, the updated path is stored in $new_path.
29547
29548  input_path="$new_path"
29549  # Check if we need to convert this using DOS-style short mode. If the path
29550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29551  # take no chances and rewrite it.
29552  # Note: m4 eats our [], so we need to use [ and ] instead.
29553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29554  if test "x$has_forbidden_chars" != x; then
29555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29556    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29557    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29558    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29559      # Going to short mode and back again did indeed matter. Since short mode is
29560      # case insensitive, let's make it lowercase to improve readability.
29561      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29562      # Now convert it back to Unix-style (cygpath)
29563      input_path=`$CYGPATH -u "$shortmode_path"`
29564      new_path="$input_path"
29565    fi
29566  fi
29567
29568  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29569  if test "x$test_cygdrive_prefix" = x; then
29570    # As a simple fix, exclude /usr/bin since it's not a real path.
29571    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29572      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29573      # a path prefixed by /cygdrive for fixpath to work.
29574      new_path="$CYGWIN_ROOT_PATH$input_path"
29575    fi
29576  fi
29577
29578
29579  if test "x$path" != "x$new_path"; then
29580    BOOT_JDK="$new_path"
29581    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29582$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29583  fi
29584
29585    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29586
29587  path="$BOOT_JDK"
29588  has_colon=`$ECHO $path | $GREP ^.:`
29589  new_path="$path"
29590  if test "x$has_colon" = x; then
29591    # Not in mixed or Windows style, start by that.
29592    new_path=`cmd //c echo $path`
29593  fi
29594
29595
29596  input_path="$new_path"
29597  # Check if we need to convert this using DOS-style short mode. If the path
29598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29599  # take no chances and rewrite it.
29600  # Note: m4 eats our [], so we need to use [ and ] instead.
29601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29602  if test "x$has_forbidden_chars" != x; then
29603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29604    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29605  fi
29606
29607
29608  windows_path="$new_path"
29609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29610    unix_path=`$CYGPATH -u "$windows_path"`
29611    new_path="$unix_path"
29612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29614    new_path="$unix_path"
29615  fi
29616
29617  if test "x$path" != "x$new_path"; then
29618    BOOT_JDK="$new_path"
29619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29620$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29621  fi
29622
29623  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29624  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29625
29626    else
29627      # We're on a unix platform. Hooray! :)
29628      path="$BOOT_JDK"
29629      has_space=`$ECHO "$path" | $GREP " "`
29630      if test "x$has_space" != x; then
29631        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29632$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29633        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29634      fi
29635
29636      # Use eval to expand a potential ~
29637      eval path="$path"
29638      if test ! -f "$path" && test ! -d "$path"; then
29639        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29640      fi
29641
29642      if test -d "$path"; then
29643        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29644      else
29645        dir="`$DIRNAME "$path"`"
29646        base="`$BASENAME "$path"`"
29647        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29648      fi
29649    fi
29650  fi
29651
29652            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29653$as_echo_n "checking for Boot JDK... " >&6; }
29654            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29655$as_echo "$BOOT_JDK" >&6; }
29656            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29657$as_echo_n "checking Boot JDK version... " >&6; }
29658            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29659            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29660$as_echo "$BOOT_JDK_VERSION" >&6; }
29661          fi # end check jdk version
29662        fi # end check javac
29663      fi # end check java
29664    fi # end check boot jdk found
29665  fi
29666
29667  fi
29668
29669
29670    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29671    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29672      # Do we have a bin/java?
29673      if test ! -x "$BOOT_JDK/bin/java"; then
29674        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29675$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29676        BOOT_JDK_FOUND=no
29677      else
29678        # Do we have a bin/javac?
29679        if test ! -x "$BOOT_JDK/bin/javac"; then
29680          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29681$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29682          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29683$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29684          BOOT_JDK_FOUND=no
29685        else
29686          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29687          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29688
29689          # Extra M4 quote needed to protect [] in grep expression.
29690          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29691          if test "x$FOUND_CORRECT_VERSION" = x; then
29692            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29693$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29694            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29695$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29696            BOOT_JDK_FOUND=no
29697          else
29698            # We're done! :-)
29699            BOOT_JDK_FOUND=yes
29700
29701  # Only process if variable expands to non-empty
29702
29703  if test "x$BOOT_JDK" != x; then
29704    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29705
29706  # Input might be given as Windows format, start by converting to
29707  # unix format.
29708  path="$BOOT_JDK"
29709  new_path=`$CYGPATH -u "$path"`
29710
29711  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29712  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29713  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29714  # "foo.exe" is OK but "foo" is an error.
29715  #
29716  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29717  # It is also a way to make sure we got the proper file name for the real test later on.
29718  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29719  if test "x$test_shortpath" = x; then
29720    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29721$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29722    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29723  fi
29724
29725  # Call helper function which possibly converts this using DOS-style short mode.
29726  # If so, the updated path is stored in $new_path.
29727
29728  input_path="$new_path"
29729  # Check if we need to convert this using DOS-style short mode. If the path
29730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29731  # take no chances and rewrite it.
29732  # Note: m4 eats our [], so we need to use [ and ] instead.
29733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29734  if test "x$has_forbidden_chars" != x; then
29735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29736    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29737    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29738    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29739      # Going to short mode and back again did indeed matter. Since short mode is
29740      # case insensitive, let's make it lowercase to improve readability.
29741      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29742      # Now convert it back to Unix-style (cygpath)
29743      input_path=`$CYGPATH -u "$shortmode_path"`
29744      new_path="$input_path"
29745    fi
29746  fi
29747
29748  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29749  if test "x$test_cygdrive_prefix" = x; then
29750    # As a simple fix, exclude /usr/bin since it's not a real path.
29751    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29752      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29753      # a path prefixed by /cygdrive for fixpath to work.
29754      new_path="$CYGWIN_ROOT_PATH$input_path"
29755    fi
29756  fi
29757
29758
29759  if test "x$path" != "x$new_path"; then
29760    BOOT_JDK="$new_path"
29761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29762$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29763  fi
29764
29765    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29766
29767  path="$BOOT_JDK"
29768  has_colon=`$ECHO $path | $GREP ^.:`
29769  new_path="$path"
29770  if test "x$has_colon" = x; then
29771    # Not in mixed or Windows style, start by that.
29772    new_path=`cmd //c echo $path`
29773  fi
29774
29775
29776  input_path="$new_path"
29777  # Check if we need to convert this using DOS-style short mode. If the path
29778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29779  # take no chances and rewrite it.
29780  # Note: m4 eats our [], so we need to use [ and ] instead.
29781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29782  if test "x$has_forbidden_chars" != x; then
29783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29784    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29785  fi
29786
29787
29788  windows_path="$new_path"
29789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29790    unix_path=`$CYGPATH -u "$windows_path"`
29791    new_path="$unix_path"
29792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29794    new_path="$unix_path"
29795  fi
29796
29797  if test "x$path" != "x$new_path"; then
29798    BOOT_JDK="$new_path"
29799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29800$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29801  fi
29802
29803  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29804  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29805
29806    else
29807      # We're on a unix platform. Hooray! :)
29808      path="$BOOT_JDK"
29809      has_space=`$ECHO "$path" | $GREP " "`
29810      if test "x$has_space" != x; then
29811        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29812$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29813        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29814      fi
29815
29816      # Use eval to expand a potential ~
29817      eval path="$path"
29818      if test ! -f "$path" && test ! -d "$path"; then
29819        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29820      fi
29821
29822      if test -d "$path"; then
29823        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29824      else
29825        dir="`$DIRNAME "$path"`"
29826        base="`$BASENAME "$path"`"
29827        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29828      fi
29829    fi
29830  fi
29831
29832            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29833$as_echo_n "checking for Boot JDK... " >&6; }
29834            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29835$as_echo "$BOOT_JDK" >&6; }
29836            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29837$as_echo_n "checking Boot JDK version... " >&6; }
29838            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29839            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29840$as_echo "$BOOT_JDK_VERSION" >&6; }
29841          fi # end check jdk version
29842        fi # end check javac
29843      fi # end check java
29844    fi # end check boot jdk found
29845  fi
29846
29847
29848  # If we haven't found anything yet, we've truly lost. Give up.
29849  if test "x$BOOT_JDK_FOUND" = xno; then
29850
29851  # Print a helpful message on how to acquire the necessary build dependency.
29852  # openjdk is the help tag: freetype, cups, alsa etc
29853  MISSING_DEPENDENCY=openjdk
29854
29855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29856    cygwin_help $MISSING_DEPENDENCY
29857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29858    msys_help $MISSING_DEPENDENCY
29859  else
29860    PKGHANDLER_COMMAND=
29861
29862    case $PKGHANDLER in
29863      apt-get)
29864        apt_help     $MISSING_DEPENDENCY ;;
29865      yum)
29866        yum_help     $MISSING_DEPENDENCY ;;
29867      port)
29868        port_help    $MISSING_DEPENDENCY ;;
29869      pkgutil)
29870        pkgutil_help $MISSING_DEPENDENCY ;;
29871      pkgadd)
29872        pkgadd_help  $MISSING_DEPENDENCY ;;
29873    esac
29874
29875    if test "x$PKGHANDLER_COMMAND" != x; then
29876      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29877    fi
29878  fi
29879
29880    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29881$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29882    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29883$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29884    as_fn_error $? "Cannot continue" "$LINENO" 5
29885  fi
29886
29887
29888
29889  # Setup tools from the Boot JDK.
29890
29891  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29892
29893  # Publish this variable in the help.
29894
29895
29896  if [ -z "${JAVA+x}" ]; then
29897    # The variable is not set by user, try to locate tool using the code snippet
29898
29899      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29900$as_echo_n "checking for java in Boot JDK... " >&6; }
29901      JAVA=$BOOT_JDK/bin/java
29902      if test ! -x $JAVA; then
29903        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29904$as_echo "not found" >&6; }
29905        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29906$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29907        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29908      fi
29909      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29910$as_echo "ok" >&6; }
29911
29912
29913  else
29914    # The variable is set, but is it from the command line or the environment?
29915
29916    # Try to remove the string !JAVA! from our list.
29917    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29918    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29919      # If it failed, the variable was not from the command line. Ignore it,
29920      # but warn the user (except for BASH, which is always set by the calling BASH).
29921      if test "xJAVA" != xBASH; then
29922        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29923$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29924      fi
29925      # Try to locate tool using the code snippet
29926
29927      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29928$as_echo_n "checking for java in Boot JDK... " >&6; }
29929      JAVA=$BOOT_JDK/bin/java
29930      if test ! -x $JAVA; then
29931        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29932$as_echo "not found" >&6; }
29933        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29934$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29935        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29936      fi
29937      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29938$as_echo "ok" >&6; }
29939
29940
29941    else
29942      # If it succeeded, then it was overridden by the user. We will use it
29943      # for the tool.
29944
29945      # First remove it from the list of overridden variables, so we can test
29946      # for unknown variables in the end.
29947      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29948
29949      # Check if we try to supply an empty value
29950      if test "x$JAVA" = x; then
29951        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29952$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29953        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29954$as_echo_n "checking for JAVA... " >&6; }
29955        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29956$as_echo "disabled" >&6; }
29957      else
29958        # Check if the provided tool contains a complete path.
29959        tool_specified="$JAVA"
29960        tool_basename="${tool_specified##*/}"
29961        if test "x$tool_basename" = "x$tool_specified"; then
29962          # A command without a complete path is provided, search $PATH.
29963          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29964$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29965          # Extract the first word of "$tool_basename", so it can be a program name with args.
29966set dummy $tool_basename; ac_word=$2
29967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29968$as_echo_n "checking for $ac_word... " >&6; }
29969if ${ac_cv_path_JAVA+:} false; then :
29970  $as_echo_n "(cached) " >&6
29971else
29972  case $JAVA in
29973  [\\/]* | ?:[\\/]*)
29974  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29975  ;;
29976  *)
29977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29978for as_dir in $PATH
29979do
29980  IFS=$as_save_IFS
29981  test -z "$as_dir" && as_dir=.
29982    for ac_exec_ext in '' $ac_executable_extensions; do
29983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29984    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29986    break 2
29987  fi
29988done
29989  done
29990IFS=$as_save_IFS
29991
29992  ;;
29993esac
29994fi
29995JAVA=$ac_cv_path_JAVA
29996if test -n "$JAVA"; then
29997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29998$as_echo "$JAVA" >&6; }
29999else
30000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30001$as_echo "no" >&6; }
30002fi
30003
30004
30005          if test "x$JAVA" = x; then
30006            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30007          fi
30008        else
30009          # Otherwise we believe it is a complete path. Use it as it is.
30010          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30011$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30012          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30013$as_echo_n "checking for JAVA... " >&6; }
30014          if test ! -x "$tool_specified"; then
30015            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30016$as_echo "not found" >&6; }
30017            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30018          fi
30019          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30020$as_echo "$tool_specified" >&6; }
30021        fi
30022      fi
30023    fi
30024
30025  fi
30026
30027
30028
30029  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30030
30031  # Publish this variable in the help.
30032
30033
30034  if [ -z "${JAVAC+x}" ]; then
30035    # The variable is not set by user, try to locate tool using the code snippet
30036
30037      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30038$as_echo_n "checking for javac in Boot JDK... " >&6; }
30039      JAVAC=$BOOT_JDK/bin/javac
30040      if test ! -x $JAVAC; then
30041        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30042$as_echo "not found" >&6; }
30043        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30044$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30045        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30046      fi
30047      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30048$as_echo "ok" >&6; }
30049
30050
30051  else
30052    # The variable is set, but is it from the command line or the environment?
30053
30054    # Try to remove the string !JAVAC! from our list.
30055    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30056    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30057      # If it failed, the variable was not from the command line. Ignore it,
30058      # but warn the user (except for BASH, which is always set by the calling BASH).
30059      if test "xJAVAC" != xBASH; then
30060        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30061$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30062      fi
30063      # Try to locate tool using the code snippet
30064
30065      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30066$as_echo_n "checking for javac in Boot JDK... " >&6; }
30067      JAVAC=$BOOT_JDK/bin/javac
30068      if test ! -x $JAVAC; then
30069        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30070$as_echo "not found" >&6; }
30071        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30072$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30073        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30074      fi
30075      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30076$as_echo "ok" >&6; }
30077
30078
30079    else
30080      # If it succeeded, then it was overridden by the user. We will use it
30081      # for the tool.
30082
30083      # First remove it from the list of overridden variables, so we can test
30084      # for unknown variables in the end.
30085      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30086
30087      # Check if we try to supply an empty value
30088      if test "x$JAVAC" = x; then
30089        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30090$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30091        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30092$as_echo_n "checking for JAVAC... " >&6; }
30093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30094$as_echo "disabled" >&6; }
30095      else
30096        # Check if the provided tool contains a complete path.
30097        tool_specified="$JAVAC"
30098        tool_basename="${tool_specified##*/}"
30099        if test "x$tool_basename" = "x$tool_specified"; then
30100          # A command without a complete path is provided, search $PATH.
30101          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30102$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30103          # Extract the first word of "$tool_basename", so it can be a program name with args.
30104set dummy $tool_basename; ac_word=$2
30105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30106$as_echo_n "checking for $ac_word... " >&6; }
30107if ${ac_cv_path_JAVAC+:} false; then :
30108  $as_echo_n "(cached) " >&6
30109else
30110  case $JAVAC in
30111  [\\/]* | ?:[\\/]*)
30112  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30113  ;;
30114  *)
30115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30116for as_dir in $PATH
30117do
30118  IFS=$as_save_IFS
30119  test -z "$as_dir" && as_dir=.
30120    for ac_exec_ext in '' $ac_executable_extensions; do
30121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30122    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30124    break 2
30125  fi
30126done
30127  done
30128IFS=$as_save_IFS
30129
30130  ;;
30131esac
30132fi
30133JAVAC=$ac_cv_path_JAVAC
30134if test -n "$JAVAC"; then
30135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30136$as_echo "$JAVAC" >&6; }
30137else
30138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30139$as_echo "no" >&6; }
30140fi
30141
30142
30143          if test "x$JAVAC" = x; then
30144            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30145          fi
30146        else
30147          # Otherwise we believe it is a complete path. Use it as it is.
30148          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30149$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30150          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30151$as_echo_n "checking for JAVAC... " >&6; }
30152          if test ! -x "$tool_specified"; then
30153            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30154$as_echo "not found" >&6; }
30155            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30156          fi
30157          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30158$as_echo "$tool_specified" >&6; }
30159        fi
30160      fi
30161    fi
30162
30163  fi
30164
30165
30166
30167  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30168
30169  # Publish this variable in the help.
30170
30171
30172  if [ -z "${JAVAH+x}" ]; then
30173    # The variable is not set by user, try to locate tool using the code snippet
30174
30175      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30176$as_echo_n "checking for javah in Boot JDK... " >&6; }
30177      JAVAH=$BOOT_JDK/bin/javah
30178      if test ! -x $JAVAH; then
30179        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30180$as_echo "not found" >&6; }
30181        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30182$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30183        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30184      fi
30185      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30186$as_echo "ok" >&6; }
30187
30188
30189  else
30190    # The variable is set, but is it from the command line or the environment?
30191
30192    # Try to remove the string !JAVAH! from our list.
30193    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30194    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30195      # If it failed, the variable was not from the command line. Ignore it,
30196      # but warn the user (except for BASH, which is always set by the calling BASH).
30197      if test "xJAVAH" != xBASH; then
30198        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30199$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30200      fi
30201      # Try to locate tool using the code snippet
30202
30203      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30204$as_echo_n "checking for javah in Boot JDK... " >&6; }
30205      JAVAH=$BOOT_JDK/bin/javah
30206      if test ! -x $JAVAH; then
30207        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30208$as_echo "not found" >&6; }
30209        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30210$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30211        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30212      fi
30213      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30214$as_echo "ok" >&6; }
30215
30216
30217    else
30218      # If it succeeded, then it was overridden by the user. We will use it
30219      # for the tool.
30220
30221      # First remove it from the list of overridden variables, so we can test
30222      # for unknown variables in the end.
30223      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30224
30225      # Check if we try to supply an empty value
30226      if test "x$JAVAH" = x; then
30227        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30228$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30229        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30230$as_echo_n "checking for JAVAH... " >&6; }
30231        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30232$as_echo "disabled" >&6; }
30233      else
30234        # Check if the provided tool contains a complete path.
30235        tool_specified="$JAVAH"
30236        tool_basename="${tool_specified##*/}"
30237        if test "x$tool_basename" = "x$tool_specified"; then
30238          # A command without a complete path is provided, search $PATH.
30239          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30240$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30241          # Extract the first word of "$tool_basename", so it can be a program name with args.
30242set dummy $tool_basename; ac_word=$2
30243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30244$as_echo_n "checking for $ac_word... " >&6; }
30245if ${ac_cv_path_JAVAH+:} false; then :
30246  $as_echo_n "(cached) " >&6
30247else
30248  case $JAVAH in
30249  [\\/]* | ?:[\\/]*)
30250  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30251  ;;
30252  *)
30253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30254for as_dir in $PATH
30255do
30256  IFS=$as_save_IFS
30257  test -z "$as_dir" && as_dir=.
30258    for ac_exec_ext in '' $ac_executable_extensions; do
30259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30260    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30262    break 2
30263  fi
30264done
30265  done
30266IFS=$as_save_IFS
30267
30268  ;;
30269esac
30270fi
30271JAVAH=$ac_cv_path_JAVAH
30272if test -n "$JAVAH"; then
30273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30274$as_echo "$JAVAH" >&6; }
30275else
30276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30277$as_echo "no" >&6; }
30278fi
30279
30280
30281          if test "x$JAVAH" = x; then
30282            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30283          fi
30284        else
30285          # Otherwise we believe it is a complete path. Use it as it is.
30286          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30287$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30288          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30289$as_echo_n "checking for JAVAH... " >&6; }
30290          if test ! -x "$tool_specified"; then
30291            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30292$as_echo "not found" >&6; }
30293            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30294          fi
30295          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30296$as_echo "$tool_specified" >&6; }
30297        fi
30298      fi
30299    fi
30300
30301  fi
30302
30303
30304
30305  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30306
30307  # Publish this variable in the help.
30308
30309
30310  if [ -z "${JAR+x}" ]; then
30311    # The variable is not set by user, try to locate tool using the code snippet
30312
30313      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30314$as_echo_n "checking for jar in Boot JDK... " >&6; }
30315      JAR=$BOOT_JDK/bin/jar
30316      if test ! -x $JAR; then
30317        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30318$as_echo "not found" >&6; }
30319        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30320$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30321        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30322      fi
30323      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30324$as_echo "ok" >&6; }
30325
30326
30327  else
30328    # The variable is set, but is it from the command line or the environment?
30329
30330    # Try to remove the string !JAR! from our list.
30331    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30332    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30333      # If it failed, the variable was not from the command line. Ignore it,
30334      # but warn the user (except for BASH, which is always set by the calling BASH).
30335      if test "xJAR" != xBASH; then
30336        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30337$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30338      fi
30339      # Try to locate tool using the code snippet
30340
30341      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30342$as_echo_n "checking for jar in Boot JDK... " >&6; }
30343      JAR=$BOOT_JDK/bin/jar
30344      if test ! -x $JAR; then
30345        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30346$as_echo "not found" >&6; }
30347        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30348$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30349        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30350      fi
30351      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30352$as_echo "ok" >&6; }
30353
30354
30355    else
30356      # If it succeeded, then it was overridden by the user. We will use it
30357      # for the tool.
30358
30359      # First remove it from the list of overridden variables, so we can test
30360      # for unknown variables in the end.
30361      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30362
30363      # Check if we try to supply an empty value
30364      if test "x$JAR" = x; then
30365        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30366$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30367        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30368$as_echo_n "checking for JAR... " >&6; }
30369        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30370$as_echo "disabled" >&6; }
30371      else
30372        # Check if the provided tool contains a complete path.
30373        tool_specified="$JAR"
30374        tool_basename="${tool_specified##*/}"
30375        if test "x$tool_basename" = "x$tool_specified"; then
30376          # A command without a complete path is provided, search $PATH.
30377          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30378$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30379          # Extract the first word of "$tool_basename", so it can be a program name with args.
30380set dummy $tool_basename; ac_word=$2
30381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30382$as_echo_n "checking for $ac_word... " >&6; }
30383if ${ac_cv_path_JAR+:} false; then :
30384  $as_echo_n "(cached) " >&6
30385else
30386  case $JAR in
30387  [\\/]* | ?:[\\/]*)
30388  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30389  ;;
30390  *)
30391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30392for as_dir in $PATH
30393do
30394  IFS=$as_save_IFS
30395  test -z "$as_dir" && as_dir=.
30396    for ac_exec_ext in '' $ac_executable_extensions; do
30397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30398    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30400    break 2
30401  fi
30402done
30403  done
30404IFS=$as_save_IFS
30405
30406  ;;
30407esac
30408fi
30409JAR=$ac_cv_path_JAR
30410if test -n "$JAR"; then
30411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30412$as_echo "$JAR" >&6; }
30413else
30414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30415$as_echo "no" >&6; }
30416fi
30417
30418
30419          if test "x$JAR" = x; then
30420            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30421          fi
30422        else
30423          # Otherwise we believe it is a complete path. Use it as it is.
30424          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30425$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30426          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30427$as_echo_n "checking for JAR... " >&6; }
30428          if test ! -x "$tool_specified"; then
30429            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30430$as_echo "not found" >&6; }
30431            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30432          fi
30433          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30434$as_echo "$tool_specified" >&6; }
30435        fi
30436      fi
30437    fi
30438
30439  fi
30440
30441
30442
30443  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30444
30445  # Publish this variable in the help.
30446
30447
30448  if [ -z "${JARSIGNER+x}" ]; then
30449    # The variable is not set by user, try to locate tool using the code snippet
30450
30451      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30452$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30453      JARSIGNER=$BOOT_JDK/bin/jarsigner
30454      if test ! -x $JARSIGNER; then
30455        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30456$as_echo "not found" >&6; }
30457        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30458$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30459        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30460      fi
30461      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30462$as_echo "ok" >&6; }
30463
30464
30465  else
30466    # The variable is set, but is it from the command line or the environment?
30467
30468    # Try to remove the string !JARSIGNER! from our list.
30469    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30470    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30471      # If it failed, the variable was not from the command line. Ignore it,
30472      # but warn the user (except for BASH, which is always set by the calling BASH).
30473      if test "xJARSIGNER" != xBASH; then
30474        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30475$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30476      fi
30477      # Try to locate tool using the code snippet
30478
30479      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30480$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30481      JARSIGNER=$BOOT_JDK/bin/jarsigner
30482      if test ! -x $JARSIGNER; then
30483        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30484$as_echo "not found" >&6; }
30485        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30486$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30487        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30488      fi
30489      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30490$as_echo "ok" >&6; }
30491
30492
30493    else
30494      # If it succeeded, then it was overridden by the user. We will use it
30495      # for the tool.
30496
30497      # First remove it from the list of overridden variables, so we can test
30498      # for unknown variables in the end.
30499      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30500
30501      # Check if we try to supply an empty value
30502      if test "x$JARSIGNER" = x; then
30503        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30504$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30505        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30506$as_echo_n "checking for JARSIGNER... " >&6; }
30507        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30508$as_echo "disabled" >&6; }
30509      else
30510        # Check if the provided tool contains a complete path.
30511        tool_specified="$JARSIGNER"
30512        tool_basename="${tool_specified##*/}"
30513        if test "x$tool_basename" = "x$tool_specified"; then
30514          # A command without a complete path is provided, search $PATH.
30515          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30516$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30517          # Extract the first word of "$tool_basename", so it can be a program name with args.
30518set dummy $tool_basename; ac_word=$2
30519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30520$as_echo_n "checking for $ac_word... " >&6; }
30521if ${ac_cv_path_JARSIGNER+:} false; then :
30522  $as_echo_n "(cached) " >&6
30523else
30524  case $JARSIGNER in
30525  [\\/]* | ?:[\\/]*)
30526  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30527  ;;
30528  *)
30529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30530for as_dir in $PATH
30531do
30532  IFS=$as_save_IFS
30533  test -z "$as_dir" && as_dir=.
30534    for ac_exec_ext in '' $ac_executable_extensions; do
30535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30536    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30538    break 2
30539  fi
30540done
30541  done
30542IFS=$as_save_IFS
30543
30544  ;;
30545esac
30546fi
30547JARSIGNER=$ac_cv_path_JARSIGNER
30548if test -n "$JARSIGNER"; then
30549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30550$as_echo "$JARSIGNER" >&6; }
30551else
30552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30553$as_echo "no" >&6; }
30554fi
30555
30556
30557          if test "x$JARSIGNER" = x; then
30558            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30559          fi
30560        else
30561          # Otherwise we believe it is a complete path. Use it as it is.
30562          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30563$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30564          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30565$as_echo_n "checking for JARSIGNER... " >&6; }
30566          if test ! -x "$tool_specified"; then
30567            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30568$as_echo "not found" >&6; }
30569            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30570          fi
30571          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30572$as_echo "$tool_specified" >&6; }
30573        fi
30574      fi
30575    fi
30576
30577  fi
30578
30579
30580
30581  # Finally, set some other options...
30582
30583  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30584  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30585
30586
30587
30588  $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30589  $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30590  OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30591  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30592  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30593  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30594    dummy="$dummy --patch-module foo=bar"
30595    JVM_ARG_OK=true
30596  else
30597    $ECHO "Arg failed:" >&5
30598    $ECHO "$OUTPUT" >&5
30599    JVM_ARG_OK=false
30600  fi
30601
30602  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30603$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30604  if test "x$JVM_ARG_OK" = "xtrue"; then
30605    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30606$as_echo "yes" >&6; }
30607    BOOT_JDK_MODULAR="true"
30608  else
30609    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30610$as_echo "no" >&6; }
30611    BOOT_JDK_MODULAR="false"
30612  fi
30613
30614
30615
30616
30617  # Check if the boot jdk is 32 or 64 bit
30618  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30619    BOOT_JDK_BITS="64"
30620  else
30621    BOOT_JDK_BITS="32"
30622  fi
30623  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30624$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30626$as_echo "$BOOT_JDK_BITS" >&6; }
30627
30628
30629
30630
30631# Check whether --with-build-jdk was given.
30632if test "${with_build_jdk+set}" = set; then :
30633  withval=$with_build_jdk;
30634fi
30635
30636
30637  CREATE_BUILDJDK=false
30638  EXTERNAL_BUILDJDK=false
30639  BUILD_JDK_FOUND="no"
30640  if test "x$with_build_jdk" != "x"; then
30641
30642  if test "x$BUILD_JDK_FOUND" = xno; then
30643    # Execute the test
30644
30645       if test "x$with_build_jdk" != x; then
30646         BUILD_JDK=$with_build_jdk
30647         BUILD_JDK_FOUND=maybe
30648         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30649$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30650       fi
30651
30652    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30653    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30654      # Do we have a bin/java?
30655      if test ! -x "$BUILD_JDK/bin/java"; then
30656        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30657$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30658        BUILD_JDK_FOUND=no
30659      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30660        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30661$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30662        BUILD_JDK_FOUND=no
30663      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30664        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30665$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30666        BUILD_JDK_FOUND=no
30667      elif test ! -x "$BUILD_JDK/bin/javac"; then
30668        # Do we have a bin/javac?
30669        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30670$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30671        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30672$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30673        BUILD_JDK_FOUND=no
30674      else
30675        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30676        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30677
30678        # Extra M4 quote needed to protect [] in grep expression.
30679        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30680        if test "x$FOUND_CORRECT_VERSION" = x; then
30681          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30682$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30683          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30684$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30685          BUILD_JDK_FOUND=no
30686        else
30687          # We're done!
30688          BUILD_JDK_FOUND=yes
30689
30690  # Only process if variable expands to non-empty
30691
30692  if test "x$BUILD_JDK" != x; then
30693    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30694
30695  # Input might be given as Windows format, start by converting to
30696  # unix format.
30697  path="$BUILD_JDK"
30698  new_path=`$CYGPATH -u "$path"`
30699
30700  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30701  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30702  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30703  # "foo.exe" is OK but "foo" is an error.
30704  #
30705  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30706  # It is also a way to make sure we got the proper file name for the real test later on.
30707  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30708  if test "x$test_shortpath" = x; then
30709    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30710$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30711    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30712  fi
30713
30714  # Call helper function which possibly converts this using DOS-style short mode.
30715  # If so, the updated path is stored in $new_path.
30716
30717  input_path="$new_path"
30718  # Check if we need to convert this using DOS-style short mode. If the path
30719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30720  # take no chances and rewrite it.
30721  # Note: m4 eats our [], so we need to use [ and ] instead.
30722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30723  if test "x$has_forbidden_chars" != x; then
30724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30725    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30726    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30727    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30728      # Going to short mode and back again did indeed matter. Since short mode is
30729      # case insensitive, let's make it lowercase to improve readability.
30730      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30731      # Now convert it back to Unix-style (cygpath)
30732      input_path=`$CYGPATH -u "$shortmode_path"`
30733      new_path="$input_path"
30734    fi
30735  fi
30736
30737  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30738  if test "x$test_cygdrive_prefix" = x; then
30739    # As a simple fix, exclude /usr/bin since it's not a real path.
30740    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30741      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30742      # a path prefixed by /cygdrive for fixpath to work.
30743      new_path="$CYGWIN_ROOT_PATH$input_path"
30744    fi
30745  fi
30746
30747
30748  if test "x$path" != "x$new_path"; then
30749    BUILD_JDK="$new_path"
30750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30751$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30752  fi
30753
30754    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30755
30756  path="$BUILD_JDK"
30757  has_colon=`$ECHO $path | $GREP ^.:`
30758  new_path="$path"
30759  if test "x$has_colon" = x; then
30760    # Not in mixed or Windows style, start by that.
30761    new_path=`cmd //c echo $path`
30762  fi
30763
30764
30765  input_path="$new_path"
30766  # Check if we need to convert this using DOS-style short mode. If the path
30767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30768  # take no chances and rewrite it.
30769  # Note: m4 eats our [], so we need to use [ and ] instead.
30770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30771  if test "x$has_forbidden_chars" != x; then
30772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30773    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30774  fi
30775
30776
30777  windows_path="$new_path"
30778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30779    unix_path=`$CYGPATH -u "$windows_path"`
30780    new_path="$unix_path"
30781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30783    new_path="$unix_path"
30784  fi
30785
30786  if test "x$path" != "x$new_path"; then
30787    BUILD_JDK="$new_path"
30788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30789$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30790  fi
30791
30792  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30793  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30794
30795    else
30796      # We're on a unix platform. Hooray! :)
30797      path="$BUILD_JDK"
30798      has_space=`$ECHO "$path" | $GREP " "`
30799      if test "x$has_space" != x; then
30800        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30801$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30802        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30803      fi
30804
30805      # Use eval to expand a potential ~
30806      eval path="$path"
30807      if test ! -f "$path" && test ! -d "$path"; then
30808        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30809      fi
30810
30811      if test -d "$path"; then
30812        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30813      else
30814        dir="`$DIRNAME "$path"`"
30815        base="`$BASENAME "$path"`"
30816        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30817      fi
30818    fi
30819  fi
30820
30821          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30822$as_echo_n "checking for Build JDK... " >&6; }
30823          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30824$as_echo "$BUILD_JDK" >&6; }
30825          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30826$as_echo_n "checking Build JDK version... " >&6; }
30827          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30828          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30829$as_echo "$BUILD_JDK_VERSION" >&6; }
30830        fi # end check jdk version
30831      fi # end check java
30832    fi # end check build jdk found
30833  fi
30834
30835    EXTERNAL_BUILDJDK=true
30836  else
30837    if test "x$COMPILE_TYPE" = "xcross"; then
30838      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30839      BUILD_JDK_FOUND=yes
30840      CREATE_BUILDJDK=true
30841      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30842$as_echo_n "checking for Build JDK... " >&6; }
30843      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30844$as_echo "yes, will build it for the host platform" >&6; }
30845    else
30846      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30847      BUILD_JDK_FOUND=yes
30848      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30849$as_echo_n "checking for Build JDK... " >&6; }
30850      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30851$as_echo "yes, will use output dir" >&6; }
30852    fi
30853  fi
30854
30855  JMOD="$BUILD_JDK/bin/jmod"
30856  JLINK="$BUILD_JDK/bin/jlink"
30857
30858
30859
30860  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30861    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30862$as_echo_n "checking for Build JDK... " >&6; }
30863    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30864$as_echo "no" >&6; }
30865    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30866  fi
30867
30868
30869
30870
30871
30872
30873###############################################################################
30874#
30875# Configure the sources to use. We can add or override individual directories.
30876#
30877###############################################################################
30878
30879
30880  # Where are the sources.
30881  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30882  CORBA_TOPDIR="$SRC_ROOT/corba"
30883  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30884  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30885  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30886  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30887  JDK_TOPDIR="$SRC_ROOT/jdk"
30888
30889
30890
30891
30892
30893
30894
30895
30896
30897  # This feature is no longer supported.
30898
30899
30900
30901# Check whether --with-add-source-root was given.
30902if test "${with_add_source_root+set}" = set; then :
30903  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
30904$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30905fi
30906
30907
30908
30909
30910# Check whether --with-override-source-root was given.
30911if test "${with_override_source_root+set}" = set; then :
30912  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
30913$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30914fi
30915
30916
30917
30918
30919# Check whether --with-adds-and-overrides was given.
30920if test "${with_adds_and_overrides+set}" = set; then :
30921  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
30922$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30923fi
30924
30925
30926
30927
30928# Check whether --with-override-langtools was given.
30929if test "${with_override_langtools+set}" = set; then :
30930  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30931$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30932fi
30933
30934
30935
30936
30937# Check whether --with-override-corba was given.
30938if test "${with_override_corba+set}" = set; then :
30939  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30940$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30941fi
30942
30943
30944
30945
30946# Check whether --with-override-jaxp was given.
30947if test "${with_override_jaxp+set}" = set; then :
30948  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30949$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30950fi
30951
30952
30953
30954
30955# Check whether --with-override-jaxws was given.
30956if test "${with_override_jaxws+set}" = set; then :
30957  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30958$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30959fi
30960
30961
30962
30963
30964# Check whether --with-override-hotspot was given.
30965if test "${with_override_hotspot+set}" = set; then :
30966  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30967$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30968fi
30969
30970
30971
30972
30973# Check whether --with-override-nashorn was given.
30974if test "${with_override_nashorn+set}" = set; then :
30975  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30976$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30977fi
30978
30979
30980
30981
30982# Check whether --with-override-jdk was given.
30983if test "${with_override_jdk+set}" = set; then :
30984  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30985$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30986fi
30987
30988
30989
30990
30991  BUILD_OUTPUT="$OUTPUT_ROOT"
30992
30993
30994  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
30995  BUILD_HOTSPOT=true
30996
30997
30998
30999# Check whether --with-import-hotspot was given.
31000if test "${with_import_hotspot+set}" = set; then :
31001  withval=$with_import_hotspot;
31002fi
31003
31004  if test "x$with_import_hotspot" != x; then
31005    CURDIR="$PWD"
31006    cd "$with_import_hotspot"
31007    HOTSPOT_DIST="`pwd`"
31008    cd "$CURDIR"
31009    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
31010      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
31011    fi
31012    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
31013$as_echo_n "checking if hotspot should be imported... " >&6; }
31014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
31015$as_echo "yes from $HOTSPOT_DIST" >&6; }
31016    BUILD_HOTSPOT=false
31017  fi
31018
31019  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31020
31021
31022
31023
31024# Check whether --with-import-modules was given.
31025if test "${with_import_modules+set}" = set; then :
31026  withval=$with_import_modules;
31027fi
31028
31029
31030  if test "x$with_import_modules" != x \
31031      && test "x$with_import_modules" != "xno"; then
31032    if test -d "$with_import_modules"; then
31033      IMPORT_MODULES_TOPDIR="$with_import_modules"
31034
31035  # Only process if variable expands to non-empty
31036
31037  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31038    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31039
31040  # Input might be given as Windows format, start by converting to
31041  # unix format.
31042  path="$IMPORT_MODULES_TOPDIR"
31043  new_path=`$CYGPATH -u "$path"`
31044
31045  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31046  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31047  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31048  # "foo.exe" is OK but "foo" is an error.
31049  #
31050  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31051  # It is also a way to make sure we got the proper file name for the real test later on.
31052  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31053  if test "x$test_shortpath" = x; then
31054    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31055$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31056    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31057  fi
31058
31059  # Call helper function which possibly converts this using DOS-style short mode.
31060  # If so, the updated path is stored in $new_path.
31061
31062  input_path="$new_path"
31063  # Check if we need to convert this using DOS-style short mode. If the path
31064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31065  # take no chances and rewrite it.
31066  # Note: m4 eats our [], so we need to use [ and ] instead.
31067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31068  if test "x$has_forbidden_chars" != x; then
31069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31070    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31071    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31072    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31073      # Going to short mode and back again did indeed matter. Since short mode is
31074      # case insensitive, let's make it lowercase to improve readability.
31075      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31076      # Now convert it back to Unix-style (cygpath)
31077      input_path=`$CYGPATH -u "$shortmode_path"`
31078      new_path="$input_path"
31079    fi
31080  fi
31081
31082  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31083  if test "x$test_cygdrive_prefix" = x; then
31084    # As a simple fix, exclude /usr/bin since it's not a real path.
31085    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31086      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31087      # a path prefixed by /cygdrive for fixpath to work.
31088      new_path="$CYGWIN_ROOT_PATH$input_path"
31089    fi
31090  fi
31091
31092
31093  if test "x$path" != "x$new_path"; then
31094    IMPORT_MODULES_TOPDIR="$new_path"
31095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31096$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31097  fi
31098
31099    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31100
31101  path="$IMPORT_MODULES_TOPDIR"
31102  has_colon=`$ECHO $path | $GREP ^.:`
31103  new_path="$path"
31104  if test "x$has_colon" = x; then
31105    # Not in mixed or Windows style, start by that.
31106    new_path=`cmd //c echo $path`
31107  fi
31108
31109
31110  input_path="$new_path"
31111  # Check if we need to convert this using DOS-style short mode. If the path
31112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31113  # take no chances and rewrite it.
31114  # Note: m4 eats our [], so we need to use [ and ] instead.
31115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31116  if test "x$has_forbidden_chars" != x; then
31117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31118    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31119  fi
31120
31121
31122  windows_path="$new_path"
31123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31124    unix_path=`$CYGPATH -u "$windows_path"`
31125    new_path="$unix_path"
31126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31128    new_path="$unix_path"
31129  fi
31130
31131  if test "x$path" != "x$new_path"; then
31132    IMPORT_MODULES_TOPDIR="$new_path"
31133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31134$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31135  fi
31136
31137  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31138  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31139
31140    else
31141      # We're on a unix platform. Hooray! :)
31142      path="$IMPORT_MODULES_TOPDIR"
31143      has_space=`$ECHO "$path" | $GREP " "`
31144      if test "x$has_space" != x; then
31145        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31146$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31147        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31148      fi
31149
31150      # Use eval to expand a potential ~
31151      eval path="$path"
31152      if test ! -f "$path" && test ! -d "$path"; then
31153        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31154      fi
31155
31156      if test -d "$path"; then
31157        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31158      else
31159        dir="`$DIRNAME "$path"`"
31160        base="`$BASENAME "$path"`"
31161        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31162      fi
31163    fi
31164  fi
31165
31166    elif test -e "$with_import_modules"; then
31167      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31168      $RM -rf "$IMPORT_MODULES_TOPDIR"
31169      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31170      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31171        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31172      fi
31173    else
31174      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31175    fi
31176  fi
31177
31178  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31179    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31180  fi
31181  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31182    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31183  fi
31184  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31185    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31186  fi
31187  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31188    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31189  fi
31190  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31191    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31192  fi
31193  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31194    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31195  fi
31196
31197
31198
31199
31200
31201
31202
31203
31204
31205###############################################################################
31206#
31207# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31208# native code.
31209#
31210###############################################################################
31211
31212# See if we are doing a complete static build or not
31213
31214  # Check whether --enable-static-build was given.
31215if test "${enable_static_build+set}" = set; then :
31216  enableval=$enable_static_build;
31217fi
31218
31219  STATIC_BUILD=false
31220  if test "x$enable_static_build" = "xyes"; then
31221    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31222$as_echo_n "checking if static build is enabled... " >&6; }
31223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31224$as_echo "yes" >&6; }
31225    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31226      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31227    fi
31228    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31229    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31230    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31231    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31232    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31233    STATIC_BUILD=true
31234  elif test "x$enable_static_build" = "xno"; then
31235    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31236$as_echo_n "checking if static build is enabled... " >&6; }
31237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31238$as_echo "no" >&6; }
31239  elif test "x$enable_static_build" != "x"; then
31240    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31241  fi
31242
31243
31244
31245
31246# First determine the toolchain type (compiler family)
31247
31248
31249# Check whether --with-toolchain-type was given.
31250if test "${with_toolchain_type+set}" = set; then :
31251  withval=$with_toolchain_type;
31252fi
31253
31254
31255  # Use indirect variable referencing
31256  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31257  VALID_TOOLCHAINS=${!toolchain_var_name}
31258
31259  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31260    if test -n "$XCODEBUILD"; then
31261      # On Mac OS X, default toolchain to clang after Xcode 5
31262      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31263      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31264      if test $? -ne 0; then
31265        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31266      fi
31267      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31268          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31269          $CUT -f 1 -d .`
31270      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31271$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31272      if test $XCODE_MAJOR_VERSION -ge 5; then
31273          DEFAULT_TOOLCHAIN="clang"
31274      else
31275          DEFAULT_TOOLCHAIN="gcc"
31276      fi
31277    else
31278      # If Xcode is not installed, but the command line tools are
31279      # then we can't run xcodebuild. On these systems we should
31280      # default to clang
31281      DEFAULT_TOOLCHAIN="clang"
31282    fi
31283  else
31284    # First toolchain type in the list is the default
31285    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31286  fi
31287
31288  if test "x$with_toolchain_type" = xlist; then
31289    # List all toolchains
31290    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31291$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31292    for toolchain in $VALID_TOOLCHAINS; do
31293      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31294      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31295      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31296    done
31297
31298    exit 0
31299  elif test "x$with_toolchain_type" != x; then
31300    # User override; check that it is valid
31301    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31302      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31303$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31304      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31305$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31306      as_fn_error $? "Cannot continue." "$LINENO" 5
31307    fi
31308    TOOLCHAIN_TYPE=$with_toolchain_type
31309  else
31310    # No flag given, use default
31311    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31312  fi
31313
31314
31315  TOOLCHAIN_CC_BINARY_clang="clang"
31316  TOOLCHAIN_CC_BINARY_gcc="gcc"
31317  TOOLCHAIN_CC_BINARY_microsoft="cl"
31318  TOOLCHAIN_CC_BINARY_solstudio="cc"
31319  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31320
31321  TOOLCHAIN_CXX_BINARY_clang="clang++"
31322  TOOLCHAIN_CXX_BINARY_gcc="g++"
31323  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31324  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31325  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31326
31327  # Use indirect variable referencing
31328  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31329  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31330  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31331  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31332  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31333  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31334  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31335  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31336
31337
31338  # Define filename patterns
31339  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31340    LIBRARY_PREFIX=
31341    SHARED_LIBRARY_SUFFIX='.dll'
31342    STATIC_LIBRARY_SUFFIX='.lib'
31343    SHARED_LIBRARY='$1.dll'
31344    STATIC_LIBRARY='$1.lib'
31345    OBJ_SUFFIX='.obj'
31346    EXE_SUFFIX='.exe'
31347  else
31348    LIBRARY_PREFIX=lib
31349    SHARED_LIBRARY_SUFFIX='.so'
31350    STATIC_LIBRARY_SUFFIX='.a'
31351    SHARED_LIBRARY='lib$1.so'
31352    STATIC_LIBRARY='lib$1.a'
31353    OBJ_SUFFIX='.o'
31354    EXE_SUFFIX=''
31355    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31356      # For full static builds, we're overloading the SHARED_LIBRARY
31357      # variables in order to limit the amount of changes required.
31358      # It would be better to remove SHARED and just use LIBRARY and
31359      # LIBRARY_SUFFIX for libraries that can be built either
31360      # shared or static and use STATIC_* for libraries that are
31361      # always built statically.
31362      if test "x$STATIC_BUILD" = xtrue; then
31363        SHARED_LIBRARY='lib$1.a'
31364        SHARED_LIBRARY_SUFFIX='.a'
31365      else
31366        SHARED_LIBRARY='lib$1.dylib'
31367        SHARED_LIBRARY_SUFFIX='.dylib'
31368      fi
31369    fi
31370  fi
31371
31372
31373
31374
31375
31376
31377
31378
31379
31380
31381  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31382    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31383$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31384  else
31385    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31386$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31387  fi
31388
31389
31390# User supplied flags should be used when configure detects compilers
31391
31392  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31393    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31394$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31395  fi
31396
31397  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31398    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31399$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31400  fi
31401
31402  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31403    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31404$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31405  fi
31406
31407
31408# Check whether --with-extra-cflags was given.
31409if test "${with_extra_cflags+set}" = set; then :
31410  withval=$with_extra_cflags;
31411fi
31412
31413
31414
31415# Check whether --with-extra-cxxflags was given.
31416if test "${with_extra_cxxflags+set}" = set; then :
31417  withval=$with_extra_cxxflags;
31418fi
31419
31420
31421
31422# Check whether --with-extra-ldflags was given.
31423if test "${with_extra_ldflags+set}" = set; then :
31424  withval=$with_extra_ldflags;
31425fi
31426
31427
31428  EXTRA_CFLAGS="$with_extra_cflags"
31429  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31430  EXTRA_LDFLAGS="$with_extra_ldflags"
31431
31432  # Hotspot needs these set in their legacy form
31433  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31434  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31435  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31436
31437
31438
31439
31440
31441
31442
31443
31444
31445  # The global CFLAGS and LDLAGS variables are used by configure tests and
31446  # should include the extra parameters
31447  CFLAGS="$EXTRA_CFLAGS"
31448  CXXFLAGS="$EXTRA_CXXFLAGS"
31449  LDFLAGS="$EXTRA_LDFLAGS"
31450  CPPFLAGS=""
31451
31452# The sysroot cflags are needed for configure to be able to run the compilers
31453
31454  if test "x$SYSROOT" != "x"; then
31455    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31456      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31457        # Solaris Studio does not have a concept of sysroot. Instead we must
31458        # make sure the default include and lib dirs are appended to each
31459        # compile and link command line. Must also add -I-xbuiltin to enable
31460        # inlining of system functions and intrinsics.
31461        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31462        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31463            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31464      fi
31465    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31466      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31467      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31468    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31469      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31470      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31471    fi
31472    # Propagate the sysroot args to hotspot
31473    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31474    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31475    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31476    # The global CFLAGS and LDFLAGS variables need these for configure to function
31477    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31478    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31479    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31480    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31481  fi
31482
31483  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31484    # We also need -iframework<path>/System/Library/Frameworks
31485    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31486    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31487    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31488    # set this here so it doesn't have to be peppered throughout the forest
31489    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31490    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31491  fi
31492
31493
31494
31495
31496
31497# Then detect the actual binaries needed
31498
31499  # FIXME: Is this needed?
31500  ac_ext=cpp
31501ac_cpp='$CXXCPP $CPPFLAGS'
31502ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31503ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31504ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31505
31506
31507  # Store the CFLAGS etc passed to the configure script.
31508  ORG_CFLAGS="$CFLAGS"
31509  ORG_CXXFLAGS="$CXXFLAGS"
31510
31511  # autoconf magic only relies on PATH, so update it if tools dir is specified
31512  OLD_PATH="$PATH"
31513
31514  # On Windows, we need to detect the visual studio installation first.
31515  # This will change the PATH, but we need to keep that new PATH even
31516  # after toolchain detection is done, since the compiler (on x86) uses
31517  # it for DLL resolution in runtime.
31518  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31519      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31520
31521  # Store path to cygwin link.exe to help excluding it when searching for
31522  # VS linker. This must be done before changing the PATH when looking for VS.
31523  # Extract the first word of "link", so it can be a program name with args.
31524set dummy link; ac_word=$2
31525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31526$as_echo_n "checking for $ac_word... " >&6; }
31527if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31528  $as_echo_n "(cached) " >&6
31529else
31530  case $CYGWIN_LINK in
31531  [\\/]* | ?:[\\/]*)
31532  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31533  ;;
31534  *)
31535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31536for as_dir in $PATH
31537do
31538  IFS=$as_save_IFS
31539  test -z "$as_dir" && as_dir=.
31540    for ac_exec_ext in '' $ac_executable_extensions; do
31541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31542    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31544    break 2
31545  fi
31546done
31547  done
31548IFS=$as_save_IFS
31549
31550  ;;
31551esac
31552fi
31553CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31554if test -n "$CYGWIN_LINK"; then
31555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31556$as_echo "$CYGWIN_LINK" >&6; }
31557else
31558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31559$as_echo "no" >&6; }
31560fi
31561
31562
31563  if test "x$CYGWIN_LINK" != x; then
31564    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31565$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31566    "$CYGWIN_LINK" --version > /dev/null
31567    if test $? -eq 0 ; then
31568      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31569$as_echo "yes" >&6; }
31570    else
31571      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31572$as_echo "no" >&6; }
31573      # This might be the VS linker. Don't exclude it later on.
31574      CYGWIN_LINK=""
31575    fi
31576  fi
31577
31578  # First-hand choice is to locate and run the vsvars bat file.
31579
31580
31581# Check whether --with-toolchain-version was given.
31582if test "${with_toolchain_version+set}" = set; then :
31583  withval=$with_toolchain_version;
31584fi
31585
31586
31587  if test "x$with_toolchain_version" = xlist; then
31588    # List all toolchains
31589    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31590$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31591    for version in $VALID_VS_VERSIONS; do
31592      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31593      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31594    done
31595
31596    exit 0
31597  elif test "x$DEVKIT_VS_VERSION" != x; then
31598    VS_VERSION=$DEVKIT_VS_VERSION
31599    TOOLCHAIN_VERSION=$VS_VERSION
31600    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31601    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31602    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31603    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31604    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31605    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31606
31607    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31608    # can still be exported as INCLUDE for compiler invocations without
31609    # SYSROOT_CFLAGS
31610    OLDIFS="$IFS"
31611    IFS=";"
31612    for i in $DEVKIT_VS_INCLUDE; do
31613      ipath=$i
31614
31615  unix_path="$ipath"
31616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31617    windows_path=`$CYGPATH -m "$unix_path"`
31618    ipath="$windows_path"
31619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31620    windows_path=`cmd //c echo $unix_path`
31621    ipath="$windows_path"
31622  fi
31623
31624      VS_INCLUDE="$VS_INCLUDE;$ipath"
31625    done
31626    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31627    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31628    for i in $DEVKIT_VS_LIB; do
31629      libpath=$i
31630
31631  unix_path="$libpath"
31632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31633    windows_path=`$CYGPATH -m "$unix_path"`
31634    libpath="$windows_path"
31635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31636    windows_path=`cmd //c echo $unix_path`
31637    libpath="$windows_path"
31638  fi
31639
31640      VS_LIB="$VS_LIB;$libpath"
31641    done
31642    IFS="$OLDIFS"
31643
31644    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31645$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31646
31647  elif test "x$with_toolchain_version" != x; then
31648    # User override; check that it is valid
31649    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31650      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31651$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31652      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31653$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31654      as_fn_error $? "Cannot continue." "$LINENO" 5
31655    fi
31656    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31657  else
31658    # No flag given, use default
31659    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31660  fi
31661
31662  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31663
31664  VS_VERSION="$VS_VERSION"
31665  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31666  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31667  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31668  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31669
31670  # When using --with-tools-dir, assume it points to the correct and default
31671  # version of Visual Studio or that --with-toolchain-version was also set.
31672  if test "x$with_tools_dir" != x; then
31673
31674  if test "x$VS_ENV_CMD" = x; then
31675    VS_VERSION="${VS_VERSION}"
31676    VS_BASE="$with_tools_dir/../.."
31677    METHOD="--with-tools-dir"
31678
31679    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31680      VCVARSFILE="vc/bin/vcvars32.bat"
31681    else
31682      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31683    fi
31684
31685
31686  windows_path="$VS_BASE"
31687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31688    unix_path=`$CYGPATH -u "$windows_path"`
31689    VS_BASE="$unix_path"
31690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31692    VS_BASE="$unix_path"
31693  fi
31694
31695    if test -d "$VS_BASE"; then
31696      if test -f "$VS_BASE/$VCVARSFILE"; then
31697        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31698$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31699        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31700        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31701        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31702        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31703      else
31704        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31705$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31706        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31707$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31708      fi
31709    fi
31710  fi
31711
31712
31713  if test "x$VS_ENV_CMD" = x; then
31714    VS_VERSION="${VS_VERSION}"
31715    VS_BASE="$with_tools_dir/../../.."
31716    METHOD="--with-tools-dir"
31717
31718    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31719      VCVARSFILE="vc/bin/vcvars32.bat"
31720    else
31721      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31722    fi
31723
31724
31725  windows_path="$VS_BASE"
31726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31727    unix_path=`$CYGPATH -u "$windows_path"`
31728    VS_BASE="$unix_path"
31729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31731    VS_BASE="$unix_path"
31732  fi
31733
31734    if test -d "$VS_BASE"; then
31735      if test -f "$VS_BASE/$VCVARSFILE"; then
31736        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31737$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31738        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31739        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31740        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31741        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31742      else
31743        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31744$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31745        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31746$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31747      fi
31748    fi
31749  fi
31750
31751    if test "x$VS_ENV_CMD" = x; then
31752      # Having specified an argument which is incorrect will produce an instant failure;
31753      # we should not go on looking
31754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31755$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31756      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31757$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31758      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31759$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31760      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31761    fi
31762  fi
31763
31764  VS_ENV_CMD=""
31765  VS_ENV_ARGS=""
31766
31767  if test "x$VS_COMNTOOLS" != x; then
31768
31769  if test "x$VS_ENV_CMD" = x; then
31770    VS_VERSION="${VS_VERSION}"
31771    VS_BASE="$VS_COMNTOOLS/../.."
31772    METHOD="$VS_COMNTOOLS_VAR variable"
31773
31774    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31775      VCVARSFILE="vc/bin/vcvars32.bat"
31776    else
31777      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31778    fi
31779
31780
31781  windows_path="$VS_BASE"
31782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31783    unix_path=`$CYGPATH -u "$windows_path"`
31784    VS_BASE="$unix_path"
31785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31787    VS_BASE="$unix_path"
31788  fi
31789
31790    if test -d "$VS_BASE"; then
31791      if test -f "$VS_BASE/$VCVARSFILE"; then
31792        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31793$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31794        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31795        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31796        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31797        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31798      else
31799        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31800$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31801        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31802$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31803      fi
31804    fi
31805  fi
31806
31807  fi
31808  if test "x$PROGRAMFILES" != x; then
31809
31810  if test "x$VS_ENV_CMD" = x; then
31811    VS_VERSION="${VS_VERSION}"
31812    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31813    METHOD="well-known name"
31814
31815    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31816      VCVARSFILE="vc/bin/vcvars32.bat"
31817    else
31818      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31819    fi
31820
31821
31822  windows_path="$VS_BASE"
31823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31824    unix_path=`$CYGPATH -u "$windows_path"`
31825    VS_BASE="$unix_path"
31826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31828    VS_BASE="$unix_path"
31829  fi
31830
31831    if test -d "$VS_BASE"; then
31832      if test -f "$VS_BASE/$VCVARSFILE"; then
31833        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31834$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31835        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31836        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31837        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31838        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31839      else
31840        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31841$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31842        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31843$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31844      fi
31845    fi
31846  fi
31847
31848  fi
31849  # Work around the insanely named ProgramFiles(x86) env variable
31850  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31851  if test "x$PROGRAMFILES_X86" != x; then
31852
31853  if test "x$VS_ENV_CMD" = x; then
31854    VS_VERSION="${VS_VERSION}"
31855    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31856    METHOD="well-known name"
31857
31858    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31859      VCVARSFILE="vc/bin/vcvars32.bat"
31860    else
31861      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31862    fi
31863
31864
31865  windows_path="$VS_BASE"
31866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31867    unix_path=`$CYGPATH -u "$windows_path"`
31868    VS_BASE="$unix_path"
31869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31871    VS_BASE="$unix_path"
31872  fi
31873
31874    if test -d "$VS_BASE"; then
31875      if test -f "$VS_BASE/$VCVARSFILE"; then
31876        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31877$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31878        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31879        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31880        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31881        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31882      else
31883        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31884$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31885        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31886$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31887      fi
31888    fi
31889  fi
31890
31891  fi
31892
31893  if test "x$VS_ENV_CMD" = x; then
31894    VS_VERSION="${VS_VERSION}"
31895    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31896    METHOD="well-known name"
31897
31898    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31899      VCVARSFILE="vc/bin/vcvars32.bat"
31900    else
31901      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31902    fi
31903
31904
31905  windows_path="$VS_BASE"
31906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31907    unix_path=`$CYGPATH -u "$windows_path"`
31908    VS_BASE="$unix_path"
31909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31911    VS_BASE="$unix_path"
31912  fi
31913
31914    if test -d "$VS_BASE"; then
31915      if test -f "$VS_BASE/$VCVARSFILE"; then
31916        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31917$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31918        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31919        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31920        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31921        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31922      else
31923        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31924$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31925        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31926$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31927      fi
31928    fi
31929  fi
31930
31931
31932  if test "x$VS_ENV_CMD" = x; then
31933    VS_VERSION="${VS_VERSION}"
31934    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31935    METHOD="well-known name"
31936
31937    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31938      VCVARSFILE="vc/bin/vcvars32.bat"
31939    else
31940      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31941    fi
31942
31943
31944  windows_path="$VS_BASE"
31945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31946    unix_path=`$CYGPATH -u "$windows_path"`
31947    VS_BASE="$unix_path"
31948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31950    VS_BASE="$unix_path"
31951  fi
31952
31953    if test -d "$VS_BASE"; then
31954      if test -f "$VS_BASE/$VCVARSFILE"; then
31955        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31956$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31957        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31958        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31959        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31960        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31961      else
31962        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31963$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31964        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31965$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31966      fi
31967    fi
31968  fi
31969
31970
31971  if test "x$SDK_INSTALL_DIR" != x; then
31972    if test "x$ProgramW6432" != x; then
31973
31974  if test "x$VS_ENV_CMD" = x; then
31975    VS_VERSION="${VS_VERSION}"
31976    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31977    METHOD="well-known name"
31978
31979  windows_path="$WIN_SDK_BASE"
31980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31981    unix_path=`$CYGPATH -u "$windows_path"`
31982    WIN_SDK_BASE="$unix_path"
31983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31985    WIN_SDK_BASE="$unix_path"
31986  fi
31987
31988    if test -d "$WIN_SDK_BASE"; then
31989      # There have been cases of partial or broken SDK installations. A missing
31990      # lib dir is not going to work.
31991      if test ! -d "$WIN_SDK_BASE/lib"; then
31992        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31993$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31994        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31995$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31996      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31997        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31998$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31999        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32000        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32001          VS_ENV_ARGS="/x86"
32002        else
32003          VS_ENV_ARGS="/x64"
32004        fi
32005        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32006        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32007        # TODO: improve detection for other versions of SDK
32008        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32009      else
32010        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32011$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32012        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32013$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32014      fi
32015    fi
32016  fi
32017
32018    fi
32019    if test "x$PROGRAMW6432" != x; then
32020
32021  if test "x$VS_ENV_CMD" = x; then
32022    VS_VERSION="${VS_VERSION}"
32023    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32024    METHOD="well-known name"
32025
32026  windows_path="$WIN_SDK_BASE"
32027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32028    unix_path=`$CYGPATH -u "$windows_path"`
32029    WIN_SDK_BASE="$unix_path"
32030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32032    WIN_SDK_BASE="$unix_path"
32033  fi
32034
32035    if test -d "$WIN_SDK_BASE"; then
32036      # There have been cases of partial or broken SDK installations. A missing
32037      # lib dir is not going to work.
32038      if test ! -d "$WIN_SDK_BASE/lib"; then
32039        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32040$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32041        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32042$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32043      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32044        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32045$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32046        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32047        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32048          VS_ENV_ARGS="/x86"
32049        else
32050          VS_ENV_ARGS="/x64"
32051        fi
32052        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32053        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32054        # TODO: improve detection for other versions of SDK
32055        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32056      else
32057        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32058$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32059        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32060$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32061      fi
32062    fi
32063  fi
32064
32065    fi
32066    if test "x$PROGRAMFILES" != x; then
32067
32068  if test "x$VS_ENV_CMD" = x; then
32069    VS_VERSION="${VS_VERSION}"
32070    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32071    METHOD="well-known name"
32072
32073  windows_path="$WIN_SDK_BASE"
32074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32075    unix_path=`$CYGPATH -u "$windows_path"`
32076    WIN_SDK_BASE="$unix_path"
32077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32079    WIN_SDK_BASE="$unix_path"
32080  fi
32081
32082    if test -d "$WIN_SDK_BASE"; then
32083      # There have been cases of partial or broken SDK installations. A missing
32084      # lib dir is not going to work.
32085      if test ! -d "$WIN_SDK_BASE/lib"; then
32086        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32087$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32088        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32089$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32090      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32091        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32092$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32093        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32094        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32095          VS_ENV_ARGS="/x86"
32096        else
32097          VS_ENV_ARGS="/x64"
32098        fi
32099        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32100        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32101        # TODO: improve detection for other versions of SDK
32102        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32103      else
32104        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32105$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32106        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32107$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32108      fi
32109    fi
32110  fi
32111
32112    fi
32113
32114  if test "x$VS_ENV_CMD" = x; then
32115    VS_VERSION="${VS_VERSION}"
32116    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32117    METHOD="well-known name"
32118
32119  windows_path="$WIN_SDK_BASE"
32120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32121    unix_path=`$CYGPATH -u "$windows_path"`
32122    WIN_SDK_BASE="$unix_path"
32123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32125    WIN_SDK_BASE="$unix_path"
32126  fi
32127
32128    if test -d "$WIN_SDK_BASE"; then
32129      # There have been cases of partial or broken SDK installations. A missing
32130      # lib dir is not going to work.
32131      if test ! -d "$WIN_SDK_BASE/lib"; then
32132        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32133$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32134        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32135$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32136      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32137        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32138$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32139        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32140        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32141          VS_ENV_ARGS="/x86"
32142        else
32143          VS_ENV_ARGS="/x64"
32144        fi
32145        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32146        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32147        # TODO: improve detection for other versions of SDK
32148        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32149      else
32150        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32151$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32152        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32153$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32154      fi
32155    fi
32156  fi
32157
32158
32159  if test "x$VS_ENV_CMD" = x; then
32160    VS_VERSION="${VS_VERSION}"
32161    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32162    METHOD="well-known name"
32163
32164  windows_path="$WIN_SDK_BASE"
32165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32166    unix_path=`$CYGPATH -u "$windows_path"`
32167    WIN_SDK_BASE="$unix_path"
32168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32170    WIN_SDK_BASE="$unix_path"
32171  fi
32172
32173    if test -d "$WIN_SDK_BASE"; then
32174      # There have been cases of partial or broken SDK installations. A missing
32175      # lib dir is not going to work.
32176      if test ! -d "$WIN_SDK_BASE/lib"; then
32177        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32178$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32179        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32180$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32181      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32182        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32183$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32184        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32185        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32186          VS_ENV_ARGS="/x86"
32187        else
32188          VS_ENV_ARGS="/x64"
32189        fi
32190        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32191        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32192        # TODO: improve detection for other versions of SDK
32193        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32194      else
32195        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32196$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32197        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32198$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32199      fi
32200    fi
32201  fi
32202
32203  fi
32204
32205    if test "x$VS_ENV_CMD" != x; then
32206      TOOLCHAIN_VERSION=$VS_VERSION
32207      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32208      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32209      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32210      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32211      # The rest of the variables are already evaled while probing
32212      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32213$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32214      break
32215    fi
32216  done
32217
32218
32219  # If we have a devkit, skip all of the below.
32220  if test "x$DEVKIT_VS_VERSION" = x; then
32221    if test "x$VS_ENV_CMD" != x; then
32222      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32223
32224  # Only process if variable expands to non-empty
32225
32226  if test "x$VS_ENV_CMD" != x; then
32227    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32228
32229  # First separate the path from the arguments. This will split at the first
32230  # space.
32231  complete="$VS_ENV_CMD"
32232  path="${complete%% *}"
32233  tmp="$complete EOL"
32234  arguments="${tmp#* }"
32235
32236  # Input might be given as Windows format, start by converting to
32237  # unix format.
32238  new_path=`$CYGPATH -u "$path"`
32239
32240  # Now try to locate executable using which
32241  new_path=`$WHICH "$new_path" 2> /dev/null`
32242  # bat and cmd files are not always considered executable in cygwin causing which
32243  # to not find them
32244  if test "x$new_path" = x \
32245      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32246      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32247    new_path=`$CYGPATH -u "$path"`
32248  fi
32249  if test "x$new_path" = x; then
32250    # Oops. Which didn't find the executable.
32251    # The splitting of arguments from the executable at a space might have been incorrect,
32252    # since paths with space are more likely in Windows. Give it another try with the whole
32253    # argument.
32254    path="$complete"
32255    arguments="EOL"
32256    new_path=`$CYGPATH -u "$path"`
32257    new_path=`$WHICH "$new_path" 2> /dev/null`
32258    # bat and cmd files are not always considered executable in cygwin causing which
32259    # to not find them
32260    if test "x$new_path" = x \
32261        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32262        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32263      new_path=`$CYGPATH -u "$path"`
32264    fi
32265    if test "x$new_path" = x; then
32266      # It's still not found. Now this is an unrecoverable error.
32267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32268$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32269      has_space=`$ECHO "$complete" | $GREP " "`
32270      if test "x$has_space" != x; then
32271        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32272$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32273      fi
32274      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32275    fi
32276  fi
32277
32278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32281  # "foo.exe" is OK but "foo" is an error.
32282  #
32283  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32284  # It is also a way to make sure we got the proper file name for the real test later on.
32285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32286  if test "x$test_shortpath" = x; then
32287    # Short path failed, file does not exist as specified.
32288    # Try adding .exe or .cmd
32289    if test -f "${new_path}.exe"; then
32290      input_to_shortpath="${new_path}.exe"
32291    elif test -f "${new_path}.cmd"; then
32292      input_to_shortpath="${new_path}.cmd"
32293    else
32294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32295$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32296      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32297$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32298      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32299    fi
32300  else
32301    input_to_shortpath="$new_path"
32302  fi
32303
32304  # Call helper function which possibly converts this using DOS-style short mode.
32305  # If so, the updated path is stored in $new_path.
32306  new_path="$input_to_shortpath"
32307
32308  input_path="$input_to_shortpath"
32309  # Check if we need to convert this using DOS-style short mode. If the path
32310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32311  # take no chances and rewrite it.
32312  # Note: m4 eats our [], so we need to use [ and ] instead.
32313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32314  if test "x$has_forbidden_chars" != x; then
32315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32319      # Going to short mode and back again did indeed matter. Since short mode is
32320      # case insensitive, let's make it lowercase to improve readability.
32321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32322      # Now convert it back to Unix-style (cygpath)
32323      input_path=`$CYGPATH -u "$shortmode_path"`
32324      new_path="$input_path"
32325    fi
32326  fi
32327
32328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32329  if test "x$test_cygdrive_prefix" = x; then
32330    # As a simple fix, exclude /usr/bin since it's not a real path.
32331    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32333      # a path prefixed by /cygdrive for fixpath to work.
32334      new_path="$CYGWIN_ROOT_PATH$input_path"
32335    fi
32336  fi
32337
32338  # remove trailing .exe if any
32339  new_path="${new_path/%.exe/}"
32340
32341    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32342
32343  # First separate the path from the arguments. This will split at the first
32344  # space.
32345  complete="$VS_ENV_CMD"
32346  path="${complete%% *}"
32347  tmp="$complete EOL"
32348  arguments="${tmp#* }"
32349
32350  # Input might be given as Windows format, start by converting to
32351  # unix format.
32352  new_path="$path"
32353
32354  windows_path="$new_path"
32355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32356    unix_path=`$CYGPATH -u "$windows_path"`
32357    new_path="$unix_path"
32358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32360    new_path="$unix_path"
32361  fi
32362
32363
32364  # Now try to locate executable using which
32365  new_path=`$WHICH "$new_path" 2> /dev/null`
32366
32367  if test "x$new_path" = x; then
32368    # Oops. Which didn't find the executable.
32369    # The splitting of arguments from the executable at a space might have been incorrect,
32370    # since paths with space are more likely in Windows. Give it another try with the whole
32371    # argument.
32372    path="$complete"
32373    arguments="EOL"
32374    new_path="$path"
32375
32376  windows_path="$new_path"
32377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32378    unix_path=`$CYGPATH -u "$windows_path"`
32379    new_path="$unix_path"
32380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32382    new_path="$unix_path"
32383  fi
32384
32385
32386    new_path=`$WHICH "$new_path" 2> /dev/null`
32387    # bat and cmd files are not always considered executable in MSYS causing which
32388    # to not find them
32389    if test "x$new_path" = x \
32390        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32391        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32392      new_path="$path"
32393
32394  windows_path="$new_path"
32395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32396    unix_path=`$CYGPATH -u "$windows_path"`
32397    new_path="$unix_path"
32398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32400    new_path="$unix_path"
32401  fi
32402
32403    fi
32404
32405    if test "x$new_path" = x; then
32406      # It's still not found. Now this is an unrecoverable error.
32407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32408$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32409      has_space=`$ECHO "$complete" | $GREP " "`
32410      if test "x$has_space" != x; then
32411        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32412$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32413      fi
32414      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32415    fi
32416  fi
32417
32418  # Now new_path has a complete unix path to the binary
32419  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32420    # Keep paths in /bin as-is, but remove trailing .exe if any
32421    new_path="${new_path/%.exe/}"
32422    # Do not save /bin paths to all_fixpath_prefixes!
32423  else
32424    # Not in mixed or Windows style, start by that.
32425    new_path=`cmd //c echo $new_path`
32426
32427  input_path="$new_path"
32428  # Check if we need to convert this using DOS-style short mode. If the path
32429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32430  # take no chances and rewrite it.
32431  # Note: m4 eats our [], so we need to use [ and ] instead.
32432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32433  if test "x$has_forbidden_chars" != x; then
32434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32436  fi
32437
32438    # Output is in $new_path
32439
32440  windows_path="$new_path"
32441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32442    unix_path=`$CYGPATH -u "$windows_path"`
32443    new_path="$unix_path"
32444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32446    new_path="$unix_path"
32447  fi
32448
32449    # remove trailing .exe if any
32450    new_path="${new_path/%.exe/}"
32451
32452    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32453    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32454  fi
32455
32456    else
32457      # We're on a unix platform. Hooray! :)
32458      # First separate the path from the arguments. This will split at the first
32459      # space.
32460      complete="$VS_ENV_CMD"
32461      path="${complete%% *}"
32462      tmp="$complete EOL"
32463      arguments="${tmp#* }"
32464
32465      # Cannot rely on the command "which" here since it doesn't always work.
32466      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32467      if test -z "$is_absolute_path"; then
32468        # Path to executable is not absolute. Find it.
32469        IFS_save="$IFS"
32470        IFS=:
32471        for p in $PATH; do
32472          if test -f "$p/$path" && test -x "$p/$path"; then
32473            new_path="$p/$path"
32474            break
32475          fi
32476        done
32477        IFS="$IFS_save"
32478      else
32479        # This is an absolute path, we can use it without further modifications.
32480        new_path="$path"
32481      fi
32482
32483      if test "x$new_path" = x; then
32484        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32485$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32486        has_space=`$ECHO "$complete" | $GREP " "`
32487        if test "x$has_space" != x; then
32488          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32489$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32490        fi
32491        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32492      fi
32493    fi
32494
32495    # Now join together the path and the arguments once again
32496    if test "x$arguments" != xEOL; then
32497      new_complete="$new_path ${arguments% *}"
32498    else
32499      new_complete="$new_path"
32500    fi
32501
32502    if test "x$complete" != "x$new_complete"; then
32503      VS_ENV_CMD="$new_complete"
32504      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32505$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32506    fi
32507  fi
32508
32509
32510      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32511      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32512$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32513
32514      # We need to create a couple of temporary files.
32515      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32516      $MKDIR -p $VS_ENV_TMP_DIR
32517
32518      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32519      # Instead create a shell script which will set the relevant variables when run.
32520      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32521
32522  unix_path="$WINPATH_VS_ENV_CMD"
32523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32524    windows_path=`$CYGPATH -m "$unix_path"`
32525    WINPATH_VS_ENV_CMD="$windows_path"
32526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32527    windows_path=`cmd //c echo $unix_path`
32528    WINPATH_VS_ENV_CMD="$windows_path"
32529  fi
32530
32531      WINPATH_BASH="$BASH"
32532
32533  unix_path="$WINPATH_BASH"
32534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32535    windows_path=`$CYGPATH -m "$unix_path"`
32536    WINPATH_BASH="$windows_path"
32537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32538    windows_path=`cmd //c echo $unix_path`
32539    WINPATH_BASH="$windows_path"
32540  fi
32541
32542
32543      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32544      # script (executable by bash) that will setup the important variables.
32545      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32546      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32547      # This will end up something like:
32548      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32549      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32550      # These will end up something like:
32551      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32552      # The trailing space for everyone except PATH is no typo, but is needed due
32553      # to trailing \ in the Windows paths. These will be stripped later.
32554      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32555          >> $EXTRACT_VC_ENV_BAT_FILE
32556      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32557          >> $EXTRACT_VC_ENV_BAT_FILE
32558      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32559          >> $EXTRACT_VC_ENV_BAT_FILE
32560      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32561          >> $EXTRACT_VC_ENV_BAT_FILE
32562      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32563          >> $EXTRACT_VC_ENV_BAT_FILE
32564      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32565          >> $EXTRACT_VC_ENV_BAT_FILE
32566
32567      # Now execute the newly created bat file.
32568      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32569      # Change directory so we don't need to mess with Windows paths in redirects.
32570      cd $VS_ENV_TMP_DIR
32571      cmd /c extract-vs-env.bat | $CAT
32572      cd $CURDIR
32573
32574      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32575        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32576$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32577        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32578$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32579        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32580$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32581        as_fn_error $? "Cannot continue" "$LINENO" 5
32582      fi
32583
32584      # Now set all paths and other env variables. This will allow the rest of
32585      # the configure script to find and run the compiler in the proper way.
32586      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32587$as_echo "$as_me: Setting extracted environment variables" >&6;}
32588      . $VS_ENV_TMP_DIR/set-vs-env.sh
32589      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32590      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32591    else
32592      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32593      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32594$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32595    fi
32596  fi
32597
32598  # At this point, we should have correct variables in the environment, or we can't continue.
32599  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32600$as_echo_n "checking for Visual Studio variables... " >&6; }
32601
32602  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32603      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32604    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32605      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32606$as_echo "present but broken" >&6; }
32607      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32608    else
32609      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32610$as_echo "ok" >&6; }
32611      # Remove any trailing "\" ";" and " " from the variables.
32612      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32613      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32614      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32615      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32616      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32617      # Remove any paths containing # (typically F#) as that messes up make. This
32618      # is needed if visual studio was installed with F# support.
32619      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32620
32621
32622
32623
32624
32625      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32626      OLDIFS="$IFS"
32627      IFS=";"
32628      for i in $VS_INCLUDE; do
32629        ipath=$i
32630        # Only process non-empty elements
32631        if test "x$ipath" != x; then
32632          IFS="$OLDIFS"
32633          # Check that directory exists before calling fixup_path
32634          testpath=$ipath
32635
32636  windows_path="$testpath"
32637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32638    unix_path=`$CYGPATH -u "$windows_path"`
32639    testpath="$unix_path"
32640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32642    testpath="$unix_path"
32643  fi
32644
32645          if test -d "$testpath"; then
32646
32647  # Only process if variable expands to non-empty
32648
32649  if test "x$ipath" != x; then
32650    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32651
32652  # Input might be given as Windows format, start by converting to
32653  # unix format.
32654  path="$ipath"
32655  new_path=`$CYGPATH -u "$path"`
32656
32657  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32658  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32659  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32660  # "foo.exe" is OK but "foo" is an error.
32661  #
32662  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32663  # It is also a way to make sure we got the proper file name for the real test later on.
32664  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32665  if test "x$test_shortpath" = x; then
32666    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32667$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32668    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32669  fi
32670
32671  # Call helper function which possibly converts this using DOS-style short mode.
32672  # If so, the updated path is stored in $new_path.
32673
32674  input_path="$new_path"
32675  # Check if we need to convert this using DOS-style short mode. If the path
32676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32677  # take no chances and rewrite it.
32678  # Note: m4 eats our [], so we need to use [ and ] instead.
32679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32680  if test "x$has_forbidden_chars" != x; then
32681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32682    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32683    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32684    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32685      # Going to short mode and back again did indeed matter. Since short mode is
32686      # case insensitive, let's make it lowercase to improve readability.
32687      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32688      # Now convert it back to Unix-style (cygpath)
32689      input_path=`$CYGPATH -u "$shortmode_path"`
32690      new_path="$input_path"
32691    fi
32692  fi
32693
32694  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32695  if test "x$test_cygdrive_prefix" = x; then
32696    # As a simple fix, exclude /usr/bin since it's not a real path.
32697    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32698      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32699      # a path prefixed by /cygdrive for fixpath to work.
32700      new_path="$CYGWIN_ROOT_PATH$input_path"
32701    fi
32702  fi
32703
32704
32705  if test "x$path" != "x$new_path"; then
32706    ipath="$new_path"
32707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32708$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32709  fi
32710
32711    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32712
32713  path="$ipath"
32714  has_colon=`$ECHO $path | $GREP ^.:`
32715  new_path="$path"
32716  if test "x$has_colon" = x; then
32717    # Not in mixed or Windows style, start by that.
32718    new_path=`cmd //c echo $path`
32719  fi
32720
32721
32722  input_path="$new_path"
32723  # Check if we need to convert this using DOS-style short mode. If the path
32724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32725  # take no chances and rewrite it.
32726  # Note: m4 eats our [], so we need to use [ and ] instead.
32727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32728  if test "x$has_forbidden_chars" != x; then
32729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32730    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32731  fi
32732
32733
32734  windows_path="$new_path"
32735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32736    unix_path=`$CYGPATH -u "$windows_path"`
32737    new_path="$unix_path"
32738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32740    new_path="$unix_path"
32741  fi
32742
32743  if test "x$path" != "x$new_path"; then
32744    ipath="$new_path"
32745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32746$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32747  fi
32748
32749  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32750  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32751
32752    else
32753      # We're on a unix platform. Hooray! :)
32754      path="$ipath"
32755      has_space=`$ECHO "$path" | $GREP " "`
32756      if test "x$has_space" != x; then
32757        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32758$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32759        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32760      fi
32761
32762      # Use eval to expand a potential ~
32763      eval path="$path"
32764      if test ! -f "$path" && test ! -d "$path"; then
32765        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32766      fi
32767
32768      if test -d "$path"; then
32769        ipath="`cd "$path"; $THEPWDCMD -L`"
32770      else
32771        dir="`$DIRNAME "$path"`"
32772        base="`$BASENAME "$path"`"
32773        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32774      fi
32775    fi
32776  fi
32777
32778            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32779          fi
32780          IFS=";"
32781        fi
32782      done
32783      # Convert VS_LIB into SYSROOT_LDFLAGS
32784      for i in $VS_LIB; do
32785        libpath=$i
32786        # Only process non-empty elements
32787        if test "x$libpath" != x; then
32788          IFS="$OLDIFS"
32789          # Check that directory exists before calling fixup_path
32790          testpath=$libpath
32791
32792  windows_path="$testpath"
32793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32794    unix_path=`$CYGPATH -u "$windows_path"`
32795    testpath="$unix_path"
32796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32798    testpath="$unix_path"
32799  fi
32800
32801          if test -d "$testpath"; then
32802
32803  # Only process if variable expands to non-empty
32804
32805  if test "x$libpath" != x; then
32806    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32807
32808  # Input might be given as Windows format, start by converting to
32809  # unix format.
32810  path="$libpath"
32811  new_path=`$CYGPATH -u "$path"`
32812
32813  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32814  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32815  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32816  # "foo.exe" is OK but "foo" is an error.
32817  #
32818  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32819  # It is also a way to make sure we got the proper file name for the real test later on.
32820  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32821  if test "x$test_shortpath" = x; then
32822    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32823$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32824    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32825  fi
32826
32827  # Call helper function which possibly converts this using DOS-style short mode.
32828  # If so, the updated path is stored in $new_path.
32829
32830  input_path="$new_path"
32831  # Check if we need to convert this using DOS-style short mode. If the path
32832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32833  # take no chances and rewrite it.
32834  # Note: m4 eats our [], so we need to use [ and ] instead.
32835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32836  if test "x$has_forbidden_chars" != x; then
32837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32841      # Going to short mode and back again did indeed matter. Since short mode is
32842      # case insensitive, let's make it lowercase to improve readability.
32843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32844      # Now convert it back to Unix-style (cygpath)
32845      input_path=`$CYGPATH -u "$shortmode_path"`
32846      new_path="$input_path"
32847    fi
32848  fi
32849
32850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32851  if test "x$test_cygdrive_prefix" = x; then
32852    # As a simple fix, exclude /usr/bin since it's not a real path.
32853    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32855      # a path prefixed by /cygdrive for fixpath to work.
32856      new_path="$CYGWIN_ROOT_PATH$input_path"
32857    fi
32858  fi
32859
32860
32861  if test "x$path" != "x$new_path"; then
32862    libpath="$new_path"
32863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32864$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32865  fi
32866
32867    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32868
32869  path="$libpath"
32870  has_colon=`$ECHO $path | $GREP ^.:`
32871  new_path="$path"
32872  if test "x$has_colon" = x; then
32873    # Not in mixed or Windows style, start by that.
32874    new_path=`cmd //c echo $path`
32875  fi
32876
32877
32878  input_path="$new_path"
32879  # Check if we need to convert this using DOS-style short mode. If the path
32880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32881  # take no chances and rewrite it.
32882  # Note: m4 eats our [], so we need to use [ and ] instead.
32883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32884  if test "x$has_forbidden_chars" != x; then
32885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32887  fi
32888
32889
32890  windows_path="$new_path"
32891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32892    unix_path=`$CYGPATH -u "$windows_path"`
32893    new_path="$unix_path"
32894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32896    new_path="$unix_path"
32897  fi
32898
32899  if test "x$path" != "x$new_path"; then
32900    libpath="$new_path"
32901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32902$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32903  fi
32904
32905  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32906  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32907
32908    else
32909      # We're on a unix platform. Hooray! :)
32910      path="$libpath"
32911      has_space=`$ECHO "$path" | $GREP " "`
32912      if test "x$has_space" != x; then
32913        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32914$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32915        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32916      fi
32917
32918      # Use eval to expand a potential ~
32919      eval path="$path"
32920      if test ! -f "$path" && test ! -d "$path"; then
32921        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32922      fi
32923
32924      if test -d "$path"; then
32925        libpath="`cd "$path"; $THEPWDCMD -L`"
32926      else
32927        dir="`$DIRNAME "$path"`"
32928        base="`$BASENAME "$path"`"
32929        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32930      fi
32931    fi
32932  fi
32933
32934            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32935          fi
32936          IFS=";"
32937        fi
32938      done
32939      IFS="$OLDIFS"
32940    fi
32941  else
32942    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32943$as_echo "not found" >&6; }
32944
32945    if test "x$VS_ENV_CMD" = x; then
32946      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32947$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32948      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32949$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32950    else
32951      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32952$as_echo "$as_me: Running the extraction script failed." >&6;}
32953    fi
32954    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32955$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32956    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32957$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32958    as_fn_error $? "Cannot continue" "$LINENO" 5
32959  fi
32960
32961    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32962    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32963    PATH="$VS_PATH"
32964    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32965    export INCLUDE="$VS_INCLUDE"
32966    export LIB="$VS_LIB"
32967  else
32968    if test "x$XCODE_VERSION_OUTPUT" != x; then
32969      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32970      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32971      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32972    else
32973      # Currently we do not define this for other toolchains. This might change as the need arise.
32974      TOOLCHAIN_VERSION=
32975    fi
32976  fi
32977
32978
32979  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32980  # override all other locations.
32981  if test "x$TOOLCHAIN_PATH" != x; then
32982    PATH=$TOOLCHAIN_PATH:$PATH
32983  fi
32984
32985
32986  #
32987  # Setup the compilers (CC and CXX)
32988  #
32989
32990  COMPILER_NAME=C
32991  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32992
32993  if test "x$CC" != x; then
32994    # User has supplied compiler name already, always let that override.
32995    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
32996$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
32997    if test "x`basename $CC`" = "x$CC"; then
32998      # A command without a complete path is provided, search $PATH.
32999
33000      for ac_prog in $CC
33001do
33002  # Extract the first word of "$ac_prog", so it can be a program name with args.
33003set dummy $ac_prog; ac_word=$2
33004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33005$as_echo_n "checking for $ac_word... " >&6; }
33006if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33007  $as_echo_n "(cached) " >&6
33008else
33009  case $POTENTIAL_CC in
33010  [\\/]* | ?:[\\/]*)
33011  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33012  ;;
33013  *)
33014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33015for as_dir in $PATH
33016do
33017  IFS=$as_save_IFS
33018  test -z "$as_dir" && as_dir=.
33019    for ac_exec_ext in '' $ac_executable_extensions; do
33020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33021    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33023    break 2
33024  fi
33025done
33026  done
33027IFS=$as_save_IFS
33028
33029  ;;
33030esac
33031fi
33032POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33033if test -n "$POTENTIAL_CC"; then
33034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33035$as_echo "$POTENTIAL_CC" >&6; }
33036else
33037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33038$as_echo "no" >&6; }
33039fi
33040
33041
33042  test -n "$POTENTIAL_CC" && break
33043done
33044
33045      if test "x$POTENTIAL_CC" != x; then
33046        CC=$POTENTIAL_CC
33047      else
33048        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33049      fi
33050    else
33051      # Otherwise it might already be a complete path
33052      if test ! -x "$CC"; then
33053        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33054      fi
33055    fi
33056  else
33057    # No user supplied value. Locate compiler ourselves.
33058
33059    # If we are cross compiling, assume cross compilation tools follows the
33060    # cross compilation standard where they are prefixed with the autoconf
33061    # standard name for the target. For example the binary
33062    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33063    # If we are not cross compiling, then the default compiler name will be
33064    # used.
33065
33066    CC=
33067    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33068    # before checking the rest of the PATH.
33069    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33070    # step, this should not be necessary.
33071    if test -n "$TOOLCHAIN_PATH"; then
33072      PATH_save="$PATH"
33073      PATH="$TOOLCHAIN_PATH"
33074      for ac_prog in $SEARCH_LIST
33075do
33076  # Extract the first word of "$ac_prog", so it can be a program name with args.
33077set dummy $ac_prog; ac_word=$2
33078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33079$as_echo_n "checking for $ac_word... " >&6; }
33080if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33081  $as_echo_n "(cached) " >&6
33082else
33083  case $TOOLCHAIN_PATH_CC in
33084  [\\/]* | ?:[\\/]*)
33085  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33086  ;;
33087  *)
33088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33089for as_dir in $PATH
33090do
33091  IFS=$as_save_IFS
33092  test -z "$as_dir" && as_dir=.
33093    for ac_exec_ext in '' $ac_executable_extensions; do
33094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33095    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33097    break 2
33098  fi
33099done
33100  done
33101IFS=$as_save_IFS
33102
33103  ;;
33104esac
33105fi
33106TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33107if test -n "$TOOLCHAIN_PATH_CC"; then
33108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33109$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33110else
33111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33112$as_echo "no" >&6; }
33113fi
33114
33115
33116  test -n "$TOOLCHAIN_PATH_CC" && break
33117done
33118
33119      CC=$TOOLCHAIN_PATH_CC
33120      PATH="$PATH_save"
33121    fi
33122
33123    # AC_PATH_PROGS can't be run multiple times with the same variable,
33124    # so create a new name for this run.
33125    if test "x$CC" = x; then
33126      for ac_prog in $SEARCH_LIST
33127do
33128  # Extract the first word of "$ac_prog", so it can be a program name with args.
33129set dummy $ac_prog; ac_word=$2
33130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33131$as_echo_n "checking for $ac_word... " >&6; }
33132if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33133  $as_echo_n "(cached) " >&6
33134else
33135  case $POTENTIAL_CC in
33136  [\\/]* | ?:[\\/]*)
33137  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33138  ;;
33139  *)
33140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33141for as_dir in $PATH
33142do
33143  IFS=$as_save_IFS
33144  test -z "$as_dir" && as_dir=.
33145    for ac_exec_ext in '' $ac_executable_extensions; do
33146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33147    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33149    break 2
33150  fi
33151done
33152  done
33153IFS=$as_save_IFS
33154
33155  ;;
33156esac
33157fi
33158POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33159if test -n "$POTENTIAL_CC"; then
33160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33161$as_echo "$POTENTIAL_CC" >&6; }
33162else
33163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33164$as_echo "no" >&6; }
33165fi
33166
33167
33168  test -n "$POTENTIAL_CC" && break
33169done
33170
33171      CC=$POTENTIAL_CC
33172    fi
33173
33174    if test "x$CC" = x; then
33175
33176  # Print a helpful message on how to acquire the necessary build dependency.
33177  # devkit is the help tag: freetype, cups, alsa etc
33178  MISSING_DEPENDENCY=devkit
33179
33180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33181    cygwin_help $MISSING_DEPENDENCY
33182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33183    msys_help $MISSING_DEPENDENCY
33184  else
33185    PKGHANDLER_COMMAND=
33186
33187    case $PKGHANDLER in
33188      apt-get)
33189        apt_help     $MISSING_DEPENDENCY ;;
33190      yum)
33191        yum_help     $MISSING_DEPENDENCY ;;
33192      port)
33193        port_help    $MISSING_DEPENDENCY ;;
33194      pkgutil)
33195        pkgutil_help $MISSING_DEPENDENCY ;;
33196      pkgadd)
33197        pkgadd_help  $MISSING_DEPENDENCY ;;
33198    esac
33199
33200    if test "x$PKGHANDLER_COMMAND" != x; then
33201      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33202    fi
33203  fi
33204
33205      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33206    fi
33207  fi
33208
33209  # Now we have a compiler binary in CC. Make sure it's okay.
33210
33211  # Only process if variable expands to non-empty
33212
33213  if test "x$CC" != x; then
33214    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33215
33216  # First separate the path from the arguments. This will split at the first
33217  # space.
33218  complete="$CC"
33219  path="${complete%% *}"
33220  tmp="$complete EOL"
33221  arguments="${tmp#* }"
33222
33223  # Input might be given as Windows format, start by converting to
33224  # unix format.
33225  new_path=`$CYGPATH -u "$path"`
33226
33227  # Now try to locate executable using which
33228  new_path=`$WHICH "$new_path" 2> /dev/null`
33229  # bat and cmd files are not always considered executable in cygwin causing which
33230  # to not find them
33231  if test "x$new_path" = x \
33232      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33233      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33234    new_path=`$CYGPATH -u "$path"`
33235  fi
33236  if test "x$new_path" = x; then
33237    # Oops. Which didn't find the executable.
33238    # The splitting of arguments from the executable at a space might have been incorrect,
33239    # since paths with space are more likely in Windows. Give it another try with the whole
33240    # argument.
33241    path="$complete"
33242    arguments="EOL"
33243    new_path=`$CYGPATH -u "$path"`
33244    new_path=`$WHICH "$new_path" 2> /dev/null`
33245    # bat and cmd files are not always considered executable in cygwin causing which
33246    # to not find them
33247    if test "x$new_path" = x \
33248        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33249        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33250      new_path=`$CYGPATH -u "$path"`
33251    fi
33252    if test "x$new_path" = x; then
33253      # It's still not found. Now this is an unrecoverable error.
33254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33255$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33256      has_space=`$ECHO "$complete" | $GREP " "`
33257      if test "x$has_space" != x; then
33258        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33259$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33260      fi
33261      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33262    fi
33263  fi
33264
33265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33268  # "foo.exe" is OK but "foo" is an error.
33269  #
33270  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33271  # It is also a way to make sure we got the proper file name for the real test later on.
33272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33273  if test "x$test_shortpath" = x; then
33274    # Short path failed, file does not exist as specified.
33275    # Try adding .exe or .cmd
33276    if test -f "${new_path}.exe"; then
33277      input_to_shortpath="${new_path}.exe"
33278    elif test -f "${new_path}.cmd"; then
33279      input_to_shortpath="${new_path}.cmd"
33280    else
33281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33282$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33283      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33284$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33285      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33286    fi
33287  else
33288    input_to_shortpath="$new_path"
33289  fi
33290
33291  # Call helper function which possibly converts this using DOS-style short mode.
33292  # If so, the updated path is stored in $new_path.
33293  new_path="$input_to_shortpath"
33294
33295  input_path="$input_to_shortpath"
33296  # Check if we need to convert this using DOS-style short mode. If the path
33297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33298  # take no chances and rewrite it.
33299  # Note: m4 eats our [], so we need to use [ and ] instead.
33300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33301  if test "x$has_forbidden_chars" != x; then
33302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33303    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33304    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33305    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33306      # Going to short mode and back again did indeed matter. Since short mode is
33307      # case insensitive, let's make it lowercase to improve readability.
33308      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33309      # Now convert it back to Unix-style (cygpath)
33310      input_path=`$CYGPATH -u "$shortmode_path"`
33311      new_path="$input_path"
33312    fi
33313  fi
33314
33315  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33316  if test "x$test_cygdrive_prefix" = x; then
33317    # As a simple fix, exclude /usr/bin since it's not a real path.
33318    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33319      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33320      # a path prefixed by /cygdrive for fixpath to work.
33321      new_path="$CYGWIN_ROOT_PATH$input_path"
33322    fi
33323  fi
33324
33325  # remove trailing .exe if any
33326  new_path="${new_path/%.exe/}"
33327
33328    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33329
33330  # First separate the path from the arguments. This will split at the first
33331  # space.
33332  complete="$CC"
33333  path="${complete%% *}"
33334  tmp="$complete EOL"
33335  arguments="${tmp#* }"
33336
33337  # Input might be given as Windows format, start by converting to
33338  # unix format.
33339  new_path="$path"
33340
33341  windows_path="$new_path"
33342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33343    unix_path=`$CYGPATH -u "$windows_path"`
33344    new_path="$unix_path"
33345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33347    new_path="$unix_path"
33348  fi
33349
33350
33351  # Now try to locate executable using which
33352  new_path=`$WHICH "$new_path" 2> /dev/null`
33353
33354  if test "x$new_path" = x; then
33355    # Oops. Which didn't find the executable.
33356    # The splitting of arguments from the executable at a space might have been incorrect,
33357    # since paths with space are more likely in Windows. Give it another try with the whole
33358    # argument.
33359    path="$complete"
33360    arguments="EOL"
33361    new_path="$path"
33362
33363  windows_path="$new_path"
33364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33365    unix_path=`$CYGPATH -u "$windows_path"`
33366    new_path="$unix_path"
33367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33369    new_path="$unix_path"
33370  fi
33371
33372
33373    new_path=`$WHICH "$new_path" 2> /dev/null`
33374    # bat and cmd files are not always considered executable in MSYS causing which
33375    # to not find them
33376    if test "x$new_path" = x \
33377        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33378        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33379      new_path="$path"
33380
33381  windows_path="$new_path"
33382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33383    unix_path=`$CYGPATH -u "$windows_path"`
33384    new_path="$unix_path"
33385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33387    new_path="$unix_path"
33388  fi
33389
33390    fi
33391
33392    if test "x$new_path" = x; then
33393      # It's still not found. Now this is an unrecoverable error.
33394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33395$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33396      has_space=`$ECHO "$complete" | $GREP " "`
33397      if test "x$has_space" != x; then
33398        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33399$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33400      fi
33401      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33402    fi
33403  fi
33404
33405  # Now new_path has a complete unix path to the binary
33406  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33407    # Keep paths in /bin as-is, but remove trailing .exe if any
33408    new_path="${new_path/%.exe/}"
33409    # Do not save /bin paths to all_fixpath_prefixes!
33410  else
33411    # Not in mixed or Windows style, start by that.
33412    new_path=`cmd //c echo $new_path`
33413
33414  input_path="$new_path"
33415  # Check if we need to convert this using DOS-style short mode. If the path
33416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33417  # take no chances and rewrite it.
33418  # Note: m4 eats our [], so we need to use [ and ] instead.
33419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33420  if test "x$has_forbidden_chars" != x; then
33421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33422    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33423  fi
33424
33425    # Output is in $new_path
33426
33427  windows_path="$new_path"
33428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33429    unix_path=`$CYGPATH -u "$windows_path"`
33430    new_path="$unix_path"
33431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33433    new_path="$unix_path"
33434  fi
33435
33436    # remove trailing .exe if any
33437    new_path="${new_path/%.exe/}"
33438
33439    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33440    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33441  fi
33442
33443    else
33444      # We're on a unix platform. Hooray! :)
33445      # First separate the path from the arguments. This will split at the first
33446      # space.
33447      complete="$CC"
33448      path="${complete%% *}"
33449      tmp="$complete EOL"
33450      arguments="${tmp#* }"
33451
33452      # Cannot rely on the command "which" here since it doesn't always work.
33453      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33454      if test -z "$is_absolute_path"; then
33455        # Path to executable is not absolute. Find it.
33456        IFS_save="$IFS"
33457        IFS=:
33458        for p in $PATH; do
33459          if test -f "$p/$path" && test -x "$p/$path"; then
33460            new_path="$p/$path"
33461            break
33462          fi
33463        done
33464        IFS="$IFS_save"
33465      else
33466        # This is an absolute path, we can use it without further modifications.
33467        new_path="$path"
33468      fi
33469
33470      if test "x$new_path" = x; then
33471        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33472$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33473        has_space=`$ECHO "$complete" | $GREP " "`
33474        if test "x$has_space" != x; then
33475          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33476$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33477        fi
33478        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33479      fi
33480    fi
33481
33482    # Now join together the path and the arguments once again
33483    if test "x$arguments" != xEOL; then
33484      new_complete="$new_path ${arguments% *}"
33485    else
33486      new_complete="$new_path"
33487    fi
33488
33489    if test "x$complete" != "x$new_complete"; then
33490      CC="$new_complete"
33491      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33492$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33493    fi
33494  fi
33495
33496  TEST_COMPILER="$CC"
33497
33498  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33499$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33500  SYMLINK_ORIGINAL="$TEST_COMPILER"
33501
33502  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33503    # Follow a chain of symbolic links. Use readlink
33504    # where it exists, else fall back to horribly
33505    # complicated shell code.
33506    if test "x$READLINK_TESTED" != yes; then
33507      # On MacOSX there is a readlink tool with a different
33508      # purpose than the GNU readlink tool. Check the found readlink.
33509      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33510      if test "x$ISGNU" = x; then
33511        # A readlink that we do not know how to use.
33512        # Are there other non-GNU readlinks out there?
33513        READLINK_TESTED=yes
33514        READLINK=
33515      fi
33516    fi
33517
33518    if test "x$READLINK" != x; then
33519      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33520    else
33521      # Save the current directory for restoring afterwards
33522      STARTDIR=$PWD
33523      COUNTER=0
33524      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33525      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33526      cd $sym_link_dir
33527      # Use -P flag to resolve symlinks in directories.
33528      cd `$THEPWDCMD -P`
33529      sym_link_dir=`$THEPWDCMD -P`
33530      # Resolve file symlinks
33531      while test $COUNTER -lt 20; do
33532        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33533        if test "x$ISLINK" == x; then
33534          # This is not a symbolic link! We are done!
33535          break
33536        fi
33537        # Again resolve directory symlinks since the target of the just found
33538        # link could be in a different directory
33539        cd `$DIRNAME $ISLINK`
33540        sym_link_dir=`$THEPWDCMD -P`
33541        sym_link_file=`$BASENAME $ISLINK`
33542        let COUNTER=COUNTER+1
33543      done
33544      cd $STARTDIR
33545      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33546    fi
33547  fi
33548
33549  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33550    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33551$as_echo "no symlink" >&6; }
33552  else
33553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33554$as_echo "$SYMLINK_ORIGINAL" >&6; }
33555
33556    # We can't handle ccache by gcc wrappers, since we need to know if we're
33557    # using ccache. Instead ccache usage must be controlled by a configure option.
33558    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33559    if test "x$COMPILER_BASENAME" = "xccache"; then
33560      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33561$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33562      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33563    fi
33564  fi
33565
33566
33567  COMPILER=$CC
33568  COMPILER_NAME=$COMPILER_NAME
33569
33570  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33571    # cc -V output typically looks like
33572    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33573    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33574    # Check that this is likely to be the Solaris Studio cc.
33575    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33576    if test $? -ne 0; then
33577      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33578      { $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
33579$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33580      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33581$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33582      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33583$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33584      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33585    fi
33586    # Remove usage instructions (if present), and
33587    # collapse compiler output into a single line
33588    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33589        $SED -e 's/ *[Uu]sage:.*//'`
33590    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33591        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33592  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33593    # xlc -qversion output typically looks like
33594    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33595    #     Version: 11.01.0000.0015
33596    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33597    # Check that this is likely to be the IBM XL C compiler.
33598    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33599    if test $? -ne 0; then
33600      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33601      { $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
33602$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33603      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33604$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33605      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33606$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33607      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33608    fi
33609    # Collapse compiler output into a single line
33610    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33611    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33612        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33613  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33614    # There is no specific version flag, but all output starts with a version string.
33615    # First line typically looks something like:
33616    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33617    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33618    # Check that this is likely to be Microsoft CL.EXE.
33619    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33620    if test $? -ne 0; then
33621      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
33622$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33623      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33624$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33625      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33626    fi
33627    # Collapse compiler output into a single line
33628    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33629    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33630        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33631  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33632    # gcc --version output typically looks like
33633    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33634    #     Copyright (C) 2013 Free Software Foundation, Inc.
33635    #     This is free software; see the source for copying conditions.  There is NO
33636    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33637    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33638    # Check that this is likely to be GCC.
33639    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33640    if test $? -ne 0; then
33641      { $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
33642$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33643      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33644$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33645      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33646    fi
33647    # Remove Copyright and legalese from version string, and
33648    # collapse into a single line
33649    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33650        $SED -e 's/ *Copyright .*//'`
33651    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33652        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33653  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33654    # clang --version output typically looks like
33655    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33656    #    clang version 3.3 (tags/RELEASE_33/final)
33657    # or
33658    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33659    #    Target: x86_64-pc-linux-gnu
33660    #    Thread model: posix
33661    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33662    # Check that this is likely to be clang
33663    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33664    if test $? -ne 0; then
33665      { $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
33666$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33667      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33668$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33669      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33670    fi
33671    # Collapse compiler output into a single line
33672    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33673    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33674        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33675  else
33676      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33677  fi
33678  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33679  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33680  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33681  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33682
33683  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33684$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33685
33686
33687  # Now that we have resolved CC ourself, let autoconf have its go at it
33688  ac_ext=c
33689ac_cpp='$CPP $CPPFLAGS'
33690ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33691ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33692ac_compiler_gnu=$ac_cv_c_compiler_gnu
33693if test -n "$ac_tool_prefix"; then
33694  for ac_prog in $CC
33695  do
33696    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33697set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33699$as_echo_n "checking for $ac_word... " >&6; }
33700if ${ac_cv_prog_CC+:} false; then :
33701  $as_echo_n "(cached) " >&6
33702else
33703  if test -n "$CC"; then
33704  ac_cv_prog_CC="$CC" # Let the user override the test.
33705else
33706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33707for as_dir in $PATH
33708do
33709  IFS=$as_save_IFS
33710  test -z "$as_dir" && as_dir=.
33711    for ac_exec_ext in '' $ac_executable_extensions; do
33712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33713    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33715    break 2
33716  fi
33717done
33718  done
33719IFS=$as_save_IFS
33720
33721fi
33722fi
33723CC=$ac_cv_prog_CC
33724if test -n "$CC"; then
33725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33726$as_echo "$CC" >&6; }
33727else
33728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33729$as_echo "no" >&6; }
33730fi
33731
33732
33733    test -n "$CC" && break
33734  done
33735fi
33736if test -z "$CC"; then
33737  ac_ct_CC=$CC
33738  for ac_prog in $CC
33739do
33740  # Extract the first word of "$ac_prog", so it can be a program name with args.
33741set dummy $ac_prog; ac_word=$2
33742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33743$as_echo_n "checking for $ac_word... " >&6; }
33744if ${ac_cv_prog_ac_ct_CC+:} false; then :
33745  $as_echo_n "(cached) " >&6
33746else
33747  if test -n "$ac_ct_CC"; then
33748  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33749else
33750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33751for as_dir in $PATH
33752do
33753  IFS=$as_save_IFS
33754  test -z "$as_dir" && as_dir=.
33755    for ac_exec_ext in '' $ac_executable_extensions; do
33756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33757    ac_cv_prog_ac_ct_CC="$ac_prog"
33758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33759    break 2
33760  fi
33761done
33762  done
33763IFS=$as_save_IFS
33764
33765fi
33766fi
33767ac_ct_CC=$ac_cv_prog_ac_ct_CC
33768if test -n "$ac_ct_CC"; then
33769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33770$as_echo "$ac_ct_CC" >&6; }
33771else
33772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33773$as_echo "no" >&6; }
33774fi
33775
33776
33777  test -n "$ac_ct_CC" && break
33778done
33779
33780  if test "x$ac_ct_CC" = x; then
33781    CC=""
33782  else
33783    case $cross_compiling:$ac_tool_warned in
33784yes:)
33785{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33786$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33787ac_tool_warned=yes ;;
33788esac
33789    CC=$ac_ct_CC
33790  fi
33791fi
33792
33793
33794test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33795$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33796as_fn_error $? "no acceptable C compiler found in \$PATH
33797See \`config.log' for more details" "$LINENO" 5; }
33798
33799# Provide some information about the compiler.
33800$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33801set X $ac_compile
33802ac_compiler=$2
33803for ac_option in --version -v -V -qversion; do
33804  { { ac_try="$ac_compiler $ac_option >&5"
33805case "(($ac_try" in
33806  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33807  *) ac_try_echo=$ac_try;;
33808esac
33809eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33810$as_echo "$ac_try_echo"; } >&5
33811  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33812  ac_status=$?
33813  if test -s conftest.err; then
33814    sed '10a\
33815... rest of stderr output deleted ...
33816         10q' conftest.err >conftest.er1
33817    cat conftest.er1 >&5
33818  fi
33819  rm -f conftest.er1 conftest.err
33820  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33821  test $ac_status = 0; }
33822done
33823
33824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33825/* end confdefs.h.  */
33826
33827int
33828main ()
33829{
33830
33831  ;
33832  return 0;
33833}
33834_ACEOF
33835ac_clean_files_save=$ac_clean_files
33836ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33837# Try to create an executable without -o first, disregard a.out.
33838# It will help us diagnose broken compilers, and finding out an intuition
33839# of exeext.
33840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33841$as_echo_n "checking whether the C compiler works... " >&6; }
33842ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33843
33844# The possible output files:
33845ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33846
33847ac_rmfiles=
33848for ac_file in $ac_files
33849do
33850  case $ac_file in
33851    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33852    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33853  esac
33854done
33855rm -f $ac_rmfiles
33856
33857if { { ac_try="$ac_link_default"
33858case "(($ac_try" in
33859  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33860  *) ac_try_echo=$ac_try;;
33861esac
33862eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33863$as_echo "$ac_try_echo"; } >&5
33864  (eval "$ac_link_default") 2>&5
33865  ac_status=$?
33866  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33867  test $ac_status = 0; }; then :
33868  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33869# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33870# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33871# so that the user can short-circuit this test for compilers unknown to
33872# Autoconf.
33873for ac_file in $ac_files ''
33874do
33875  test -f "$ac_file" || continue
33876  case $ac_file in
33877    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33878	;;
33879    [ab].out )
33880	# We found the default executable, but exeext='' is most
33881	# certainly right.
33882	break;;
33883    *.* )
33884	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33885	then :; else
33886	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33887	fi
33888	# We set ac_cv_exeext here because the later test for it is not
33889	# safe: cross compilers may not add the suffix if given an `-o'
33890	# argument, so we may need to know it at that point already.
33891	# Even if this section looks crufty: it has the advantage of
33892	# actually working.
33893	break;;
33894    * )
33895	break;;
33896  esac
33897done
33898test "$ac_cv_exeext" = no && ac_cv_exeext=
33899
33900else
33901  ac_file=''
33902fi
33903if test -z "$ac_file"; then :
33904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33905$as_echo "no" >&6; }
33906$as_echo "$as_me: failed program was:" >&5
33907sed 's/^/| /' conftest.$ac_ext >&5
33908
33909{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33910$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33911as_fn_error 77 "C compiler cannot create executables
33912See \`config.log' for more details" "$LINENO" 5; }
33913else
33914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33915$as_echo "yes" >&6; }
33916fi
33917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33918$as_echo_n "checking for C compiler default output file name... " >&6; }
33919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33920$as_echo "$ac_file" >&6; }
33921ac_exeext=$ac_cv_exeext
33922
33923rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33924ac_clean_files=$ac_clean_files_save
33925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33926$as_echo_n "checking for suffix of executables... " >&6; }
33927if { { ac_try="$ac_link"
33928case "(($ac_try" in
33929  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33930  *) ac_try_echo=$ac_try;;
33931esac
33932eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33933$as_echo "$ac_try_echo"; } >&5
33934  (eval "$ac_link") 2>&5
33935  ac_status=$?
33936  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33937  test $ac_status = 0; }; then :
33938  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33939# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33940# work properly (i.e., refer to `conftest.exe'), while it won't with
33941# `rm'.
33942for ac_file in conftest.exe conftest conftest.*; do
33943  test -f "$ac_file" || continue
33944  case $ac_file in
33945    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33946    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33947	  break;;
33948    * ) break;;
33949  esac
33950done
33951else
33952  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33953$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33954as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33955See \`config.log' for more details" "$LINENO" 5; }
33956fi
33957rm -f conftest conftest$ac_cv_exeext
33958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33959$as_echo "$ac_cv_exeext" >&6; }
33960
33961rm -f conftest.$ac_ext
33962EXEEXT=$ac_cv_exeext
33963ac_exeext=$EXEEXT
33964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33965/* end confdefs.h.  */
33966#include <stdio.h>
33967int
33968main ()
33969{
33970FILE *f = fopen ("conftest.out", "w");
33971 return ferror (f) || fclose (f) != 0;
33972
33973  ;
33974  return 0;
33975}
33976_ACEOF
33977ac_clean_files="$ac_clean_files conftest.out"
33978# Check that the compiler produces executables we can run.  If not, either
33979# the compiler is broken, or we cross compile.
33980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33981$as_echo_n "checking whether we are cross compiling... " >&6; }
33982if test "$cross_compiling" != yes; then
33983  { { ac_try="$ac_link"
33984case "(($ac_try" in
33985  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33986  *) ac_try_echo=$ac_try;;
33987esac
33988eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33989$as_echo "$ac_try_echo"; } >&5
33990  (eval "$ac_link") 2>&5
33991  ac_status=$?
33992  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33993  test $ac_status = 0; }
33994  if { ac_try='./conftest$ac_cv_exeext'
33995  { { case "(($ac_try" in
33996  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33997  *) ac_try_echo=$ac_try;;
33998esac
33999eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34000$as_echo "$ac_try_echo"; } >&5
34001  (eval "$ac_try") 2>&5
34002  ac_status=$?
34003  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34004  test $ac_status = 0; }; }; then
34005    cross_compiling=no
34006  else
34007    if test "$cross_compiling" = maybe; then
34008	cross_compiling=yes
34009    else
34010	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34011$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34012as_fn_error $? "cannot run C compiled programs.
34013If you meant to cross compile, use \`--host'.
34014See \`config.log' for more details" "$LINENO" 5; }
34015    fi
34016  fi
34017fi
34018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34019$as_echo "$cross_compiling" >&6; }
34020
34021rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34022ac_clean_files=$ac_clean_files_save
34023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34024$as_echo_n "checking for suffix of object files... " >&6; }
34025if ${ac_cv_objext+:} false; then :
34026  $as_echo_n "(cached) " >&6
34027else
34028  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34029/* end confdefs.h.  */
34030
34031int
34032main ()
34033{
34034
34035  ;
34036  return 0;
34037}
34038_ACEOF
34039rm -f conftest.o conftest.obj
34040if { { ac_try="$ac_compile"
34041case "(($ac_try" in
34042  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34043  *) ac_try_echo=$ac_try;;
34044esac
34045eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34046$as_echo "$ac_try_echo"; } >&5
34047  (eval "$ac_compile") 2>&5
34048  ac_status=$?
34049  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34050  test $ac_status = 0; }; then :
34051  for ac_file in conftest.o conftest.obj conftest.*; do
34052  test -f "$ac_file" || continue;
34053  case $ac_file in
34054    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34055    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34056       break;;
34057  esac
34058done
34059else
34060  $as_echo "$as_me: failed program was:" >&5
34061sed 's/^/| /' conftest.$ac_ext >&5
34062
34063{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34064$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34065as_fn_error $? "cannot compute suffix of object files: cannot compile
34066See \`config.log' for more details" "$LINENO" 5; }
34067fi
34068rm -f conftest.$ac_cv_objext conftest.$ac_ext
34069fi
34070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34071$as_echo "$ac_cv_objext" >&6; }
34072OBJEXT=$ac_cv_objext
34073ac_objext=$OBJEXT
34074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34075$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34076if ${ac_cv_c_compiler_gnu+:} false; then :
34077  $as_echo_n "(cached) " >&6
34078else
34079  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34080/* end confdefs.h.  */
34081
34082int
34083main ()
34084{
34085#ifndef __GNUC__
34086       choke me
34087#endif
34088
34089  ;
34090  return 0;
34091}
34092_ACEOF
34093if ac_fn_c_try_compile "$LINENO"; then :
34094  ac_compiler_gnu=yes
34095else
34096  ac_compiler_gnu=no
34097fi
34098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34099ac_cv_c_compiler_gnu=$ac_compiler_gnu
34100
34101fi
34102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34103$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34104if test $ac_compiler_gnu = yes; then
34105  GCC=yes
34106else
34107  GCC=
34108fi
34109ac_test_CFLAGS=${CFLAGS+set}
34110ac_save_CFLAGS=$CFLAGS
34111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34112$as_echo_n "checking whether $CC accepts -g... " >&6; }
34113if ${ac_cv_prog_cc_g+:} false; then :
34114  $as_echo_n "(cached) " >&6
34115else
34116  ac_save_c_werror_flag=$ac_c_werror_flag
34117   ac_c_werror_flag=yes
34118   ac_cv_prog_cc_g=no
34119   CFLAGS="-g"
34120   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34121/* end confdefs.h.  */
34122
34123int
34124main ()
34125{
34126
34127  ;
34128  return 0;
34129}
34130_ACEOF
34131if ac_fn_c_try_compile "$LINENO"; then :
34132  ac_cv_prog_cc_g=yes
34133else
34134  CFLAGS=""
34135      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34136/* end confdefs.h.  */
34137
34138int
34139main ()
34140{
34141
34142  ;
34143  return 0;
34144}
34145_ACEOF
34146if ac_fn_c_try_compile "$LINENO"; then :
34147
34148else
34149  ac_c_werror_flag=$ac_save_c_werror_flag
34150	 CFLAGS="-g"
34151	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34152/* end confdefs.h.  */
34153
34154int
34155main ()
34156{
34157
34158  ;
34159  return 0;
34160}
34161_ACEOF
34162if ac_fn_c_try_compile "$LINENO"; then :
34163  ac_cv_prog_cc_g=yes
34164fi
34165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34166fi
34167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34168fi
34169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34170   ac_c_werror_flag=$ac_save_c_werror_flag
34171fi
34172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34173$as_echo "$ac_cv_prog_cc_g" >&6; }
34174if test "$ac_test_CFLAGS" = set; then
34175  CFLAGS=$ac_save_CFLAGS
34176elif test $ac_cv_prog_cc_g = yes; then
34177  if test "$GCC" = yes; then
34178    CFLAGS="-g -O2"
34179  else
34180    CFLAGS="-g"
34181  fi
34182else
34183  if test "$GCC" = yes; then
34184    CFLAGS="-O2"
34185  else
34186    CFLAGS=
34187  fi
34188fi
34189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34190$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34191if ${ac_cv_prog_cc_c89+:} false; then :
34192  $as_echo_n "(cached) " >&6
34193else
34194  ac_cv_prog_cc_c89=no
34195ac_save_CC=$CC
34196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34197/* end confdefs.h.  */
34198#include <stdarg.h>
34199#include <stdio.h>
34200struct stat;
34201/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34202struct buf { int x; };
34203FILE * (*rcsopen) (struct buf *, struct stat *, int);
34204static char *e (p, i)
34205     char **p;
34206     int i;
34207{
34208  return p[i];
34209}
34210static char *f (char * (*g) (char **, int), char **p, ...)
34211{
34212  char *s;
34213  va_list v;
34214  va_start (v,p);
34215  s = g (p, va_arg (v,int));
34216  va_end (v);
34217  return s;
34218}
34219
34220/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34221   function prototypes and stuff, but not '\xHH' hex character constants.
34222   These don't provoke an error unfortunately, instead are silently treated
34223   as 'x'.  The following induces an error, until -std is added to get
34224   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34225   array size at least.  It's necessary to write '\x00'==0 to get something
34226   that's true only with -std.  */
34227int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34228
34229/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34230   inside strings and character constants.  */
34231#define FOO(x) 'x'
34232int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34233
34234int test (int i, double x);
34235struct s1 {int (*f) (int a);};
34236struct s2 {int (*f) (double a);};
34237int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34238int argc;
34239char **argv;
34240int
34241main ()
34242{
34243return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34244  ;
34245  return 0;
34246}
34247_ACEOF
34248for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34249	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34250do
34251  CC="$ac_save_CC $ac_arg"
34252  if ac_fn_c_try_compile "$LINENO"; then :
34253  ac_cv_prog_cc_c89=$ac_arg
34254fi
34255rm -f core conftest.err conftest.$ac_objext
34256  test "x$ac_cv_prog_cc_c89" != "xno" && break
34257done
34258rm -f conftest.$ac_ext
34259CC=$ac_save_CC
34260
34261fi
34262# AC_CACHE_VAL
34263case "x$ac_cv_prog_cc_c89" in
34264  x)
34265    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34266$as_echo "none needed" >&6; } ;;
34267  xno)
34268    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34269$as_echo "unsupported" >&6; } ;;
34270  *)
34271    CC="$CC $ac_cv_prog_cc_c89"
34272    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34273$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34274esac
34275if test "x$ac_cv_prog_cc_c89" != xno; then :
34276
34277fi
34278
34279ac_ext=cpp
34280ac_cpp='$CXXCPP $CPPFLAGS'
34281ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34282ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34283ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34284
34285
34286
34287  COMPILER_NAME=C++
34288  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34289
34290  if test "x$CXX" != x; then
34291    # User has supplied compiler name already, always let that override.
34292    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34293$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34294    if test "x`basename $CXX`" = "x$CXX"; then
34295      # A command without a complete path is provided, search $PATH.
34296
34297      for ac_prog in $CXX
34298do
34299  # Extract the first word of "$ac_prog", so it can be a program name with args.
34300set dummy $ac_prog; ac_word=$2
34301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34302$as_echo_n "checking for $ac_word... " >&6; }
34303if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34304  $as_echo_n "(cached) " >&6
34305else
34306  case $POTENTIAL_CXX in
34307  [\\/]* | ?:[\\/]*)
34308  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34309  ;;
34310  *)
34311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34312for as_dir in $PATH
34313do
34314  IFS=$as_save_IFS
34315  test -z "$as_dir" && as_dir=.
34316    for ac_exec_ext in '' $ac_executable_extensions; do
34317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34318    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34320    break 2
34321  fi
34322done
34323  done
34324IFS=$as_save_IFS
34325
34326  ;;
34327esac
34328fi
34329POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34330if test -n "$POTENTIAL_CXX"; then
34331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34332$as_echo "$POTENTIAL_CXX" >&6; }
34333else
34334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34335$as_echo "no" >&6; }
34336fi
34337
34338
34339  test -n "$POTENTIAL_CXX" && break
34340done
34341
34342      if test "x$POTENTIAL_CXX" != x; then
34343        CXX=$POTENTIAL_CXX
34344      else
34345        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34346      fi
34347    else
34348      # Otherwise it might already be a complete path
34349      if test ! -x "$CXX"; then
34350        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34351      fi
34352    fi
34353  else
34354    # No user supplied value. Locate compiler ourselves.
34355
34356    # If we are cross compiling, assume cross compilation tools follows the
34357    # cross compilation standard where they are prefixed with the autoconf
34358    # standard name for the target. For example the binary
34359    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34360    # If we are not cross compiling, then the default compiler name will be
34361    # used.
34362
34363    CXX=
34364    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34365    # before checking the rest of the PATH.
34366    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34367    # step, this should not be necessary.
34368    if test -n "$TOOLCHAIN_PATH"; then
34369      PATH_save="$PATH"
34370      PATH="$TOOLCHAIN_PATH"
34371      for ac_prog in $SEARCH_LIST
34372do
34373  # Extract the first word of "$ac_prog", so it can be a program name with args.
34374set dummy $ac_prog; ac_word=$2
34375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34376$as_echo_n "checking for $ac_word... " >&6; }
34377if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34378  $as_echo_n "(cached) " >&6
34379else
34380  case $TOOLCHAIN_PATH_CXX in
34381  [\\/]* | ?:[\\/]*)
34382  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34383  ;;
34384  *)
34385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34386for as_dir in $PATH
34387do
34388  IFS=$as_save_IFS
34389  test -z "$as_dir" && as_dir=.
34390    for ac_exec_ext in '' $ac_executable_extensions; do
34391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34392    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34394    break 2
34395  fi
34396done
34397  done
34398IFS=$as_save_IFS
34399
34400  ;;
34401esac
34402fi
34403TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34404if test -n "$TOOLCHAIN_PATH_CXX"; then
34405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34406$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34407else
34408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34409$as_echo "no" >&6; }
34410fi
34411
34412
34413  test -n "$TOOLCHAIN_PATH_CXX" && break
34414done
34415
34416      CXX=$TOOLCHAIN_PATH_CXX
34417      PATH="$PATH_save"
34418    fi
34419
34420    # AC_PATH_PROGS can't be run multiple times with the same variable,
34421    # so create a new name for this run.
34422    if test "x$CXX" = x; then
34423      for ac_prog in $SEARCH_LIST
34424do
34425  # Extract the first word of "$ac_prog", so it can be a program name with args.
34426set dummy $ac_prog; ac_word=$2
34427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34428$as_echo_n "checking for $ac_word... " >&6; }
34429if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34430  $as_echo_n "(cached) " >&6
34431else
34432  case $POTENTIAL_CXX in
34433  [\\/]* | ?:[\\/]*)
34434  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34435  ;;
34436  *)
34437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34438for as_dir in $PATH
34439do
34440  IFS=$as_save_IFS
34441  test -z "$as_dir" && as_dir=.
34442    for ac_exec_ext in '' $ac_executable_extensions; do
34443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34444    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34446    break 2
34447  fi
34448done
34449  done
34450IFS=$as_save_IFS
34451
34452  ;;
34453esac
34454fi
34455POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34456if test -n "$POTENTIAL_CXX"; then
34457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34458$as_echo "$POTENTIAL_CXX" >&6; }
34459else
34460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34461$as_echo "no" >&6; }
34462fi
34463
34464
34465  test -n "$POTENTIAL_CXX" && break
34466done
34467
34468      CXX=$POTENTIAL_CXX
34469    fi
34470
34471    if test "x$CXX" = x; then
34472
34473  # Print a helpful message on how to acquire the necessary build dependency.
34474  # devkit is the help tag: freetype, cups, alsa etc
34475  MISSING_DEPENDENCY=devkit
34476
34477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34478    cygwin_help $MISSING_DEPENDENCY
34479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34480    msys_help $MISSING_DEPENDENCY
34481  else
34482    PKGHANDLER_COMMAND=
34483
34484    case $PKGHANDLER in
34485      apt-get)
34486        apt_help     $MISSING_DEPENDENCY ;;
34487      yum)
34488        yum_help     $MISSING_DEPENDENCY ;;
34489      port)
34490        port_help    $MISSING_DEPENDENCY ;;
34491      pkgutil)
34492        pkgutil_help $MISSING_DEPENDENCY ;;
34493      pkgadd)
34494        pkgadd_help  $MISSING_DEPENDENCY ;;
34495    esac
34496
34497    if test "x$PKGHANDLER_COMMAND" != x; then
34498      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34499    fi
34500  fi
34501
34502      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34503    fi
34504  fi
34505
34506  # Now we have a compiler binary in CXX. Make sure it's okay.
34507
34508  # Only process if variable expands to non-empty
34509
34510  if test "x$CXX" != x; then
34511    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34512
34513  # First separate the path from the arguments. This will split at the first
34514  # space.
34515  complete="$CXX"
34516  path="${complete%% *}"
34517  tmp="$complete EOL"
34518  arguments="${tmp#* }"
34519
34520  # Input might be given as Windows format, start by converting to
34521  # unix format.
34522  new_path=`$CYGPATH -u "$path"`
34523
34524  # Now try to locate executable using which
34525  new_path=`$WHICH "$new_path" 2> /dev/null`
34526  # bat and cmd files are not always considered executable in cygwin causing which
34527  # to not find them
34528  if test "x$new_path" = x \
34529      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34530      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34531    new_path=`$CYGPATH -u "$path"`
34532  fi
34533  if test "x$new_path" = x; then
34534    # Oops. Which didn't find the executable.
34535    # The splitting of arguments from the executable at a space might have been incorrect,
34536    # since paths with space are more likely in Windows. Give it another try with the whole
34537    # argument.
34538    path="$complete"
34539    arguments="EOL"
34540    new_path=`$CYGPATH -u "$path"`
34541    new_path=`$WHICH "$new_path" 2> /dev/null`
34542    # bat and cmd files are not always considered executable in cygwin causing which
34543    # to not find them
34544    if test "x$new_path" = x \
34545        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34546        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34547      new_path=`$CYGPATH -u "$path"`
34548    fi
34549    if test "x$new_path" = x; then
34550      # It's still not found. Now this is an unrecoverable error.
34551      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34552$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34553      has_space=`$ECHO "$complete" | $GREP " "`
34554      if test "x$has_space" != x; then
34555        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34556$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34557      fi
34558      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34559    fi
34560  fi
34561
34562  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34563  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34564  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34565  # "foo.exe" is OK but "foo" is an error.
34566  #
34567  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34568  # It is also a way to make sure we got the proper file name for the real test later on.
34569  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34570  if test "x$test_shortpath" = x; then
34571    # Short path failed, file does not exist as specified.
34572    # Try adding .exe or .cmd
34573    if test -f "${new_path}.exe"; then
34574      input_to_shortpath="${new_path}.exe"
34575    elif test -f "${new_path}.cmd"; then
34576      input_to_shortpath="${new_path}.cmd"
34577    else
34578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34579$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34580      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34581$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34582      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34583    fi
34584  else
34585    input_to_shortpath="$new_path"
34586  fi
34587
34588  # Call helper function which possibly converts this using DOS-style short mode.
34589  # If so, the updated path is stored in $new_path.
34590  new_path="$input_to_shortpath"
34591
34592  input_path="$input_to_shortpath"
34593  # Check if we need to convert this using DOS-style short mode. If the path
34594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34595  # take no chances and rewrite it.
34596  # Note: m4 eats our [], so we need to use [ and ] instead.
34597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34598  if test "x$has_forbidden_chars" != x; then
34599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34600    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34601    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34602    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34603      # Going to short mode and back again did indeed matter. Since short mode is
34604      # case insensitive, let's make it lowercase to improve readability.
34605      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34606      # Now convert it back to Unix-style (cygpath)
34607      input_path=`$CYGPATH -u "$shortmode_path"`
34608      new_path="$input_path"
34609    fi
34610  fi
34611
34612  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34613  if test "x$test_cygdrive_prefix" = x; then
34614    # As a simple fix, exclude /usr/bin since it's not a real path.
34615    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34616      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34617      # a path prefixed by /cygdrive for fixpath to work.
34618      new_path="$CYGWIN_ROOT_PATH$input_path"
34619    fi
34620  fi
34621
34622  # remove trailing .exe if any
34623  new_path="${new_path/%.exe/}"
34624
34625    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34626
34627  # First separate the path from the arguments. This will split at the first
34628  # space.
34629  complete="$CXX"
34630  path="${complete%% *}"
34631  tmp="$complete EOL"
34632  arguments="${tmp#* }"
34633
34634  # Input might be given as Windows format, start by converting to
34635  # unix format.
34636  new_path="$path"
34637
34638  windows_path="$new_path"
34639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34640    unix_path=`$CYGPATH -u "$windows_path"`
34641    new_path="$unix_path"
34642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34644    new_path="$unix_path"
34645  fi
34646
34647
34648  # Now try to locate executable using which
34649  new_path=`$WHICH "$new_path" 2> /dev/null`
34650
34651  if test "x$new_path" = x; then
34652    # Oops. Which didn't find the executable.
34653    # The splitting of arguments from the executable at a space might have been incorrect,
34654    # since paths with space are more likely in Windows. Give it another try with the whole
34655    # argument.
34656    path="$complete"
34657    arguments="EOL"
34658    new_path="$path"
34659
34660  windows_path="$new_path"
34661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34662    unix_path=`$CYGPATH -u "$windows_path"`
34663    new_path="$unix_path"
34664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34666    new_path="$unix_path"
34667  fi
34668
34669
34670    new_path=`$WHICH "$new_path" 2> /dev/null`
34671    # bat and cmd files are not always considered executable in MSYS causing which
34672    # to not find them
34673    if test "x$new_path" = x \
34674        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34675        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34676      new_path="$path"
34677
34678  windows_path="$new_path"
34679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34680    unix_path=`$CYGPATH -u "$windows_path"`
34681    new_path="$unix_path"
34682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34684    new_path="$unix_path"
34685  fi
34686
34687    fi
34688
34689    if test "x$new_path" = x; then
34690      # It's still not found. Now this is an unrecoverable error.
34691      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34692$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34693      has_space=`$ECHO "$complete" | $GREP " "`
34694      if test "x$has_space" != x; then
34695        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34696$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34697      fi
34698      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34699    fi
34700  fi
34701
34702  # Now new_path has a complete unix path to the binary
34703  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34704    # Keep paths in /bin as-is, but remove trailing .exe if any
34705    new_path="${new_path/%.exe/}"
34706    # Do not save /bin paths to all_fixpath_prefixes!
34707  else
34708    # Not in mixed or Windows style, start by that.
34709    new_path=`cmd //c echo $new_path`
34710
34711  input_path="$new_path"
34712  # Check if we need to convert this using DOS-style short mode. If the path
34713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34714  # take no chances and rewrite it.
34715  # Note: m4 eats our [], so we need to use [ and ] instead.
34716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34717  if test "x$has_forbidden_chars" != x; then
34718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34719    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34720  fi
34721
34722    # Output is in $new_path
34723
34724  windows_path="$new_path"
34725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34726    unix_path=`$CYGPATH -u "$windows_path"`
34727    new_path="$unix_path"
34728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34730    new_path="$unix_path"
34731  fi
34732
34733    # remove trailing .exe if any
34734    new_path="${new_path/%.exe/}"
34735
34736    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34737    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34738  fi
34739
34740    else
34741      # We're on a unix platform. Hooray! :)
34742      # First separate the path from the arguments. This will split at the first
34743      # space.
34744      complete="$CXX"
34745      path="${complete%% *}"
34746      tmp="$complete EOL"
34747      arguments="${tmp#* }"
34748
34749      # Cannot rely on the command "which" here since it doesn't always work.
34750      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34751      if test -z "$is_absolute_path"; then
34752        # Path to executable is not absolute. Find it.
34753        IFS_save="$IFS"
34754        IFS=:
34755        for p in $PATH; do
34756          if test -f "$p/$path" && test -x "$p/$path"; then
34757            new_path="$p/$path"
34758            break
34759          fi
34760        done
34761        IFS="$IFS_save"
34762      else
34763        # This is an absolute path, we can use it without further modifications.
34764        new_path="$path"
34765      fi
34766
34767      if test "x$new_path" = x; then
34768        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34769$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34770        has_space=`$ECHO "$complete" | $GREP " "`
34771        if test "x$has_space" != x; then
34772          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34773$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34774        fi
34775        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34776      fi
34777    fi
34778
34779    # Now join together the path and the arguments once again
34780    if test "x$arguments" != xEOL; then
34781      new_complete="$new_path ${arguments% *}"
34782    else
34783      new_complete="$new_path"
34784    fi
34785
34786    if test "x$complete" != "x$new_complete"; then
34787      CXX="$new_complete"
34788      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34789$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34790    fi
34791  fi
34792
34793  TEST_COMPILER="$CXX"
34794
34795  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34796$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34797  SYMLINK_ORIGINAL="$TEST_COMPILER"
34798
34799  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34800    # Follow a chain of symbolic links. Use readlink
34801    # where it exists, else fall back to horribly
34802    # complicated shell code.
34803    if test "x$READLINK_TESTED" != yes; then
34804      # On MacOSX there is a readlink tool with a different
34805      # purpose than the GNU readlink tool. Check the found readlink.
34806      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34807      if test "x$ISGNU" = x; then
34808        # A readlink that we do not know how to use.
34809        # Are there other non-GNU readlinks out there?
34810        READLINK_TESTED=yes
34811        READLINK=
34812      fi
34813    fi
34814
34815    if test "x$READLINK" != x; then
34816      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34817    else
34818      # Save the current directory for restoring afterwards
34819      STARTDIR=$PWD
34820      COUNTER=0
34821      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34822      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34823      cd $sym_link_dir
34824      # Use -P flag to resolve symlinks in directories.
34825      cd `$THEPWDCMD -P`
34826      sym_link_dir=`$THEPWDCMD -P`
34827      # Resolve file symlinks
34828      while test $COUNTER -lt 20; do
34829        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34830        if test "x$ISLINK" == x; then
34831          # This is not a symbolic link! We are done!
34832          break
34833        fi
34834        # Again resolve directory symlinks since the target of the just found
34835        # link could be in a different directory
34836        cd `$DIRNAME $ISLINK`
34837        sym_link_dir=`$THEPWDCMD -P`
34838        sym_link_file=`$BASENAME $ISLINK`
34839        let COUNTER=COUNTER+1
34840      done
34841      cd $STARTDIR
34842      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34843    fi
34844  fi
34845
34846  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34847    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34848$as_echo "no symlink" >&6; }
34849  else
34850    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34851$as_echo "$SYMLINK_ORIGINAL" >&6; }
34852
34853    # We can't handle ccache by gcc wrappers, since we need to know if we're
34854    # using ccache. Instead ccache usage must be controlled by a configure option.
34855    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34856    if test "x$COMPILER_BASENAME" = "xccache"; then
34857      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34858$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34859      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34860    fi
34861  fi
34862
34863
34864  COMPILER=$CXX
34865  COMPILER_NAME=$COMPILER_NAME
34866
34867  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34868    # cc -V output typically looks like
34869    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34870    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34871    # Check that this is likely to be the Solaris Studio cc.
34872    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34873    if test $? -ne 0; then
34874      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34875      { $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
34876$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34877      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34878$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34879      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34880$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34881      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34882    fi
34883    # Remove usage instructions (if present), and
34884    # collapse compiler output into a single line
34885    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34886        $SED -e 's/ *[Uu]sage:.*//'`
34887    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34888        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34889  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34890    # xlc -qversion output typically looks like
34891    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34892    #     Version: 11.01.0000.0015
34893    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34894    # Check that this is likely to be the IBM XL C compiler.
34895    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34896    if test $? -ne 0; then
34897      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34898      { $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
34899$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34900      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34901$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34902      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34903$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34904      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34905    fi
34906    # Collapse compiler output into a single line
34907    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34908    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34909        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34910  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34911    # There is no specific version flag, but all output starts with a version string.
34912    # First line typically looks something like:
34913    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34914    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34915    # Check that this is likely to be Microsoft CL.EXE.
34916    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34917    if test $? -ne 0; then
34918      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
34919$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34920      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34921$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34922      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34923    fi
34924    # Collapse compiler output into a single line
34925    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34926    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34927        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34928  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34929    # gcc --version output typically looks like
34930    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34931    #     Copyright (C) 2013 Free Software Foundation, Inc.
34932    #     This is free software; see the source for copying conditions.  There is NO
34933    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34934    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34935    # Check that this is likely to be GCC.
34936    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34937    if test $? -ne 0; then
34938      { $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
34939$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34940      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34941$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34942      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34943    fi
34944    # Remove Copyright and legalese from version string, and
34945    # collapse into a single line
34946    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34947        $SED -e 's/ *Copyright .*//'`
34948    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34949        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34950  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34951    # clang --version output typically looks like
34952    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34953    #    clang version 3.3 (tags/RELEASE_33/final)
34954    # or
34955    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34956    #    Target: x86_64-pc-linux-gnu
34957    #    Thread model: posix
34958    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34959    # Check that this is likely to be clang
34960    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34961    if test $? -ne 0; then
34962      { $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
34963$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34964      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34965$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34966      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34967    fi
34968    # Collapse compiler output into a single line
34969    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34970    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34971        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34972  else
34973      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34974  fi
34975  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34976  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34977  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34978  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34979
34980  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34981$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34982
34983
34984  # Now that we have resolved CXX ourself, let autoconf have its go at it
34985  ac_ext=cpp
34986ac_cpp='$CXXCPP $CPPFLAGS'
34987ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34988ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34989ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34990if test -z "$CXX"; then
34991  if test -n "$CCC"; then
34992    CXX=$CCC
34993  else
34994    if test -n "$ac_tool_prefix"; then
34995  for ac_prog in $CXX
34996  do
34997    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34998set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35000$as_echo_n "checking for $ac_word... " >&6; }
35001if ${ac_cv_prog_CXX+:} false; then :
35002  $as_echo_n "(cached) " >&6
35003else
35004  if test -n "$CXX"; then
35005  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35006else
35007as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35008for as_dir in $PATH
35009do
35010  IFS=$as_save_IFS
35011  test -z "$as_dir" && as_dir=.
35012    for ac_exec_ext in '' $ac_executable_extensions; do
35013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35014    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35016    break 2
35017  fi
35018done
35019  done
35020IFS=$as_save_IFS
35021
35022fi
35023fi
35024CXX=$ac_cv_prog_CXX
35025if test -n "$CXX"; then
35026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35027$as_echo "$CXX" >&6; }
35028else
35029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35030$as_echo "no" >&6; }
35031fi
35032
35033
35034    test -n "$CXX" && break
35035  done
35036fi
35037if test -z "$CXX"; then
35038  ac_ct_CXX=$CXX
35039  for ac_prog in $CXX
35040do
35041  # Extract the first word of "$ac_prog", so it can be a program name with args.
35042set dummy $ac_prog; ac_word=$2
35043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35044$as_echo_n "checking for $ac_word... " >&6; }
35045if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35046  $as_echo_n "(cached) " >&6
35047else
35048  if test -n "$ac_ct_CXX"; then
35049  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35050else
35051as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35052for as_dir in $PATH
35053do
35054  IFS=$as_save_IFS
35055  test -z "$as_dir" && as_dir=.
35056    for ac_exec_ext in '' $ac_executable_extensions; do
35057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35058    ac_cv_prog_ac_ct_CXX="$ac_prog"
35059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35060    break 2
35061  fi
35062done
35063  done
35064IFS=$as_save_IFS
35065
35066fi
35067fi
35068ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35069if test -n "$ac_ct_CXX"; then
35070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35071$as_echo "$ac_ct_CXX" >&6; }
35072else
35073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35074$as_echo "no" >&6; }
35075fi
35076
35077
35078  test -n "$ac_ct_CXX" && break
35079done
35080
35081  if test "x$ac_ct_CXX" = x; then
35082    CXX="g++"
35083  else
35084    case $cross_compiling:$ac_tool_warned in
35085yes:)
35086{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35087$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35088ac_tool_warned=yes ;;
35089esac
35090    CXX=$ac_ct_CXX
35091  fi
35092fi
35093
35094  fi
35095fi
35096# Provide some information about the compiler.
35097$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35098set X $ac_compile
35099ac_compiler=$2
35100for ac_option in --version -v -V -qversion; do
35101  { { ac_try="$ac_compiler $ac_option >&5"
35102case "(($ac_try" in
35103  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35104  *) ac_try_echo=$ac_try;;
35105esac
35106eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35107$as_echo "$ac_try_echo"; } >&5
35108  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35109  ac_status=$?
35110  if test -s conftest.err; then
35111    sed '10a\
35112... rest of stderr output deleted ...
35113         10q' conftest.err >conftest.er1
35114    cat conftest.er1 >&5
35115  fi
35116  rm -f conftest.er1 conftest.err
35117  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35118  test $ac_status = 0; }
35119done
35120
35121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35122$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35123if ${ac_cv_cxx_compiler_gnu+:} false; then :
35124  $as_echo_n "(cached) " >&6
35125else
35126  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35127/* end confdefs.h.  */
35128
35129int
35130main ()
35131{
35132#ifndef __GNUC__
35133       choke me
35134#endif
35135
35136  ;
35137  return 0;
35138}
35139_ACEOF
35140if ac_fn_cxx_try_compile "$LINENO"; then :
35141  ac_compiler_gnu=yes
35142else
35143  ac_compiler_gnu=no
35144fi
35145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35146ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35147
35148fi
35149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35150$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35151if test $ac_compiler_gnu = yes; then
35152  GXX=yes
35153else
35154  GXX=
35155fi
35156ac_test_CXXFLAGS=${CXXFLAGS+set}
35157ac_save_CXXFLAGS=$CXXFLAGS
35158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35159$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35160if ${ac_cv_prog_cxx_g+:} false; then :
35161  $as_echo_n "(cached) " >&6
35162else
35163  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35164   ac_cxx_werror_flag=yes
35165   ac_cv_prog_cxx_g=no
35166   CXXFLAGS="-g"
35167   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35168/* end confdefs.h.  */
35169
35170int
35171main ()
35172{
35173
35174  ;
35175  return 0;
35176}
35177_ACEOF
35178if ac_fn_cxx_try_compile "$LINENO"; then :
35179  ac_cv_prog_cxx_g=yes
35180else
35181  CXXFLAGS=""
35182      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35183/* end confdefs.h.  */
35184
35185int
35186main ()
35187{
35188
35189  ;
35190  return 0;
35191}
35192_ACEOF
35193if ac_fn_cxx_try_compile "$LINENO"; then :
35194
35195else
35196  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35197	 CXXFLAGS="-g"
35198	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35199/* end confdefs.h.  */
35200
35201int
35202main ()
35203{
35204
35205  ;
35206  return 0;
35207}
35208_ACEOF
35209if ac_fn_cxx_try_compile "$LINENO"; then :
35210  ac_cv_prog_cxx_g=yes
35211fi
35212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35213fi
35214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35215fi
35216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35217   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35218fi
35219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35220$as_echo "$ac_cv_prog_cxx_g" >&6; }
35221if test "$ac_test_CXXFLAGS" = set; then
35222  CXXFLAGS=$ac_save_CXXFLAGS
35223elif test $ac_cv_prog_cxx_g = yes; then
35224  if test "$GXX" = yes; then
35225    CXXFLAGS="-g -O2"
35226  else
35227    CXXFLAGS="-g"
35228  fi
35229else
35230  if test "$GXX" = yes; then
35231    CXXFLAGS="-O2"
35232  else
35233    CXXFLAGS=
35234  fi
35235fi
35236ac_ext=cpp
35237ac_cpp='$CXXCPP $CPPFLAGS'
35238ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35239ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35240ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35241
35242
35243  # This is the compiler version number on the form X.Y[.Z]
35244
35245
35246
35247
35248  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35249    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35250$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35251    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35252$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35253  fi
35254
35255  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35256  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
35257    { $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
35258$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;}
35259  fi
35260
35261  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35262    { $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
35263$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35264  fi
35265
35266  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
35267
35268
35269  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35270
35271
35272
35273
35274
35275
35276
35277
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    # Execute function body
35320
35321  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35322  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35323
35324  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
35325    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
35326  fi
35327
35328  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35329    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35330  fi
35331
35332  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35333  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
35334
35335  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35336    :
35337
35338  else
35339    :
35340
35341          { $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
35342$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35343
35344
35345  fi
35346
35347
35348
35349
35350
35351
35352
35353
35354
35355
35356
35357
35358
35359
35360  fi
35361
35362  #
35363  # Setup the preprocessor (CPP and CXXCPP)
35364  #
35365  ac_ext=c
35366ac_cpp='$CPP $CPPFLAGS'
35367ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35368ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35369ac_compiler_gnu=$ac_cv_c_compiler_gnu
35370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35371$as_echo_n "checking how to run the C preprocessor... " >&6; }
35372# On Suns, sometimes $CPP names a directory.
35373if test -n "$CPP" && test -d "$CPP"; then
35374  CPP=
35375fi
35376if test -z "$CPP"; then
35377  if ${ac_cv_prog_CPP+:} false; then :
35378  $as_echo_n "(cached) " >&6
35379else
35380      # Double quotes because CPP needs to be expanded
35381    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35382    do
35383      ac_preproc_ok=false
35384for ac_c_preproc_warn_flag in '' yes
35385do
35386  # Use a header file that comes with gcc, so configuring glibc
35387  # with a fresh cross-compiler works.
35388  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35389  # <limits.h> exists even on freestanding compilers.
35390  # On the NeXT, cc -E runs the code through the compiler's parser,
35391  # not just through cpp. "Syntax error" is here to catch this case.
35392  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35393/* end confdefs.h.  */
35394#ifdef __STDC__
35395# include <limits.h>
35396#else
35397# include <assert.h>
35398#endif
35399		     Syntax error
35400_ACEOF
35401if ac_fn_c_try_cpp "$LINENO"; then :
35402
35403else
35404  # Broken: fails on valid input.
35405continue
35406fi
35407rm -f conftest.err conftest.i conftest.$ac_ext
35408
35409  # OK, works on sane cases.  Now check whether nonexistent headers
35410  # can be detected and how.
35411  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35412/* end confdefs.h.  */
35413#include <ac_nonexistent.h>
35414_ACEOF
35415if ac_fn_c_try_cpp "$LINENO"; then :
35416  # Broken: success on invalid input.
35417continue
35418else
35419  # Passes both tests.
35420ac_preproc_ok=:
35421break
35422fi
35423rm -f conftest.err conftest.i conftest.$ac_ext
35424
35425done
35426# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35427rm -f conftest.i conftest.err conftest.$ac_ext
35428if $ac_preproc_ok; then :
35429  break
35430fi
35431
35432    done
35433    ac_cv_prog_CPP=$CPP
35434
35435fi
35436  CPP=$ac_cv_prog_CPP
35437else
35438  ac_cv_prog_CPP=$CPP
35439fi
35440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35441$as_echo "$CPP" >&6; }
35442ac_preproc_ok=false
35443for ac_c_preproc_warn_flag in '' yes
35444do
35445  # Use a header file that comes with gcc, so configuring glibc
35446  # with a fresh cross-compiler works.
35447  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35448  # <limits.h> exists even on freestanding compilers.
35449  # On the NeXT, cc -E runs the code through the compiler's parser,
35450  # not just through cpp. "Syntax error" is here to catch this case.
35451  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35452/* end confdefs.h.  */
35453#ifdef __STDC__
35454# include <limits.h>
35455#else
35456# include <assert.h>
35457#endif
35458		     Syntax error
35459_ACEOF
35460if ac_fn_c_try_cpp "$LINENO"; then :
35461
35462else
35463  # Broken: fails on valid input.
35464continue
35465fi
35466rm -f conftest.err conftest.i conftest.$ac_ext
35467
35468  # OK, works on sane cases.  Now check whether nonexistent headers
35469  # can be detected and how.
35470  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35471/* end confdefs.h.  */
35472#include <ac_nonexistent.h>
35473_ACEOF
35474if ac_fn_c_try_cpp "$LINENO"; then :
35475  # Broken: success on invalid input.
35476continue
35477else
35478  # Passes both tests.
35479ac_preproc_ok=:
35480break
35481fi
35482rm -f conftest.err conftest.i conftest.$ac_ext
35483
35484done
35485# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35486rm -f conftest.i conftest.err conftest.$ac_ext
35487if $ac_preproc_ok; then :
35488
35489else
35490  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35491$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35492as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35493See \`config.log' for more details" "$LINENO" 5; }
35494fi
35495
35496ac_ext=cpp
35497ac_cpp='$CXXCPP $CPPFLAGS'
35498ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35499ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35500ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35501
35502
35503  # Only process if variable expands to non-empty
35504
35505  if test "x$CPP" != x; then
35506    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35507
35508  # First separate the path from the arguments. This will split at the first
35509  # space.
35510  complete="$CPP"
35511  path="${complete%% *}"
35512  tmp="$complete EOL"
35513  arguments="${tmp#* }"
35514
35515  # Input might be given as Windows format, start by converting to
35516  # unix format.
35517  new_path=`$CYGPATH -u "$path"`
35518
35519  # Now try to locate executable using which
35520  new_path=`$WHICH "$new_path" 2> /dev/null`
35521  # bat and cmd files are not always considered executable in cygwin causing which
35522  # to not find them
35523  if test "x$new_path" = x \
35524      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35525      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35526    new_path=`$CYGPATH -u "$path"`
35527  fi
35528  if test "x$new_path" = x; then
35529    # Oops. Which didn't find the executable.
35530    # The splitting of arguments from the executable at a space might have been incorrect,
35531    # since paths with space are more likely in Windows. Give it another try with the whole
35532    # argument.
35533    path="$complete"
35534    arguments="EOL"
35535    new_path=`$CYGPATH -u "$path"`
35536    new_path=`$WHICH "$new_path" 2> /dev/null`
35537    # bat and cmd files are not always considered executable in cygwin causing which
35538    # to not find them
35539    if test "x$new_path" = x \
35540        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35541        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35542      new_path=`$CYGPATH -u "$path"`
35543    fi
35544    if test "x$new_path" = x; then
35545      # It's still not found. Now this is an unrecoverable error.
35546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35547$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35548      has_space=`$ECHO "$complete" | $GREP " "`
35549      if test "x$has_space" != x; then
35550        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35551$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35552      fi
35553      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35554    fi
35555  fi
35556
35557  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35558  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35559  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35560  # "foo.exe" is OK but "foo" is an error.
35561  #
35562  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35563  # It is also a way to make sure we got the proper file name for the real test later on.
35564  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35565  if test "x$test_shortpath" = x; then
35566    # Short path failed, file does not exist as specified.
35567    # Try adding .exe or .cmd
35568    if test -f "${new_path}.exe"; then
35569      input_to_shortpath="${new_path}.exe"
35570    elif test -f "${new_path}.cmd"; then
35571      input_to_shortpath="${new_path}.cmd"
35572    else
35573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35574$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35575      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35576$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35577      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35578    fi
35579  else
35580    input_to_shortpath="$new_path"
35581  fi
35582
35583  # Call helper function which possibly converts this using DOS-style short mode.
35584  # If so, the updated path is stored in $new_path.
35585  new_path="$input_to_shortpath"
35586
35587  input_path="$input_to_shortpath"
35588  # Check if we need to convert this using DOS-style short mode. If the path
35589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35590  # take no chances and rewrite it.
35591  # Note: m4 eats our [], so we need to use [ and ] instead.
35592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35593  if test "x$has_forbidden_chars" != x; then
35594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35595    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35596    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35597    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35598      # Going to short mode and back again did indeed matter. Since short mode is
35599      # case insensitive, let's make it lowercase to improve readability.
35600      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35601      # Now convert it back to Unix-style (cygpath)
35602      input_path=`$CYGPATH -u "$shortmode_path"`
35603      new_path="$input_path"
35604    fi
35605  fi
35606
35607  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35608  if test "x$test_cygdrive_prefix" = x; then
35609    # As a simple fix, exclude /usr/bin since it's not a real path.
35610    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35611      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35612      # a path prefixed by /cygdrive for fixpath to work.
35613      new_path="$CYGWIN_ROOT_PATH$input_path"
35614    fi
35615  fi
35616
35617  # remove trailing .exe if any
35618  new_path="${new_path/%.exe/}"
35619
35620    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35621
35622  # First separate the path from the arguments. This will split at the first
35623  # space.
35624  complete="$CPP"
35625  path="${complete%% *}"
35626  tmp="$complete EOL"
35627  arguments="${tmp#* }"
35628
35629  # Input might be given as Windows format, start by converting to
35630  # unix format.
35631  new_path="$path"
35632
35633  windows_path="$new_path"
35634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35635    unix_path=`$CYGPATH -u "$windows_path"`
35636    new_path="$unix_path"
35637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35639    new_path="$unix_path"
35640  fi
35641
35642
35643  # Now try to locate executable using which
35644  new_path=`$WHICH "$new_path" 2> /dev/null`
35645
35646  if test "x$new_path" = x; then
35647    # Oops. Which didn't find the executable.
35648    # The splitting of arguments from the executable at a space might have been incorrect,
35649    # since paths with space are more likely in Windows. Give it another try with the whole
35650    # argument.
35651    path="$complete"
35652    arguments="EOL"
35653    new_path="$path"
35654
35655  windows_path="$new_path"
35656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35657    unix_path=`$CYGPATH -u "$windows_path"`
35658    new_path="$unix_path"
35659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35661    new_path="$unix_path"
35662  fi
35663
35664
35665    new_path=`$WHICH "$new_path" 2> /dev/null`
35666    # bat and cmd files are not always considered executable in MSYS causing which
35667    # to not find them
35668    if test "x$new_path" = x \
35669        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35670        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35671      new_path="$path"
35672
35673  windows_path="$new_path"
35674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35675    unix_path=`$CYGPATH -u "$windows_path"`
35676    new_path="$unix_path"
35677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35679    new_path="$unix_path"
35680  fi
35681
35682    fi
35683
35684    if test "x$new_path" = x; then
35685      # It's still not found. Now this is an unrecoverable error.
35686      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35687$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35688      has_space=`$ECHO "$complete" | $GREP " "`
35689      if test "x$has_space" != x; then
35690        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35691$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35692      fi
35693      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35694    fi
35695  fi
35696
35697  # Now new_path has a complete unix path to the binary
35698  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35699    # Keep paths in /bin as-is, but remove trailing .exe if any
35700    new_path="${new_path/%.exe/}"
35701    # Do not save /bin paths to all_fixpath_prefixes!
35702  else
35703    # Not in mixed or Windows style, start by that.
35704    new_path=`cmd //c echo $new_path`
35705
35706  input_path="$new_path"
35707  # Check if we need to convert this using DOS-style short mode. If the path
35708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35709  # take no chances and rewrite it.
35710  # Note: m4 eats our [], so we need to use [ and ] instead.
35711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35712  if test "x$has_forbidden_chars" != x; then
35713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35714    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35715  fi
35716
35717    # Output is in $new_path
35718
35719  windows_path="$new_path"
35720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35721    unix_path=`$CYGPATH -u "$windows_path"`
35722    new_path="$unix_path"
35723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35725    new_path="$unix_path"
35726  fi
35727
35728    # remove trailing .exe if any
35729    new_path="${new_path/%.exe/}"
35730
35731    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35732    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35733  fi
35734
35735    else
35736      # We're on a unix platform. Hooray! :)
35737      # First separate the path from the arguments. This will split at the first
35738      # space.
35739      complete="$CPP"
35740      path="${complete%% *}"
35741      tmp="$complete EOL"
35742      arguments="${tmp#* }"
35743
35744      # Cannot rely on the command "which" here since it doesn't always work.
35745      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35746      if test -z "$is_absolute_path"; then
35747        # Path to executable is not absolute. Find it.
35748        IFS_save="$IFS"
35749        IFS=:
35750        for p in $PATH; do
35751          if test -f "$p/$path" && test -x "$p/$path"; then
35752            new_path="$p/$path"
35753            break
35754          fi
35755        done
35756        IFS="$IFS_save"
35757      else
35758        # This is an absolute path, we can use it without further modifications.
35759        new_path="$path"
35760      fi
35761
35762      if test "x$new_path" = x; then
35763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35764$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35765        has_space=`$ECHO "$complete" | $GREP " "`
35766        if test "x$has_space" != x; then
35767          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35768$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35769        fi
35770        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35771      fi
35772    fi
35773
35774    # Now join together the path and the arguments once again
35775    if test "x$arguments" != xEOL; then
35776      new_complete="$new_path ${arguments% *}"
35777    else
35778      new_complete="$new_path"
35779    fi
35780
35781    if test "x$complete" != "x$new_complete"; then
35782      CPP="$new_complete"
35783      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35784$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35785    fi
35786  fi
35787
35788  ac_ext=cpp
35789ac_cpp='$CXXCPP $CPPFLAGS'
35790ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35791ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35792ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35794$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35795if test -z "$CXXCPP"; then
35796  if ${ac_cv_prog_CXXCPP+:} false; then :
35797  $as_echo_n "(cached) " >&6
35798else
35799      # Double quotes because CXXCPP needs to be expanded
35800    for CXXCPP in "$CXX -E" "/lib/cpp"
35801    do
35802      ac_preproc_ok=false
35803for ac_cxx_preproc_warn_flag in '' yes
35804do
35805  # Use a header file that comes with gcc, so configuring glibc
35806  # with a fresh cross-compiler works.
35807  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35808  # <limits.h> exists even on freestanding compilers.
35809  # On the NeXT, cc -E runs the code through the compiler's parser,
35810  # not just through cpp. "Syntax error" is here to catch this case.
35811  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35812/* end confdefs.h.  */
35813#ifdef __STDC__
35814# include <limits.h>
35815#else
35816# include <assert.h>
35817#endif
35818		     Syntax error
35819_ACEOF
35820if ac_fn_cxx_try_cpp "$LINENO"; then :
35821
35822else
35823  # Broken: fails on valid input.
35824continue
35825fi
35826rm -f conftest.err conftest.i conftest.$ac_ext
35827
35828  # OK, works on sane cases.  Now check whether nonexistent headers
35829  # can be detected and how.
35830  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35831/* end confdefs.h.  */
35832#include <ac_nonexistent.h>
35833_ACEOF
35834if ac_fn_cxx_try_cpp "$LINENO"; then :
35835  # Broken: success on invalid input.
35836continue
35837else
35838  # Passes both tests.
35839ac_preproc_ok=:
35840break
35841fi
35842rm -f conftest.err conftest.i conftest.$ac_ext
35843
35844done
35845# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35846rm -f conftest.i conftest.err conftest.$ac_ext
35847if $ac_preproc_ok; then :
35848  break
35849fi
35850
35851    done
35852    ac_cv_prog_CXXCPP=$CXXCPP
35853
35854fi
35855  CXXCPP=$ac_cv_prog_CXXCPP
35856else
35857  ac_cv_prog_CXXCPP=$CXXCPP
35858fi
35859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35860$as_echo "$CXXCPP" >&6; }
35861ac_preproc_ok=false
35862for ac_cxx_preproc_warn_flag in '' yes
35863do
35864  # Use a header file that comes with gcc, so configuring glibc
35865  # with a fresh cross-compiler works.
35866  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35867  # <limits.h> exists even on freestanding compilers.
35868  # On the NeXT, cc -E runs the code through the compiler's parser,
35869  # not just through cpp. "Syntax error" is here to catch this case.
35870  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35871/* end confdefs.h.  */
35872#ifdef __STDC__
35873# include <limits.h>
35874#else
35875# include <assert.h>
35876#endif
35877		     Syntax error
35878_ACEOF
35879if ac_fn_cxx_try_cpp "$LINENO"; then :
35880
35881else
35882  # Broken: fails on valid input.
35883continue
35884fi
35885rm -f conftest.err conftest.i conftest.$ac_ext
35886
35887  # OK, works on sane cases.  Now check whether nonexistent headers
35888  # can be detected and how.
35889  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35890/* end confdefs.h.  */
35891#include <ac_nonexistent.h>
35892_ACEOF
35893if ac_fn_cxx_try_cpp "$LINENO"; then :
35894  # Broken: success on invalid input.
35895continue
35896else
35897  # Passes both tests.
35898ac_preproc_ok=:
35899break
35900fi
35901rm -f conftest.err conftest.i conftest.$ac_ext
35902
35903done
35904# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35905rm -f conftest.i conftest.err conftest.$ac_ext
35906if $ac_preproc_ok; then :
35907
35908else
35909  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35910$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35911as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35912See \`config.log' for more details" "$LINENO" 5; }
35913fi
35914
35915ac_ext=cpp
35916ac_cpp='$CXXCPP $CPPFLAGS'
35917ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35918ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35919ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35920
35921
35922  # Only process if variable expands to non-empty
35923
35924  if test "x$CXXCPP" != x; then
35925    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35926
35927  # First separate the path from the arguments. This will split at the first
35928  # space.
35929  complete="$CXXCPP"
35930  path="${complete%% *}"
35931  tmp="$complete EOL"
35932  arguments="${tmp#* }"
35933
35934  # Input might be given as Windows format, start by converting to
35935  # unix format.
35936  new_path=`$CYGPATH -u "$path"`
35937
35938  # Now try to locate executable using which
35939  new_path=`$WHICH "$new_path" 2> /dev/null`
35940  # bat and cmd files are not always considered executable in cygwin causing which
35941  # to not find them
35942  if test "x$new_path" = x \
35943      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35944      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35945    new_path=`$CYGPATH -u "$path"`
35946  fi
35947  if test "x$new_path" = x; then
35948    # Oops. Which didn't find the executable.
35949    # The splitting of arguments from the executable at a space might have been incorrect,
35950    # since paths with space are more likely in Windows. Give it another try with the whole
35951    # argument.
35952    path="$complete"
35953    arguments="EOL"
35954    new_path=`$CYGPATH -u "$path"`
35955    new_path=`$WHICH "$new_path" 2> /dev/null`
35956    # bat and cmd files are not always considered executable in cygwin causing which
35957    # to not find them
35958    if test "x$new_path" = x \
35959        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35960        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35961      new_path=`$CYGPATH -u "$path"`
35962    fi
35963    if test "x$new_path" = x; then
35964      # It's still not found. Now this is an unrecoverable error.
35965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35966$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35967      has_space=`$ECHO "$complete" | $GREP " "`
35968      if test "x$has_space" != x; then
35969        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35970$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35971      fi
35972      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35973    fi
35974  fi
35975
35976  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35977  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35978  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35979  # "foo.exe" is OK but "foo" is an error.
35980  #
35981  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35982  # It is also a way to make sure we got the proper file name for the real test later on.
35983  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35984  if test "x$test_shortpath" = x; then
35985    # Short path failed, file does not exist as specified.
35986    # Try adding .exe or .cmd
35987    if test -f "${new_path}.exe"; then
35988      input_to_shortpath="${new_path}.exe"
35989    elif test -f "${new_path}.cmd"; then
35990      input_to_shortpath="${new_path}.cmd"
35991    else
35992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35993$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35994      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35995$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35996      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35997    fi
35998  else
35999    input_to_shortpath="$new_path"
36000  fi
36001
36002  # Call helper function which possibly converts this using DOS-style short mode.
36003  # If so, the updated path is stored in $new_path.
36004  new_path="$input_to_shortpath"
36005
36006  input_path="$input_to_shortpath"
36007  # Check if we need to convert this using DOS-style short mode. If the path
36008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36009  # take no chances and rewrite it.
36010  # Note: m4 eats our [], so we need to use [ and ] instead.
36011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36012  if test "x$has_forbidden_chars" != x; then
36013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36017      # Going to short mode and back again did indeed matter. Since short mode is
36018      # case insensitive, let's make it lowercase to improve readability.
36019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36020      # Now convert it back to Unix-style (cygpath)
36021      input_path=`$CYGPATH -u "$shortmode_path"`
36022      new_path="$input_path"
36023    fi
36024  fi
36025
36026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36027  if test "x$test_cygdrive_prefix" = x; then
36028    # As a simple fix, exclude /usr/bin since it's not a real path.
36029    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36031      # a path prefixed by /cygdrive for fixpath to work.
36032      new_path="$CYGWIN_ROOT_PATH$input_path"
36033    fi
36034  fi
36035
36036  # remove trailing .exe if any
36037  new_path="${new_path/%.exe/}"
36038
36039    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36040
36041  # First separate the path from the arguments. This will split at the first
36042  # space.
36043  complete="$CXXCPP"
36044  path="${complete%% *}"
36045  tmp="$complete EOL"
36046  arguments="${tmp#* }"
36047
36048  # Input might be given as Windows format, start by converting to
36049  # unix format.
36050  new_path="$path"
36051
36052  windows_path="$new_path"
36053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36054    unix_path=`$CYGPATH -u "$windows_path"`
36055    new_path="$unix_path"
36056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36058    new_path="$unix_path"
36059  fi
36060
36061
36062  # Now try to locate executable using which
36063  new_path=`$WHICH "$new_path" 2> /dev/null`
36064
36065  if test "x$new_path" = x; then
36066    # Oops. Which didn't find the executable.
36067    # The splitting of arguments from the executable at a space might have been incorrect,
36068    # since paths with space are more likely in Windows. Give it another try with the whole
36069    # argument.
36070    path="$complete"
36071    arguments="EOL"
36072    new_path="$path"
36073
36074  windows_path="$new_path"
36075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36076    unix_path=`$CYGPATH -u "$windows_path"`
36077    new_path="$unix_path"
36078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36080    new_path="$unix_path"
36081  fi
36082
36083
36084    new_path=`$WHICH "$new_path" 2> /dev/null`
36085    # bat and cmd files are not always considered executable in MSYS causing which
36086    # to not find them
36087    if test "x$new_path" = x \
36088        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36089        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36090      new_path="$path"
36091
36092  windows_path="$new_path"
36093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36094    unix_path=`$CYGPATH -u "$windows_path"`
36095    new_path="$unix_path"
36096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36098    new_path="$unix_path"
36099  fi
36100
36101    fi
36102
36103    if test "x$new_path" = x; then
36104      # It's still not found. Now this is an unrecoverable error.
36105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36106$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36107      has_space=`$ECHO "$complete" | $GREP " "`
36108      if test "x$has_space" != x; then
36109        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36110$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36111      fi
36112      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36113    fi
36114  fi
36115
36116  # Now new_path has a complete unix path to the binary
36117  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36118    # Keep paths in /bin as-is, but remove trailing .exe if any
36119    new_path="${new_path/%.exe/}"
36120    # Do not save /bin paths to all_fixpath_prefixes!
36121  else
36122    # Not in mixed or Windows style, start by that.
36123    new_path=`cmd //c echo $new_path`
36124
36125  input_path="$new_path"
36126  # Check if we need to convert this using DOS-style short mode. If the path
36127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36128  # take no chances and rewrite it.
36129  # Note: m4 eats our [], so we need to use [ and ] instead.
36130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36131  if test "x$has_forbidden_chars" != x; then
36132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36134  fi
36135
36136    # Output is in $new_path
36137
36138  windows_path="$new_path"
36139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36140    unix_path=`$CYGPATH -u "$windows_path"`
36141    new_path="$unix_path"
36142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36144    new_path="$unix_path"
36145  fi
36146
36147    # remove trailing .exe if any
36148    new_path="${new_path/%.exe/}"
36149
36150    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36151    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36152  fi
36153
36154    else
36155      # We're on a unix platform. Hooray! :)
36156      # First separate the path from the arguments. This will split at the first
36157      # space.
36158      complete="$CXXCPP"
36159      path="${complete%% *}"
36160      tmp="$complete EOL"
36161      arguments="${tmp#* }"
36162
36163      # Cannot rely on the command "which" here since it doesn't always work.
36164      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36165      if test -z "$is_absolute_path"; then
36166        # Path to executable is not absolute. Find it.
36167        IFS_save="$IFS"
36168        IFS=:
36169        for p in $PATH; do
36170          if test -f "$p/$path" && test -x "$p/$path"; then
36171            new_path="$p/$path"
36172            break
36173          fi
36174        done
36175        IFS="$IFS_save"
36176      else
36177        # This is an absolute path, we can use it without further modifications.
36178        new_path="$path"
36179      fi
36180
36181      if test "x$new_path" = x; then
36182        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36183$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36184        has_space=`$ECHO "$complete" | $GREP " "`
36185        if test "x$has_space" != x; then
36186          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36187$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36188        fi
36189        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36190      fi
36191    fi
36192
36193    # Now join together the path and the arguments once again
36194    if test "x$arguments" != xEOL; then
36195      new_complete="$new_path ${arguments% *}"
36196    else
36197      new_complete="$new_path"
36198    fi
36199
36200    if test "x$complete" != "x$new_complete"; then
36201      CXXCPP="$new_complete"
36202      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36203$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36204    fi
36205  fi
36206
36207
36208  #
36209  # Setup the linker (LD)
36210  #
36211  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36212    # In the Microsoft toolchain we have a separate LD command "link".
36213    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36214    # a cygwin program for something completely different.
36215    # Extract the first word of "link", so it can be a program name with args.
36216set dummy link; ac_word=$2
36217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36218$as_echo_n "checking for $ac_word... " >&6; }
36219if ${ac_cv_prog_LD+:} false; then :
36220  $as_echo_n "(cached) " >&6
36221else
36222  if test -n "$LD"; then
36223  ac_cv_prog_LD="$LD" # Let the user override the test.
36224else
36225  ac_prog_rejected=no
36226as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36227for as_dir in $PATH
36228do
36229  IFS=$as_save_IFS
36230  test -z "$as_dir" && as_dir=.
36231    for ac_exec_ext in '' $ac_executable_extensions; do
36232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36233    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36234       ac_prog_rejected=yes
36235       continue
36236     fi
36237    ac_cv_prog_LD="link"
36238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36239    break 2
36240  fi
36241done
36242  done
36243IFS=$as_save_IFS
36244
36245if test $ac_prog_rejected = yes; then
36246  # We found a bogon in the path, so make sure we never use it.
36247  set dummy $ac_cv_prog_LD
36248  shift
36249  if test $# != 0; then
36250    # We chose a different compiler from the bogus one.
36251    # However, it has the same basename, so the bogon will be chosen
36252    # first if we set LD to just the basename; use the full file name.
36253    shift
36254    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36255  fi
36256fi
36257fi
36258fi
36259LD=$ac_cv_prog_LD
36260if test -n "$LD"; then
36261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36262$as_echo "$LD" >&6; }
36263else
36264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36265$as_echo "no" >&6; }
36266fi
36267
36268
36269
36270  # Only process if variable expands to non-empty
36271
36272  if test "x$LD" != x; then
36273    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36274
36275  # First separate the path from the arguments. This will split at the first
36276  # space.
36277  complete="$LD"
36278  path="${complete%% *}"
36279  tmp="$complete EOL"
36280  arguments="${tmp#* }"
36281
36282  # Input might be given as Windows format, start by converting to
36283  # unix format.
36284  new_path=`$CYGPATH -u "$path"`
36285
36286  # Now try to locate executable using which
36287  new_path=`$WHICH "$new_path" 2> /dev/null`
36288  # bat and cmd files are not always considered executable in cygwin causing which
36289  # to not find them
36290  if test "x$new_path" = x \
36291      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36292      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36293    new_path=`$CYGPATH -u "$path"`
36294  fi
36295  if test "x$new_path" = x; then
36296    # Oops. Which didn't find the executable.
36297    # The splitting of arguments from the executable at a space might have been incorrect,
36298    # since paths with space are more likely in Windows. Give it another try with the whole
36299    # argument.
36300    path="$complete"
36301    arguments="EOL"
36302    new_path=`$CYGPATH -u "$path"`
36303    new_path=`$WHICH "$new_path" 2> /dev/null`
36304    # bat and cmd files are not always considered executable in cygwin causing which
36305    # to not find them
36306    if test "x$new_path" = x \
36307        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36308        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36309      new_path=`$CYGPATH -u "$path"`
36310    fi
36311    if test "x$new_path" = x; then
36312      # It's still not found. Now this is an unrecoverable error.
36313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36314$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36315      has_space=`$ECHO "$complete" | $GREP " "`
36316      if test "x$has_space" != x; then
36317        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36318$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36319      fi
36320      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36321    fi
36322  fi
36323
36324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36327  # "foo.exe" is OK but "foo" is an error.
36328  #
36329  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36330  # It is also a way to make sure we got the proper file name for the real test later on.
36331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36332  if test "x$test_shortpath" = x; then
36333    # Short path failed, file does not exist as specified.
36334    # Try adding .exe or .cmd
36335    if test -f "${new_path}.exe"; then
36336      input_to_shortpath="${new_path}.exe"
36337    elif test -f "${new_path}.cmd"; then
36338      input_to_shortpath="${new_path}.cmd"
36339    else
36340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36341$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36342      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36343$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36344      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36345    fi
36346  else
36347    input_to_shortpath="$new_path"
36348  fi
36349
36350  # Call helper function which possibly converts this using DOS-style short mode.
36351  # If so, the updated path is stored in $new_path.
36352  new_path="$input_to_shortpath"
36353
36354  input_path="$input_to_shortpath"
36355  # Check if we need to convert this using DOS-style short mode. If the path
36356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36357  # take no chances and rewrite it.
36358  # Note: m4 eats our [], so we need to use [ and ] instead.
36359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36360  if test "x$has_forbidden_chars" != x; then
36361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36362    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36363    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36364    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36365      # Going to short mode and back again did indeed matter. Since short mode is
36366      # case insensitive, let's make it lowercase to improve readability.
36367      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36368      # Now convert it back to Unix-style (cygpath)
36369      input_path=`$CYGPATH -u "$shortmode_path"`
36370      new_path="$input_path"
36371    fi
36372  fi
36373
36374  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36375  if test "x$test_cygdrive_prefix" = x; then
36376    # As a simple fix, exclude /usr/bin since it's not a real path.
36377    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36378      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36379      # a path prefixed by /cygdrive for fixpath to work.
36380      new_path="$CYGWIN_ROOT_PATH$input_path"
36381    fi
36382  fi
36383
36384  # remove trailing .exe if any
36385  new_path="${new_path/%.exe/}"
36386
36387    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36388
36389  # First separate the path from the arguments. This will split at the first
36390  # space.
36391  complete="$LD"
36392  path="${complete%% *}"
36393  tmp="$complete EOL"
36394  arguments="${tmp#* }"
36395
36396  # Input might be given as Windows format, start by converting to
36397  # unix format.
36398  new_path="$path"
36399
36400  windows_path="$new_path"
36401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36402    unix_path=`$CYGPATH -u "$windows_path"`
36403    new_path="$unix_path"
36404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36406    new_path="$unix_path"
36407  fi
36408
36409
36410  # Now try to locate executable using which
36411  new_path=`$WHICH "$new_path" 2> /dev/null`
36412
36413  if test "x$new_path" = x; then
36414    # Oops. Which didn't find the executable.
36415    # The splitting of arguments from the executable at a space might have been incorrect,
36416    # since paths with space are more likely in Windows. Give it another try with the whole
36417    # argument.
36418    path="$complete"
36419    arguments="EOL"
36420    new_path="$path"
36421
36422  windows_path="$new_path"
36423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36424    unix_path=`$CYGPATH -u "$windows_path"`
36425    new_path="$unix_path"
36426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36428    new_path="$unix_path"
36429  fi
36430
36431
36432    new_path=`$WHICH "$new_path" 2> /dev/null`
36433    # bat and cmd files are not always considered executable in MSYS causing which
36434    # to not find them
36435    if test "x$new_path" = x \
36436        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36437        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36438      new_path="$path"
36439
36440  windows_path="$new_path"
36441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36442    unix_path=`$CYGPATH -u "$windows_path"`
36443    new_path="$unix_path"
36444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36446    new_path="$unix_path"
36447  fi
36448
36449    fi
36450
36451    if test "x$new_path" = x; then
36452      # It's still not found. Now this is an unrecoverable error.
36453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36454$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36455      has_space=`$ECHO "$complete" | $GREP " "`
36456      if test "x$has_space" != x; then
36457        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36458$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36459      fi
36460      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36461    fi
36462  fi
36463
36464  # Now new_path has a complete unix path to the binary
36465  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36466    # Keep paths in /bin as-is, but remove trailing .exe if any
36467    new_path="${new_path/%.exe/}"
36468    # Do not save /bin paths to all_fixpath_prefixes!
36469  else
36470    # Not in mixed or Windows style, start by that.
36471    new_path=`cmd //c echo $new_path`
36472
36473  input_path="$new_path"
36474  # Check if we need to convert this using DOS-style short mode. If the path
36475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36476  # take no chances and rewrite it.
36477  # Note: m4 eats our [], so we need to use [ and ] instead.
36478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36479  if test "x$has_forbidden_chars" != x; then
36480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36482  fi
36483
36484    # Output is in $new_path
36485
36486  windows_path="$new_path"
36487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36488    unix_path=`$CYGPATH -u "$windows_path"`
36489    new_path="$unix_path"
36490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36492    new_path="$unix_path"
36493  fi
36494
36495    # remove trailing .exe if any
36496    new_path="${new_path/%.exe/}"
36497
36498    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36499    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36500  fi
36501
36502    else
36503      # We're on a unix platform. Hooray! :)
36504      # First separate the path from the arguments. This will split at the first
36505      # space.
36506      complete="$LD"
36507      path="${complete%% *}"
36508      tmp="$complete EOL"
36509      arguments="${tmp#* }"
36510
36511      # Cannot rely on the command "which" here since it doesn't always work.
36512      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36513      if test -z "$is_absolute_path"; then
36514        # Path to executable is not absolute. Find it.
36515        IFS_save="$IFS"
36516        IFS=:
36517        for p in $PATH; do
36518          if test -f "$p/$path" && test -x "$p/$path"; then
36519            new_path="$p/$path"
36520            break
36521          fi
36522        done
36523        IFS="$IFS_save"
36524      else
36525        # This is an absolute path, we can use it without further modifications.
36526        new_path="$path"
36527      fi
36528
36529      if test "x$new_path" = x; then
36530        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36531$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36532        has_space=`$ECHO "$complete" | $GREP " "`
36533        if test "x$has_space" != x; then
36534          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36535$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36536        fi
36537        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36538      fi
36539    fi
36540
36541    # Now join together the path and the arguments once again
36542    if test "x$arguments" != xEOL; then
36543      new_complete="$new_path ${arguments% *}"
36544    else
36545      new_complete="$new_path"
36546    fi
36547
36548    if test "x$complete" != "x$new_complete"; then
36549      LD="$new_complete"
36550      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36551$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36552    fi
36553  fi
36554
36555    # Verify that we indeed succeeded with this trick.
36556    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36557$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36558    "$LD" --version > /dev/null
36559    if test $? -eq 0 ; then
36560      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36561$as_echo "no" >&6; }
36562      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36563    else
36564      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36565$as_echo "yes" >&6; }
36566    fi
36567    LDCXX="$LD"
36568  else
36569    # All other toolchains use the compiler to link.
36570    LD="$CC"
36571    LDCXX="$CXX"
36572  fi
36573
36574  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36575
36576
36577  #
36578  # Setup the assembler (AS)
36579  #
36580  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36581
36582
36583  # Publish this variable in the help.
36584
36585
36586  if [ -z "${AS+x}" ]; then
36587    # The variable is not set by user, try to locate tool using the code snippet
36588    for ac_prog in as
36589do
36590  # Extract the first word of "$ac_prog", so it can be a program name with args.
36591set dummy $ac_prog; ac_word=$2
36592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36593$as_echo_n "checking for $ac_word... " >&6; }
36594if ${ac_cv_path_AS+:} false; then :
36595  $as_echo_n "(cached) " >&6
36596else
36597  case $AS in
36598  [\\/]* | ?:[\\/]*)
36599  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36600  ;;
36601  *)
36602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36603for as_dir in $PATH
36604do
36605  IFS=$as_save_IFS
36606  test -z "$as_dir" && as_dir=.
36607    for ac_exec_ext in '' $ac_executable_extensions; do
36608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36609    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36611    break 2
36612  fi
36613done
36614  done
36615IFS=$as_save_IFS
36616
36617  ;;
36618esac
36619fi
36620AS=$ac_cv_path_AS
36621if test -n "$AS"; then
36622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36623$as_echo "$AS" >&6; }
36624else
36625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36626$as_echo "no" >&6; }
36627fi
36628
36629
36630  test -n "$AS" && break
36631done
36632
36633  else
36634    # The variable is set, but is it from the command line or the environment?
36635
36636    # Try to remove the string !AS! from our list.
36637    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36638    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36639      # If it failed, the variable was not from the command line. Ignore it,
36640      # but warn the user (except for BASH, which is always set by the calling BASH).
36641      if test "xAS" != xBASH; then
36642        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36643$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36644      fi
36645      # Try to locate tool using the code snippet
36646      for ac_prog in as
36647do
36648  # Extract the first word of "$ac_prog", so it can be a program name with args.
36649set dummy $ac_prog; ac_word=$2
36650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36651$as_echo_n "checking for $ac_word... " >&6; }
36652if ${ac_cv_path_AS+:} false; then :
36653  $as_echo_n "(cached) " >&6
36654else
36655  case $AS in
36656  [\\/]* | ?:[\\/]*)
36657  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36658  ;;
36659  *)
36660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36661for as_dir in $PATH
36662do
36663  IFS=$as_save_IFS
36664  test -z "$as_dir" && as_dir=.
36665    for ac_exec_ext in '' $ac_executable_extensions; do
36666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36667    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36669    break 2
36670  fi
36671done
36672  done
36673IFS=$as_save_IFS
36674
36675  ;;
36676esac
36677fi
36678AS=$ac_cv_path_AS
36679if test -n "$AS"; then
36680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36681$as_echo "$AS" >&6; }
36682else
36683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36684$as_echo "no" >&6; }
36685fi
36686
36687
36688  test -n "$AS" && break
36689done
36690
36691    else
36692      # If it succeeded, then it was overridden by the user. We will use it
36693      # for the tool.
36694
36695      # First remove it from the list of overridden variables, so we can test
36696      # for unknown variables in the end.
36697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36698
36699      # Check if we try to supply an empty value
36700      if test "x$AS" = x; then
36701        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36702$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36704$as_echo_n "checking for AS... " >&6; }
36705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36706$as_echo "disabled" >&6; }
36707      else
36708        # Check if the provided tool contains a complete path.
36709        tool_specified="$AS"
36710        tool_basename="${tool_specified##*/}"
36711        if test "x$tool_basename" = "x$tool_specified"; then
36712          # A command without a complete path is provided, search $PATH.
36713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36714$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36715          # Extract the first word of "$tool_basename", so it can be a program name with args.
36716set dummy $tool_basename; ac_word=$2
36717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36718$as_echo_n "checking for $ac_word... " >&6; }
36719if ${ac_cv_path_AS+:} false; then :
36720  $as_echo_n "(cached) " >&6
36721else
36722  case $AS in
36723  [\\/]* | ?:[\\/]*)
36724  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36725  ;;
36726  *)
36727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36728for as_dir in $PATH
36729do
36730  IFS=$as_save_IFS
36731  test -z "$as_dir" && as_dir=.
36732    for ac_exec_ext in '' $ac_executable_extensions; do
36733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36734    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36736    break 2
36737  fi
36738done
36739  done
36740IFS=$as_save_IFS
36741
36742  ;;
36743esac
36744fi
36745AS=$ac_cv_path_AS
36746if test -n "$AS"; then
36747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36748$as_echo "$AS" >&6; }
36749else
36750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36751$as_echo "no" >&6; }
36752fi
36753
36754
36755          if test "x$AS" = x; then
36756            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36757          fi
36758        else
36759          # Otherwise we believe it is a complete path. Use it as it is.
36760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36761$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36762          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36763$as_echo_n "checking for AS... " >&6; }
36764          if test ! -x "$tool_specified"; then
36765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36766$as_echo "not found" >&6; }
36767            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36768          fi
36769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36770$as_echo "$tool_specified" >&6; }
36771        fi
36772      fi
36773    fi
36774
36775  fi
36776
36777
36778
36779  # Only process if variable expands to non-empty
36780
36781  if test "x$AS" != x; then
36782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36783
36784  # First separate the path from the arguments. This will split at the first
36785  # space.
36786  complete="$AS"
36787  path="${complete%% *}"
36788  tmp="$complete EOL"
36789  arguments="${tmp#* }"
36790
36791  # Input might be given as Windows format, start by converting to
36792  # unix format.
36793  new_path=`$CYGPATH -u "$path"`
36794
36795  # Now try to locate executable using which
36796  new_path=`$WHICH "$new_path" 2> /dev/null`
36797  # bat and cmd files are not always considered executable in cygwin causing which
36798  # to not find them
36799  if test "x$new_path" = x \
36800      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36801      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36802    new_path=`$CYGPATH -u "$path"`
36803  fi
36804  if test "x$new_path" = x; then
36805    # Oops. Which didn't find the executable.
36806    # The splitting of arguments from the executable at a space might have been incorrect,
36807    # since paths with space are more likely in Windows. Give it another try with the whole
36808    # argument.
36809    path="$complete"
36810    arguments="EOL"
36811    new_path=`$CYGPATH -u "$path"`
36812    new_path=`$WHICH "$new_path" 2> /dev/null`
36813    # bat and cmd files are not always considered executable in cygwin causing which
36814    # to not find them
36815    if test "x$new_path" = x \
36816        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36817        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36818      new_path=`$CYGPATH -u "$path"`
36819    fi
36820    if test "x$new_path" = x; then
36821      # It's still not found. Now this is an unrecoverable error.
36822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36823$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36824      has_space=`$ECHO "$complete" | $GREP " "`
36825      if test "x$has_space" != x; then
36826        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36827$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36828      fi
36829      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36830    fi
36831  fi
36832
36833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36836  # "foo.exe" is OK but "foo" is an error.
36837  #
36838  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36839  # It is also a way to make sure we got the proper file name for the real test later on.
36840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36841  if test "x$test_shortpath" = x; then
36842    # Short path failed, file does not exist as specified.
36843    # Try adding .exe or .cmd
36844    if test -f "${new_path}.exe"; then
36845      input_to_shortpath="${new_path}.exe"
36846    elif test -f "${new_path}.cmd"; then
36847      input_to_shortpath="${new_path}.cmd"
36848    else
36849      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36850$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36851      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36852$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36853      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36854    fi
36855  else
36856    input_to_shortpath="$new_path"
36857  fi
36858
36859  # Call helper function which possibly converts this using DOS-style short mode.
36860  # If so, the updated path is stored in $new_path.
36861  new_path="$input_to_shortpath"
36862
36863  input_path="$input_to_shortpath"
36864  # Check if we need to convert this using DOS-style short mode. If the path
36865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36866  # take no chances and rewrite it.
36867  # Note: m4 eats our [], so we need to use [ and ] instead.
36868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36869  if test "x$has_forbidden_chars" != x; then
36870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36874      # Going to short mode and back again did indeed matter. Since short mode is
36875      # case insensitive, let's make it lowercase to improve readability.
36876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36877      # Now convert it back to Unix-style (cygpath)
36878      input_path=`$CYGPATH -u "$shortmode_path"`
36879      new_path="$input_path"
36880    fi
36881  fi
36882
36883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36884  if test "x$test_cygdrive_prefix" = x; then
36885    # As a simple fix, exclude /usr/bin since it's not a real path.
36886    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36888      # a path prefixed by /cygdrive for fixpath to work.
36889      new_path="$CYGWIN_ROOT_PATH$input_path"
36890    fi
36891  fi
36892
36893  # remove trailing .exe if any
36894  new_path="${new_path/%.exe/}"
36895
36896    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36897
36898  # First separate the path from the arguments. This will split at the first
36899  # space.
36900  complete="$AS"
36901  path="${complete%% *}"
36902  tmp="$complete EOL"
36903  arguments="${tmp#* }"
36904
36905  # Input might be given as Windows format, start by converting to
36906  # unix format.
36907  new_path="$path"
36908
36909  windows_path="$new_path"
36910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36911    unix_path=`$CYGPATH -u "$windows_path"`
36912    new_path="$unix_path"
36913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36915    new_path="$unix_path"
36916  fi
36917
36918
36919  # Now try to locate executable using which
36920  new_path=`$WHICH "$new_path" 2> /dev/null`
36921
36922  if test "x$new_path" = x; then
36923    # Oops. Which didn't find the executable.
36924    # The splitting of arguments from the executable at a space might have been incorrect,
36925    # since paths with space are more likely in Windows. Give it another try with the whole
36926    # argument.
36927    path="$complete"
36928    arguments="EOL"
36929    new_path="$path"
36930
36931  windows_path="$new_path"
36932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36933    unix_path=`$CYGPATH -u "$windows_path"`
36934    new_path="$unix_path"
36935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36937    new_path="$unix_path"
36938  fi
36939
36940
36941    new_path=`$WHICH "$new_path" 2> /dev/null`
36942    # bat and cmd files are not always considered executable in MSYS causing which
36943    # to not find them
36944    if test "x$new_path" = x \
36945        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36946        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36947      new_path="$path"
36948
36949  windows_path="$new_path"
36950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36951    unix_path=`$CYGPATH -u "$windows_path"`
36952    new_path="$unix_path"
36953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36955    new_path="$unix_path"
36956  fi
36957
36958    fi
36959
36960    if test "x$new_path" = x; then
36961      # It's still not found. Now this is an unrecoverable error.
36962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36963$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36964      has_space=`$ECHO "$complete" | $GREP " "`
36965      if test "x$has_space" != x; then
36966        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36967$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36968      fi
36969      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36970    fi
36971  fi
36972
36973  # Now new_path has a complete unix path to the binary
36974  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36975    # Keep paths in /bin as-is, but remove trailing .exe if any
36976    new_path="${new_path/%.exe/}"
36977    # Do not save /bin paths to all_fixpath_prefixes!
36978  else
36979    # Not in mixed or Windows style, start by that.
36980    new_path=`cmd //c echo $new_path`
36981
36982  input_path="$new_path"
36983  # Check if we need to convert this using DOS-style short mode. If the path
36984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36985  # take no chances and rewrite it.
36986  # Note: m4 eats our [], so we need to use [ and ] instead.
36987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36988  if test "x$has_forbidden_chars" != x; then
36989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36991  fi
36992
36993    # Output is in $new_path
36994
36995  windows_path="$new_path"
36996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36997    unix_path=`$CYGPATH -u "$windows_path"`
36998    new_path="$unix_path"
36999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37001    new_path="$unix_path"
37002  fi
37003
37004    # remove trailing .exe if any
37005    new_path="${new_path/%.exe/}"
37006
37007    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37008    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37009  fi
37010
37011    else
37012      # We're on a unix platform. Hooray! :)
37013      # First separate the path from the arguments. This will split at the first
37014      # space.
37015      complete="$AS"
37016      path="${complete%% *}"
37017      tmp="$complete EOL"
37018      arguments="${tmp#* }"
37019
37020      # Cannot rely on the command "which" here since it doesn't always work.
37021      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37022      if test -z "$is_absolute_path"; then
37023        # Path to executable is not absolute. Find it.
37024        IFS_save="$IFS"
37025        IFS=:
37026        for p in $PATH; do
37027          if test -f "$p/$path" && test -x "$p/$path"; then
37028            new_path="$p/$path"
37029            break
37030          fi
37031        done
37032        IFS="$IFS_save"
37033      else
37034        # This is an absolute path, we can use it without further modifications.
37035        new_path="$path"
37036      fi
37037
37038      if test "x$new_path" = x; then
37039        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37040$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37041        has_space=`$ECHO "$complete" | $GREP " "`
37042        if test "x$has_space" != x; then
37043          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37044$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37045        fi
37046        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37047      fi
37048    fi
37049
37050    # Now join together the path and the arguments once again
37051    if test "x$arguments" != xEOL; then
37052      new_complete="$new_path ${arguments% *}"
37053    else
37054      new_complete="$new_path"
37055    fi
37056
37057    if test "x$complete" != "x$new_complete"; then
37058      AS="$new_complete"
37059      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37060$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37061    fi
37062  fi
37063
37064    if test "x$AS" = x; then
37065      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37066    fi
37067  else
37068    # FIXME: is this correct for microsoft?
37069    AS="$CC -c"
37070  fi
37071
37072
37073  #
37074  # Setup the archiver (AR)
37075  #
37076  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37077    # The corresponding ar tool is lib.exe (used to create static libraries)
37078    # Extract the first word of "lib", so it can be a program name with args.
37079set dummy lib; ac_word=$2
37080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37081$as_echo_n "checking for $ac_word... " >&6; }
37082if ${ac_cv_prog_AR+:} false; then :
37083  $as_echo_n "(cached) " >&6
37084else
37085  if test -n "$AR"; then
37086  ac_cv_prog_AR="$AR" # Let the user override the test.
37087else
37088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37089for as_dir in $PATH
37090do
37091  IFS=$as_save_IFS
37092  test -z "$as_dir" && as_dir=.
37093    for ac_exec_ext in '' $ac_executable_extensions; do
37094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37095    ac_cv_prog_AR="lib"
37096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37097    break 2
37098  fi
37099done
37100  done
37101IFS=$as_save_IFS
37102
37103fi
37104fi
37105AR=$ac_cv_prog_AR
37106if test -n "$AR"; then
37107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37108$as_echo "$AR" >&6; }
37109else
37110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37111$as_echo "no" >&6; }
37112fi
37113
37114
37115  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37116
37117
37118  # Publish this variable in the help.
37119
37120
37121  if [ -z "${AR+x}" ]; then
37122    # The variable is not set by user, try to locate tool using the code snippet
37123    if test -n "$ac_tool_prefix"; then
37124  for ac_prog in ar gcc-ar
37125  do
37126    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37127set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37129$as_echo_n "checking for $ac_word... " >&6; }
37130if ${ac_cv_prog_AR+:} false; then :
37131  $as_echo_n "(cached) " >&6
37132else
37133  if test -n "$AR"; then
37134  ac_cv_prog_AR="$AR" # Let the user override the test.
37135else
37136as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37137for as_dir in $PATH
37138do
37139  IFS=$as_save_IFS
37140  test -z "$as_dir" && as_dir=.
37141    for ac_exec_ext in '' $ac_executable_extensions; do
37142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37143    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37145    break 2
37146  fi
37147done
37148  done
37149IFS=$as_save_IFS
37150
37151fi
37152fi
37153AR=$ac_cv_prog_AR
37154if test -n "$AR"; then
37155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37156$as_echo "$AR" >&6; }
37157else
37158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37159$as_echo "no" >&6; }
37160fi
37161
37162
37163    test -n "$AR" && break
37164  done
37165fi
37166if test -z "$AR"; then
37167  ac_ct_AR=$AR
37168  for ac_prog in ar gcc-ar
37169do
37170  # Extract the first word of "$ac_prog", so it can be a program name with args.
37171set dummy $ac_prog; ac_word=$2
37172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37173$as_echo_n "checking for $ac_word... " >&6; }
37174if ${ac_cv_prog_ac_ct_AR+:} false; then :
37175  $as_echo_n "(cached) " >&6
37176else
37177  if test -n "$ac_ct_AR"; then
37178  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37179else
37180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37181for as_dir in $PATH
37182do
37183  IFS=$as_save_IFS
37184  test -z "$as_dir" && as_dir=.
37185    for ac_exec_ext in '' $ac_executable_extensions; do
37186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37187    ac_cv_prog_ac_ct_AR="$ac_prog"
37188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37189    break 2
37190  fi
37191done
37192  done
37193IFS=$as_save_IFS
37194
37195fi
37196fi
37197ac_ct_AR=$ac_cv_prog_ac_ct_AR
37198if test -n "$ac_ct_AR"; then
37199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37200$as_echo "$ac_ct_AR" >&6; }
37201else
37202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37203$as_echo "no" >&6; }
37204fi
37205
37206
37207  test -n "$ac_ct_AR" && break
37208done
37209
37210  if test "x$ac_ct_AR" = x; then
37211    AR=""
37212  else
37213    case $cross_compiling:$ac_tool_warned in
37214yes:)
37215{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37216$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37217ac_tool_warned=yes ;;
37218esac
37219    AR=$ac_ct_AR
37220  fi
37221fi
37222
37223  else
37224    # The variable is set, but is it from the command line or the environment?
37225
37226    # Try to remove the string !AR! from our list.
37227    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37228    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37229      # If it failed, the variable was not from the command line. Ignore it,
37230      # but warn the user (except for BASH, which is always set by the calling BASH).
37231      if test "xAR" != xBASH; then
37232        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37233$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37234      fi
37235      # Try to locate tool using the code snippet
37236      if test -n "$ac_tool_prefix"; then
37237  for ac_prog in ar gcc-ar
37238  do
37239    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37240set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37242$as_echo_n "checking for $ac_word... " >&6; }
37243if ${ac_cv_prog_AR+:} false; then :
37244  $as_echo_n "(cached) " >&6
37245else
37246  if test -n "$AR"; then
37247  ac_cv_prog_AR="$AR" # Let the user override the test.
37248else
37249as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37250for as_dir in $PATH
37251do
37252  IFS=$as_save_IFS
37253  test -z "$as_dir" && as_dir=.
37254    for ac_exec_ext in '' $ac_executable_extensions; do
37255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37256    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37258    break 2
37259  fi
37260done
37261  done
37262IFS=$as_save_IFS
37263
37264fi
37265fi
37266AR=$ac_cv_prog_AR
37267if test -n "$AR"; then
37268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37269$as_echo "$AR" >&6; }
37270else
37271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37272$as_echo "no" >&6; }
37273fi
37274
37275
37276    test -n "$AR" && break
37277  done
37278fi
37279if test -z "$AR"; then
37280  ac_ct_AR=$AR
37281  for ac_prog in ar gcc-ar
37282do
37283  # Extract the first word of "$ac_prog", so it can be a program name with args.
37284set dummy $ac_prog; ac_word=$2
37285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37286$as_echo_n "checking for $ac_word... " >&6; }
37287if ${ac_cv_prog_ac_ct_AR+:} false; then :
37288  $as_echo_n "(cached) " >&6
37289else
37290  if test -n "$ac_ct_AR"; then
37291  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37292else
37293as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37294for as_dir in $PATH
37295do
37296  IFS=$as_save_IFS
37297  test -z "$as_dir" && as_dir=.
37298    for ac_exec_ext in '' $ac_executable_extensions; do
37299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37300    ac_cv_prog_ac_ct_AR="$ac_prog"
37301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37302    break 2
37303  fi
37304done
37305  done
37306IFS=$as_save_IFS
37307
37308fi
37309fi
37310ac_ct_AR=$ac_cv_prog_ac_ct_AR
37311if test -n "$ac_ct_AR"; then
37312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37313$as_echo "$ac_ct_AR" >&6; }
37314else
37315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37316$as_echo "no" >&6; }
37317fi
37318
37319
37320  test -n "$ac_ct_AR" && break
37321done
37322
37323  if test "x$ac_ct_AR" = x; then
37324    AR=""
37325  else
37326    case $cross_compiling:$ac_tool_warned in
37327yes:)
37328{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37329$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37330ac_tool_warned=yes ;;
37331esac
37332    AR=$ac_ct_AR
37333  fi
37334fi
37335
37336    else
37337      # If it succeeded, then it was overridden by the user. We will use it
37338      # for the tool.
37339
37340      # First remove it from the list of overridden variables, so we can test
37341      # for unknown variables in the end.
37342      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37343
37344      # Check if we try to supply an empty value
37345      if test "x$AR" = x; then
37346        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37347$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37348        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37349$as_echo_n "checking for AR... " >&6; }
37350        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37351$as_echo "disabled" >&6; }
37352      else
37353        # Check if the provided tool contains a complete path.
37354        tool_specified="$AR"
37355        tool_basename="${tool_specified##*/}"
37356        if test "x$tool_basename" = "x$tool_specified"; then
37357          # A command without a complete path is provided, search $PATH.
37358          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37359$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37360          # Extract the first word of "$tool_basename", so it can be a program name with args.
37361set dummy $tool_basename; ac_word=$2
37362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37363$as_echo_n "checking for $ac_word... " >&6; }
37364if ${ac_cv_path_AR+:} false; then :
37365  $as_echo_n "(cached) " >&6
37366else
37367  case $AR in
37368  [\\/]* | ?:[\\/]*)
37369  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37370  ;;
37371  *)
37372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37373for as_dir in $PATH
37374do
37375  IFS=$as_save_IFS
37376  test -z "$as_dir" && as_dir=.
37377    for ac_exec_ext in '' $ac_executable_extensions; do
37378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37379    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37381    break 2
37382  fi
37383done
37384  done
37385IFS=$as_save_IFS
37386
37387  ;;
37388esac
37389fi
37390AR=$ac_cv_path_AR
37391if test -n "$AR"; then
37392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37393$as_echo "$AR" >&6; }
37394else
37395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37396$as_echo "no" >&6; }
37397fi
37398
37399
37400          if test "x$AR" = x; then
37401            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37402          fi
37403        else
37404          # Otherwise we believe it is a complete path. Use it as it is.
37405          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37406$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37407          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37408$as_echo_n "checking for AR... " >&6; }
37409          if test ! -x "$tool_specified"; then
37410            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37411$as_echo "not found" >&6; }
37412            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37413          fi
37414          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37415$as_echo "$tool_specified" >&6; }
37416        fi
37417      fi
37418    fi
37419
37420  fi
37421
37422
37423  else
37424
37425
37426  # Publish this variable in the help.
37427
37428
37429  if [ -z "${AR+x}" ]; then
37430    # The variable is not set by user, try to locate tool using the code snippet
37431    if test -n "$ac_tool_prefix"; then
37432  for ac_prog in ar
37433  do
37434    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37435set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37437$as_echo_n "checking for $ac_word... " >&6; }
37438if ${ac_cv_prog_AR+:} false; then :
37439  $as_echo_n "(cached) " >&6
37440else
37441  if test -n "$AR"; then
37442  ac_cv_prog_AR="$AR" # Let the user override the test.
37443else
37444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37445for as_dir in $PATH
37446do
37447  IFS=$as_save_IFS
37448  test -z "$as_dir" && as_dir=.
37449    for ac_exec_ext in '' $ac_executable_extensions; do
37450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37451    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37453    break 2
37454  fi
37455done
37456  done
37457IFS=$as_save_IFS
37458
37459fi
37460fi
37461AR=$ac_cv_prog_AR
37462if test -n "$AR"; then
37463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37464$as_echo "$AR" >&6; }
37465else
37466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37467$as_echo "no" >&6; }
37468fi
37469
37470
37471    test -n "$AR" && break
37472  done
37473fi
37474if test -z "$AR"; then
37475  ac_ct_AR=$AR
37476  for ac_prog in ar
37477do
37478  # Extract the first word of "$ac_prog", so it can be a program name with args.
37479set dummy $ac_prog; ac_word=$2
37480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37481$as_echo_n "checking for $ac_word... " >&6; }
37482if ${ac_cv_prog_ac_ct_AR+:} false; then :
37483  $as_echo_n "(cached) " >&6
37484else
37485  if test -n "$ac_ct_AR"; then
37486  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37487else
37488as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37489for as_dir in $PATH
37490do
37491  IFS=$as_save_IFS
37492  test -z "$as_dir" && as_dir=.
37493    for ac_exec_ext in '' $ac_executable_extensions; do
37494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37495    ac_cv_prog_ac_ct_AR="$ac_prog"
37496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37497    break 2
37498  fi
37499done
37500  done
37501IFS=$as_save_IFS
37502
37503fi
37504fi
37505ac_ct_AR=$ac_cv_prog_ac_ct_AR
37506if test -n "$ac_ct_AR"; then
37507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37508$as_echo "$ac_ct_AR" >&6; }
37509else
37510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37511$as_echo "no" >&6; }
37512fi
37513
37514
37515  test -n "$ac_ct_AR" && break
37516done
37517
37518  if test "x$ac_ct_AR" = x; then
37519    AR=""
37520  else
37521    case $cross_compiling:$ac_tool_warned in
37522yes:)
37523{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37524$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37525ac_tool_warned=yes ;;
37526esac
37527    AR=$ac_ct_AR
37528  fi
37529fi
37530
37531  else
37532    # The variable is set, but is it from the command line or the environment?
37533
37534    # Try to remove the string !AR! from our list.
37535    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37536    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37537      # If it failed, the variable was not from the command line. Ignore it,
37538      # but warn the user (except for BASH, which is always set by the calling BASH).
37539      if test "xAR" != xBASH; then
37540        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37541$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37542      fi
37543      # Try to locate tool using the code snippet
37544      if test -n "$ac_tool_prefix"; then
37545  for ac_prog in ar
37546  do
37547    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37548set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37550$as_echo_n "checking for $ac_word... " >&6; }
37551if ${ac_cv_prog_AR+:} false; then :
37552  $as_echo_n "(cached) " >&6
37553else
37554  if test -n "$AR"; then
37555  ac_cv_prog_AR="$AR" # Let the user override the test.
37556else
37557as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37558for as_dir in $PATH
37559do
37560  IFS=$as_save_IFS
37561  test -z "$as_dir" && as_dir=.
37562    for ac_exec_ext in '' $ac_executable_extensions; do
37563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37564    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37566    break 2
37567  fi
37568done
37569  done
37570IFS=$as_save_IFS
37571
37572fi
37573fi
37574AR=$ac_cv_prog_AR
37575if test -n "$AR"; then
37576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37577$as_echo "$AR" >&6; }
37578else
37579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37580$as_echo "no" >&6; }
37581fi
37582
37583
37584    test -n "$AR" && break
37585  done
37586fi
37587if test -z "$AR"; then
37588  ac_ct_AR=$AR
37589  for ac_prog in ar
37590do
37591  # Extract the first word of "$ac_prog", so it can be a program name with args.
37592set dummy $ac_prog; ac_word=$2
37593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37594$as_echo_n "checking for $ac_word... " >&6; }
37595if ${ac_cv_prog_ac_ct_AR+:} false; then :
37596  $as_echo_n "(cached) " >&6
37597else
37598  if test -n "$ac_ct_AR"; then
37599  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37600else
37601as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37602for as_dir in $PATH
37603do
37604  IFS=$as_save_IFS
37605  test -z "$as_dir" && as_dir=.
37606    for ac_exec_ext in '' $ac_executable_extensions; do
37607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37608    ac_cv_prog_ac_ct_AR="$ac_prog"
37609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37610    break 2
37611  fi
37612done
37613  done
37614IFS=$as_save_IFS
37615
37616fi
37617fi
37618ac_ct_AR=$ac_cv_prog_ac_ct_AR
37619if test -n "$ac_ct_AR"; then
37620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37621$as_echo "$ac_ct_AR" >&6; }
37622else
37623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37624$as_echo "no" >&6; }
37625fi
37626
37627
37628  test -n "$ac_ct_AR" && break
37629done
37630
37631  if test "x$ac_ct_AR" = x; then
37632    AR=""
37633  else
37634    case $cross_compiling:$ac_tool_warned in
37635yes:)
37636{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37637$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37638ac_tool_warned=yes ;;
37639esac
37640    AR=$ac_ct_AR
37641  fi
37642fi
37643
37644    else
37645      # If it succeeded, then it was overridden by the user. We will use it
37646      # for the tool.
37647
37648      # First remove it from the list of overridden variables, so we can test
37649      # for unknown variables in the end.
37650      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37651
37652      # Check if we try to supply an empty value
37653      if test "x$AR" = x; then
37654        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37655$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37656        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37657$as_echo_n "checking for AR... " >&6; }
37658        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37659$as_echo "disabled" >&6; }
37660      else
37661        # Check if the provided tool contains a complete path.
37662        tool_specified="$AR"
37663        tool_basename="${tool_specified##*/}"
37664        if test "x$tool_basename" = "x$tool_specified"; then
37665          # A command without a complete path is provided, search $PATH.
37666          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37667$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37668          # Extract the first word of "$tool_basename", so it can be a program name with args.
37669set dummy $tool_basename; ac_word=$2
37670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37671$as_echo_n "checking for $ac_word... " >&6; }
37672if ${ac_cv_path_AR+:} false; then :
37673  $as_echo_n "(cached) " >&6
37674else
37675  case $AR in
37676  [\\/]* | ?:[\\/]*)
37677  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37678  ;;
37679  *)
37680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37681for as_dir in $PATH
37682do
37683  IFS=$as_save_IFS
37684  test -z "$as_dir" && as_dir=.
37685    for ac_exec_ext in '' $ac_executable_extensions; do
37686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37687    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37689    break 2
37690  fi
37691done
37692  done
37693IFS=$as_save_IFS
37694
37695  ;;
37696esac
37697fi
37698AR=$ac_cv_path_AR
37699if test -n "$AR"; then
37700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37701$as_echo "$AR" >&6; }
37702else
37703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37704$as_echo "no" >&6; }
37705fi
37706
37707
37708          if test "x$AR" = x; then
37709            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37710          fi
37711        else
37712          # Otherwise we believe it is a complete path. Use it as it is.
37713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37714$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37715          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37716$as_echo_n "checking for AR... " >&6; }
37717          if test ! -x "$tool_specified"; then
37718            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37719$as_echo "not found" >&6; }
37720            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37721          fi
37722          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37723$as_echo "$tool_specified" >&6; }
37724        fi
37725      fi
37726    fi
37727
37728  fi
37729
37730
37731  fi
37732
37733  # Only process if variable expands to non-empty
37734
37735  if test "x$AR" != x; then
37736    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37737
37738  # First separate the path from the arguments. This will split at the first
37739  # space.
37740  complete="$AR"
37741  path="${complete%% *}"
37742  tmp="$complete EOL"
37743  arguments="${tmp#* }"
37744
37745  # Input might be given as Windows format, start by converting to
37746  # unix format.
37747  new_path=`$CYGPATH -u "$path"`
37748
37749  # Now try to locate executable using which
37750  new_path=`$WHICH "$new_path" 2> /dev/null`
37751  # bat and cmd files are not always considered executable in cygwin causing which
37752  # to not find them
37753  if test "x$new_path" = x \
37754      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37755      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37756    new_path=`$CYGPATH -u "$path"`
37757  fi
37758  if test "x$new_path" = x; then
37759    # Oops. Which didn't find the executable.
37760    # The splitting of arguments from the executable at a space might have been incorrect,
37761    # since paths with space are more likely in Windows. Give it another try with the whole
37762    # argument.
37763    path="$complete"
37764    arguments="EOL"
37765    new_path=`$CYGPATH -u "$path"`
37766    new_path=`$WHICH "$new_path" 2> /dev/null`
37767    # bat and cmd files are not always considered executable in cygwin causing which
37768    # to not find them
37769    if test "x$new_path" = x \
37770        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37771        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37772      new_path=`$CYGPATH -u "$path"`
37773    fi
37774    if test "x$new_path" = x; then
37775      # It's still not found. Now this is an unrecoverable error.
37776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37777$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37778      has_space=`$ECHO "$complete" | $GREP " "`
37779      if test "x$has_space" != x; then
37780        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37781$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37782      fi
37783      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37784    fi
37785  fi
37786
37787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37790  # "foo.exe" is OK but "foo" is an error.
37791  #
37792  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37793  # It is also a way to make sure we got the proper file name for the real test later on.
37794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37795  if test "x$test_shortpath" = x; then
37796    # Short path failed, file does not exist as specified.
37797    # Try adding .exe or .cmd
37798    if test -f "${new_path}.exe"; then
37799      input_to_shortpath="${new_path}.exe"
37800    elif test -f "${new_path}.cmd"; then
37801      input_to_shortpath="${new_path}.cmd"
37802    else
37803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37804$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37805      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37806$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37807      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37808    fi
37809  else
37810    input_to_shortpath="$new_path"
37811  fi
37812
37813  # Call helper function which possibly converts this using DOS-style short mode.
37814  # If so, the updated path is stored in $new_path.
37815  new_path="$input_to_shortpath"
37816
37817  input_path="$input_to_shortpath"
37818  # Check if we need to convert this using DOS-style short mode. If the path
37819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37820  # take no chances and rewrite it.
37821  # Note: m4 eats our [], so we need to use [ and ] instead.
37822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37823  if test "x$has_forbidden_chars" != x; then
37824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37825    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37826    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37827    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37828      # Going to short mode and back again did indeed matter. Since short mode is
37829      # case insensitive, let's make it lowercase to improve readability.
37830      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37831      # Now convert it back to Unix-style (cygpath)
37832      input_path=`$CYGPATH -u "$shortmode_path"`
37833      new_path="$input_path"
37834    fi
37835  fi
37836
37837  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37838  if test "x$test_cygdrive_prefix" = x; then
37839    # As a simple fix, exclude /usr/bin since it's not a real path.
37840    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37841      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37842      # a path prefixed by /cygdrive for fixpath to work.
37843      new_path="$CYGWIN_ROOT_PATH$input_path"
37844    fi
37845  fi
37846
37847  # remove trailing .exe if any
37848  new_path="${new_path/%.exe/}"
37849
37850    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37851
37852  # First separate the path from the arguments. This will split at the first
37853  # space.
37854  complete="$AR"
37855  path="${complete%% *}"
37856  tmp="$complete EOL"
37857  arguments="${tmp#* }"
37858
37859  # Input might be given as Windows format, start by converting to
37860  # unix format.
37861  new_path="$path"
37862
37863  windows_path="$new_path"
37864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37865    unix_path=`$CYGPATH -u "$windows_path"`
37866    new_path="$unix_path"
37867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37869    new_path="$unix_path"
37870  fi
37871
37872
37873  # Now try to locate executable using which
37874  new_path=`$WHICH "$new_path" 2> /dev/null`
37875
37876  if test "x$new_path" = x; then
37877    # Oops. Which didn't find the executable.
37878    # The splitting of arguments from the executable at a space might have been incorrect,
37879    # since paths with space are more likely in Windows. Give it another try with the whole
37880    # argument.
37881    path="$complete"
37882    arguments="EOL"
37883    new_path="$path"
37884
37885  windows_path="$new_path"
37886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37887    unix_path=`$CYGPATH -u "$windows_path"`
37888    new_path="$unix_path"
37889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37891    new_path="$unix_path"
37892  fi
37893
37894
37895    new_path=`$WHICH "$new_path" 2> /dev/null`
37896    # bat and cmd files are not always considered executable in MSYS causing which
37897    # to not find them
37898    if test "x$new_path" = x \
37899        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37900        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37901      new_path="$path"
37902
37903  windows_path="$new_path"
37904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37905    unix_path=`$CYGPATH -u "$windows_path"`
37906    new_path="$unix_path"
37907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37909    new_path="$unix_path"
37910  fi
37911
37912    fi
37913
37914    if test "x$new_path" = x; then
37915      # It's still not found. Now this is an unrecoverable error.
37916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37917$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37918      has_space=`$ECHO "$complete" | $GREP " "`
37919      if test "x$has_space" != x; then
37920        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37921$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37922      fi
37923      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37924    fi
37925  fi
37926
37927  # Now new_path has a complete unix path to the binary
37928  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37929    # Keep paths in /bin as-is, but remove trailing .exe if any
37930    new_path="${new_path/%.exe/}"
37931    # Do not save /bin paths to all_fixpath_prefixes!
37932  else
37933    # Not in mixed or Windows style, start by that.
37934    new_path=`cmd //c echo $new_path`
37935
37936  input_path="$new_path"
37937  # Check if we need to convert this using DOS-style short mode. If the path
37938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37939  # take no chances and rewrite it.
37940  # Note: m4 eats our [], so we need to use [ and ] instead.
37941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37942  if test "x$has_forbidden_chars" != x; then
37943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37944    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37945  fi
37946
37947    # Output is in $new_path
37948
37949  windows_path="$new_path"
37950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37951    unix_path=`$CYGPATH -u "$windows_path"`
37952    new_path="$unix_path"
37953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37955    new_path="$unix_path"
37956  fi
37957
37958    # remove trailing .exe if any
37959    new_path="${new_path/%.exe/}"
37960
37961    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37962    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37963  fi
37964
37965    else
37966      # We're on a unix platform. Hooray! :)
37967      # First separate the path from the arguments. This will split at the first
37968      # space.
37969      complete="$AR"
37970      path="${complete%% *}"
37971      tmp="$complete EOL"
37972      arguments="${tmp#* }"
37973
37974      # Cannot rely on the command "which" here since it doesn't always work.
37975      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37976      if test -z "$is_absolute_path"; then
37977        # Path to executable is not absolute. Find it.
37978        IFS_save="$IFS"
37979        IFS=:
37980        for p in $PATH; do
37981          if test -f "$p/$path" && test -x "$p/$path"; then
37982            new_path="$p/$path"
37983            break
37984          fi
37985        done
37986        IFS="$IFS_save"
37987      else
37988        # This is an absolute path, we can use it without further modifications.
37989        new_path="$path"
37990      fi
37991
37992      if test "x$new_path" = x; then
37993        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37994$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37995        has_space=`$ECHO "$complete" | $GREP " "`
37996        if test "x$has_space" != x; then
37997          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37998$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37999        fi
38000        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38001      fi
38002    fi
38003
38004    # Now join together the path and the arguments once again
38005    if test "x$arguments" != xEOL; then
38006      new_complete="$new_path ${arguments% *}"
38007    else
38008      new_complete="$new_path"
38009    fi
38010
38011    if test "x$complete" != "x$new_complete"; then
38012      AR="$new_complete"
38013      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38014$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38015    fi
38016  fi
38017
38018
38019
38020  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38021
38022
38023  # Publish this variable in the help.
38024
38025
38026  if [ -z "${LIPO+x}" ]; then
38027    # The variable is not set by user, try to locate tool using the code snippet
38028    for ac_prog in lipo
38029do
38030  # Extract the first word of "$ac_prog", so it can be a program name with args.
38031set dummy $ac_prog; ac_word=$2
38032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38033$as_echo_n "checking for $ac_word... " >&6; }
38034if ${ac_cv_path_LIPO+:} false; then :
38035  $as_echo_n "(cached) " >&6
38036else
38037  case $LIPO in
38038  [\\/]* | ?:[\\/]*)
38039  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38040  ;;
38041  *)
38042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38043for as_dir in $PATH
38044do
38045  IFS=$as_save_IFS
38046  test -z "$as_dir" && as_dir=.
38047    for ac_exec_ext in '' $ac_executable_extensions; do
38048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38049    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38051    break 2
38052  fi
38053done
38054  done
38055IFS=$as_save_IFS
38056
38057  ;;
38058esac
38059fi
38060LIPO=$ac_cv_path_LIPO
38061if test -n "$LIPO"; then
38062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38063$as_echo "$LIPO" >&6; }
38064else
38065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38066$as_echo "no" >&6; }
38067fi
38068
38069
38070  test -n "$LIPO" && break
38071done
38072
38073  else
38074    # The variable is set, but is it from the command line or the environment?
38075
38076    # Try to remove the string !LIPO! from our list.
38077    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38078    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38079      # If it failed, the variable was not from the command line. Ignore it,
38080      # but warn the user (except for BASH, which is always set by the calling BASH).
38081      if test "xLIPO" != xBASH; then
38082        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38083$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38084      fi
38085      # Try to locate tool using the code snippet
38086      for ac_prog in lipo
38087do
38088  # Extract the first word of "$ac_prog", so it can be a program name with args.
38089set dummy $ac_prog; ac_word=$2
38090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38091$as_echo_n "checking for $ac_word... " >&6; }
38092if ${ac_cv_path_LIPO+:} false; then :
38093  $as_echo_n "(cached) " >&6
38094else
38095  case $LIPO in
38096  [\\/]* | ?:[\\/]*)
38097  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38098  ;;
38099  *)
38100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38101for as_dir in $PATH
38102do
38103  IFS=$as_save_IFS
38104  test -z "$as_dir" && as_dir=.
38105    for ac_exec_ext in '' $ac_executable_extensions; do
38106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38107    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38109    break 2
38110  fi
38111done
38112  done
38113IFS=$as_save_IFS
38114
38115  ;;
38116esac
38117fi
38118LIPO=$ac_cv_path_LIPO
38119if test -n "$LIPO"; then
38120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38121$as_echo "$LIPO" >&6; }
38122else
38123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38124$as_echo "no" >&6; }
38125fi
38126
38127
38128  test -n "$LIPO" && break
38129done
38130
38131    else
38132      # If it succeeded, then it was overridden by the user. We will use it
38133      # for the tool.
38134
38135      # First remove it from the list of overridden variables, so we can test
38136      # for unknown variables in the end.
38137      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38138
38139      # Check if we try to supply an empty value
38140      if test "x$LIPO" = x; then
38141        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38142$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38143        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38144$as_echo_n "checking for LIPO... " >&6; }
38145        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38146$as_echo "disabled" >&6; }
38147      else
38148        # Check if the provided tool contains a complete path.
38149        tool_specified="$LIPO"
38150        tool_basename="${tool_specified##*/}"
38151        if test "x$tool_basename" = "x$tool_specified"; then
38152          # A command without a complete path is provided, search $PATH.
38153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38154$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38155          # Extract the first word of "$tool_basename", so it can be a program name with args.
38156set dummy $tool_basename; ac_word=$2
38157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38158$as_echo_n "checking for $ac_word... " >&6; }
38159if ${ac_cv_path_LIPO+:} false; then :
38160  $as_echo_n "(cached) " >&6
38161else
38162  case $LIPO in
38163  [\\/]* | ?:[\\/]*)
38164  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38165  ;;
38166  *)
38167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38168for as_dir in $PATH
38169do
38170  IFS=$as_save_IFS
38171  test -z "$as_dir" && as_dir=.
38172    for ac_exec_ext in '' $ac_executable_extensions; do
38173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38174    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38176    break 2
38177  fi
38178done
38179  done
38180IFS=$as_save_IFS
38181
38182  ;;
38183esac
38184fi
38185LIPO=$ac_cv_path_LIPO
38186if test -n "$LIPO"; then
38187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38188$as_echo "$LIPO" >&6; }
38189else
38190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38191$as_echo "no" >&6; }
38192fi
38193
38194
38195          if test "x$LIPO" = x; then
38196            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38197          fi
38198        else
38199          # Otherwise we believe it is a complete path. Use it as it is.
38200          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38201$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38202          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38203$as_echo_n "checking for LIPO... " >&6; }
38204          if test ! -x "$tool_specified"; then
38205            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38206$as_echo "not found" >&6; }
38207            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38208          fi
38209          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38210$as_echo "$tool_specified" >&6; }
38211        fi
38212      fi
38213    fi
38214
38215  fi
38216
38217
38218
38219  # Only process if variable expands to non-empty
38220
38221  if test "x$LIPO" != x; then
38222    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38223
38224  # First separate the path from the arguments. This will split at the first
38225  # space.
38226  complete="$LIPO"
38227  path="${complete%% *}"
38228  tmp="$complete EOL"
38229  arguments="${tmp#* }"
38230
38231  # Input might be given as Windows format, start by converting to
38232  # unix format.
38233  new_path=`$CYGPATH -u "$path"`
38234
38235  # Now try to locate executable using which
38236  new_path=`$WHICH "$new_path" 2> /dev/null`
38237  # bat and cmd files are not always considered executable in cygwin causing which
38238  # to not find them
38239  if test "x$new_path" = x \
38240      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38241      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38242    new_path=`$CYGPATH -u "$path"`
38243  fi
38244  if test "x$new_path" = x; then
38245    # Oops. Which didn't find the executable.
38246    # The splitting of arguments from the executable at a space might have been incorrect,
38247    # since paths with space are more likely in Windows. Give it another try with the whole
38248    # argument.
38249    path="$complete"
38250    arguments="EOL"
38251    new_path=`$CYGPATH -u "$path"`
38252    new_path=`$WHICH "$new_path" 2> /dev/null`
38253    # bat and cmd files are not always considered executable in cygwin causing which
38254    # to not find them
38255    if test "x$new_path" = x \
38256        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38257        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38258      new_path=`$CYGPATH -u "$path"`
38259    fi
38260    if test "x$new_path" = x; then
38261      # It's still not found. Now this is an unrecoverable error.
38262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38263$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38264      has_space=`$ECHO "$complete" | $GREP " "`
38265      if test "x$has_space" != x; then
38266        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38267$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38268      fi
38269      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38270    fi
38271  fi
38272
38273  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38274  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38275  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38276  # "foo.exe" is OK but "foo" is an error.
38277  #
38278  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38279  # It is also a way to make sure we got the proper file name for the real test later on.
38280  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38281  if test "x$test_shortpath" = x; then
38282    # Short path failed, file does not exist as specified.
38283    # Try adding .exe or .cmd
38284    if test -f "${new_path}.exe"; then
38285      input_to_shortpath="${new_path}.exe"
38286    elif test -f "${new_path}.cmd"; then
38287      input_to_shortpath="${new_path}.cmd"
38288    else
38289      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38290$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38291      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38292$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38293      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38294    fi
38295  else
38296    input_to_shortpath="$new_path"
38297  fi
38298
38299  # Call helper function which possibly converts this using DOS-style short mode.
38300  # If so, the updated path is stored in $new_path.
38301  new_path="$input_to_shortpath"
38302
38303  input_path="$input_to_shortpath"
38304  # Check if we need to convert this using DOS-style short mode. If the path
38305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38306  # take no chances and rewrite it.
38307  # Note: m4 eats our [], so we need to use [ and ] instead.
38308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38309  if test "x$has_forbidden_chars" != x; then
38310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38311    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38312    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38313    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38314      # Going to short mode and back again did indeed matter. Since short mode is
38315      # case insensitive, let's make it lowercase to improve readability.
38316      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38317      # Now convert it back to Unix-style (cygpath)
38318      input_path=`$CYGPATH -u "$shortmode_path"`
38319      new_path="$input_path"
38320    fi
38321  fi
38322
38323  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38324  if test "x$test_cygdrive_prefix" = x; then
38325    # As a simple fix, exclude /usr/bin since it's not a real path.
38326    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38327      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38328      # a path prefixed by /cygdrive for fixpath to work.
38329      new_path="$CYGWIN_ROOT_PATH$input_path"
38330    fi
38331  fi
38332
38333  # remove trailing .exe if any
38334  new_path="${new_path/%.exe/}"
38335
38336    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38337
38338  # First separate the path from the arguments. This will split at the first
38339  # space.
38340  complete="$LIPO"
38341  path="${complete%% *}"
38342  tmp="$complete EOL"
38343  arguments="${tmp#* }"
38344
38345  # Input might be given as Windows format, start by converting to
38346  # unix format.
38347  new_path="$path"
38348
38349  windows_path="$new_path"
38350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38351    unix_path=`$CYGPATH -u "$windows_path"`
38352    new_path="$unix_path"
38353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38355    new_path="$unix_path"
38356  fi
38357
38358
38359  # Now try to locate executable using which
38360  new_path=`$WHICH "$new_path" 2> /dev/null`
38361
38362  if test "x$new_path" = x; then
38363    # Oops. Which didn't find the executable.
38364    # The splitting of arguments from the executable at a space might have been incorrect,
38365    # since paths with space are more likely in Windows. Give it another try with the whole
38366    # argument.
38367    path="$complete"
38368    arguments="EOL"
38369    new_path="$path"
38370
38371  windows_path="$new_path"
38372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38373    unix_path=`$CYGPATH -u "$windows_path"`
38374    new_path="$unix_path"
38375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38377    new_path="$unix_path"
38378  fi
38379
38380
38381    new_path=`$WHICH "$new_path" 2> /dev/null`
38382    # bat and cmd files are not always considered executable in MSYS causing which
38383    # to not find them
38384    if test "x$new_path" = x \
38385        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38386        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38387      new_path="$path"
38388
38389  windows_path="$new_path"
38390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38391    unix_path=`$CYGPATH -u "$windows_path"`
38392    new_path="$unix_path"
38393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38395    new_path="$unix_path"
38396  fi
38397
38398    fi
38399
38400    if test "x$new_path" = x; then
38401      # It's still not found. Now this is an unrecoverable error.
38402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38403$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38404      has_space=`$ECHO "$complete" | $GREP " "`
38405      if test "x$has_space" != x; then
38406        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38407$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38408      fi
38409      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38410    fi
38411  fi
38412
38413  # Now new_path has a complete unix path to the binary
38414  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38415    # Keep paths in /bin as-is, but remove trailing .exe if any
38416    new_path="${new_path/%.exe/}"
38417    # Do not save /bin paths to all_fixpath_prefixes!
38418  else
38419    # Not in mixed or Windows style, start by that.
38420    new_path=`cmd //c echo $new_path`
38421
38422  input_path="$new_path"
38423  # Check if we need to convert this using DOS-style short mode. If the path
38424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38425  # take no chances and rewrite it.
38426  # Note: m4 eats our [], so we need to use [ and ] instead.
38427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38428  if test "x$has_forbidden_chars" != x; then
38429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38430    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38431  fi
38432
38433    # Output is in $new_path
38434
38435  windows_path="$new_path"
38436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38437    unix_path=`$CYGPATH -u "$windows_path"`
38438    new_path="$unix_path"
38439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38441    new_path="$unix_path"
38442  fi
38443
38444    # remove trailing .exe if any
38445    new_path="${new_path/%.exe/}"
38446
38447    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38448    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38449  fi
38450
38451    else
38452      # We're on a unix platform. Hooray! :)
38453      # First separate the path from the arguments. This will split at the first
38454      # space.
38455      complete="$LIPO"
38456      path="${complete%% *}"
38457      tmp="$complete EOL"
38458      arguments="${tmp#* }"
38459
38460      # Cannot rely on the command "which" here since it doesn't always work.
38461      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38462      if test -z "$is_absolute_path"; then
38463        # Path to executable is not absolute. Find it.
38464        IFS_save="$IFS"
38465        IFS=:
38466        for p in $PATH; do
38467          if test -f "$p/$path" && test -x "$p/$path"; then
38468            new_path="$p/$path"
38469            break
38470          fi
38471        done
38472        IFS="$IFS_save"
38473      else
38474        # This is an absolute path, we can use it without further modifications.
38475        new_path="$path"
38476      fi
38477
38478      if test "x$new_path" = x; then
38479        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38480$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38481        has_space=`$ECHO "$complete" | $GREP " "`
38482        if test "x$has_space" != x; then
38483          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38484$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38485        fi
38486        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38487      fi
38488    fi
38489
38490    # Now join together the path and the arguments once again
38491    if test "x$arguments" != xEOL; then
38492      new_complete="$new_path ${arguments% *}"
38493    else
38494      new_complete="$new_path"
38495    fi
38496
38497    if test "x$complete" != "x$new_complete"; then
38498      LIPO="$new_complete"
38499      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38500$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38501    fi
38502  fi
38503
38504  fi
38505
38506  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38507    # Extract the first word of "mt", so it can be a program name with args.
38508set dummy mt; ac_word=$2
38509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38510$as_echo_n "checking for $ac_word... " >&6; }
38511if ${ac_cv_prog_MT+:} false; then :
38512  $as_echo_n "(cached) " >&6
38513else
38514  if test -n "$MT"; then
38515  ac_cv_prog_MT="$MT" # Let the user override the test.
38516else
38517  ac_prog_rejected=no
38518as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38519for as_dir in $PATH
38520do
38521  IFS=$as_save_IFS
38522  test -z "$as_dir" && as_dir=.
38523    for ac_exec_ext in '' $ac_executable_extensions; do
38524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38525    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38526       ac_prog_rejected=yes
38527       continue
38528     fi
38529    ac_cv_prog_MT="mt"
38530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38531    break 2
38532  fi
38533done
38534  done
38535IFS=$as_save_IFS
38536
38537if test $ac_prog_rejected = yes; then
38538  # We found a bogon in the path, so make sure we never use it.
38539  set dummy $ac_cv_prog_MT
38540  shift
38541  if test $# != 0; then
38542    # We chose a different compiler from the bogus one.
38543    # However, it has the same basename, so the bogon will be chosen
38544    # first if we set MT to just the basename; use the full file name.
38545    shift
38546    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38547  fi
38548fi
38549fi
38550fi
38551MT=$ac_cv_prog_MT
38552if test -n "$MT"; then
38553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38554$as_echo "$MT" >&6; }
38555else
38556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38557$as_echo "no" >&6; }
38558fi
38559
38560
38561
38562  # Only process if variable expands to non-empty
38563
38564  if test "x$MT" != x; then
38565    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38566
38567  # First separate the path from the arguments. This will split at the first
38568  # space.
38569  complete="$MT"
38570  path="${complete%% *}"
38571  tmp="$complete EOL"
38572  arguments="${tmp#* }"
38573
38574  # Input might be given as Windows format, start by converting to
38575  # unix format.
38576  new_path=`$CYGPATH -u "$path"`
38577
38578  # Now try to locate executable using which
38579  new_path=`$WHICH "$new_path" 2> /dev/null`
38580  # bat and cmd files are not always considered executable in cygwin causing which
38581  # to not find them
38582  if test "x$new_path" = x \
38583      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38584      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38585    new_path=`$CYGPATH -u "$path"`
38586  fi
38587  if test "x$new_path" = x; then
38588    # Oops. Which didn't find the executable.
38589    # The splitting of arguments from the executable at a space might have been incorrect,
38590    # since paths with space are more likely in Windows. Give it another try with the whole
38591    # argument.
38592    path="$complete"
38593    arguments="EOL"
38594    new_path=`$CYGPATH -u "$path"`
38595    new_path=`$WHICH "$new_path" 2> /dev/null`
38596    # bat and cmd files are not always considered executable in cygwin causing which
38597    # to not find them
38598    if test "x$new_path" = x \
38599        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38600        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38601      new_path=`$CYGPATH -u "$path"`
38602    fi
38603    if test "x$new_path" = x; then
38604      # It's still not found. Now this is an unrecoverable error.
38605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38606$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38607      has_space=`$ECHO "$complete" | $GREP " "`
38608      if test "x$has_space" != x; then
38609        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38610$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38611      fi
38612      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38613    fi
38614  fi
38615
38616  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38617  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38618  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38619  # "foo.exe" is OK but "foo" is an error.
38620  #
38621  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38622  # It is also a way to make sure we got the proper file name for the real test later on.
38623  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38624  if test "x$test_shortpath" = x; then
38625    # Short path failed, file does not exist as specified.
38626    # Try adding .exe or .cmd
38627    if test -f "${new_path}.exe"; then
38628      input_to_shortpath="${new_path}.exe"
38629    elif test -f "${new_path}.cmd"; then
38630      input_to_shortpath="${new_path}.cmd"
38631    else
38632      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38633$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38634      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38635$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38636      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38637    fi
38638  else
38639    input_to_shortpath="$new_path"
38640  fi
38641
38642  # Call helper function which possibly converts this using DOS-style short mode.
38643  # If so, the updated path is stored in $new_path.
38644  new_path="$input_to_shortpath"
38645
38646  input_path="$input_to_shortpath"
38647  # Check if we need to convert this using DOS-style short mode. If the path
38648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38649  # take no chances and rewrite it.
38650  # Note: m4 eats our [], so we need to use [ and ] instead.
38651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38652  if test "x$has_forbidden_chars" != x; then
38653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38654    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38655    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38656    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38657      # Going to short mode and back again did indeed matter. Since short mode is
38658      # case insensitive, let's make it lowercase to improve readability.
38659      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38660      # Now convert it back to Unix-style (cygpath)
38661      input_path=`$CYGPATH -u "$shortmode_path"`
38662      new_path="$input_path"
38663    fi
38664  fi
38665
38666  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38667  if test "x$test_cygdrive_prefix" = x; then
38668    # As a simple fix, exclude /usr/bin since it's not a real path.
38669    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38670      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38671      # a path prefixed by /cygdrive for fixpath to work.
38672      new_path="$CYGWIN_ROOT_PATH$input_path"
38673    fi
38674  fi
38675
38676  # remove trailing .exe if any
38677  new_path="${new_path/%.exe/}"
38678
38679    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38680
38681  # First separate the path from the arguments. This will split at the first
38682  # space.
38683  complete="$MT"
38684  path="${complete%% *}"
38685  tmp="$complete EOL"
38686  arguments="${tmp#* }"
38687
38688  # Input might be given as Windows format, start by converting to
38689  # unix format.
38690  new_path="$path"
38691
38692  windows_path="$new_path"
38693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38694    unix_path=`$CYGPATH -u "$windows_path"`
38695    new_path="$unix_path"
38696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38698    new_path="$unix_path"
38699  fi
38700
38701
38702  # Now try to locate executable using which
38703  new_path=`$WHICH "$new_path" 2> /dev/null`
38704
38705  if test "x$new_path" = x; then
38706    # Oops. Which didn't find the executable.
38707    # The splitting of arguments from the executable at a space might have been incorrect,
38708    # since paths with space are more likely in Windows. Give it another try with the whole
38709    # argument.
38710    path="$complete"
38711    arguments="EOL"
38712    new_path="$path"
38713
38714  windows_path="$new_path"
38715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38716    unix_path=`$CYGPATH -u "$windows_path"`
38717    new_path="$unix_path"
38718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38720    new_path="$unix_path"
38721  fi
38722
38723
38724    new_path=`$WHICH "$new_path" 2> /dev/null`
38725    # bat and cmd files are not always considered executable in MSYS causing which
38726    # to not find them
38727    if test "x$new_path" = x \
38728        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38729        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38730      new_path="$path"
38731
38732  windows_path="$new_path"
38733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38734    unix_path=`$CYGPATH -u "$windows_path"`
38735    new_path="$unix_path"
38736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38738    new_path="$unix_path"
38739  fi
38740
38741    fi
38742
38743    if test "x$new_path" = x; then
38744      # It's still not found. Now this is an unrecoverable error.
38745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38746$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38747      has_space=`$ECHO "$complete" | $GREP " "`
38748      if test "x$has_space" != x; then
38749        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38750$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38751      fi
38752      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38753    fi
38754  fi
38755
38756  # Now new_path has a complete unix path to the binary
38757  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38758    # Keep paths in /bin as-is, but remove trailing .exe if any
38759    new_path="${new_path/%.exe/}"
38760    # Do not save /bin paths to all_fixpath_prefixes!
38761  else
38762    # Not in mixed or Windows style, start by that.
38763    new_path=`cmd //c echo $new_path`
38764
38765  input_path="$new_path"
38766  # Check if we need to convert this using DOS-style short mode. If the path
38767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38768  # take no chances and rewrite it.
38769  # Note: m4 eats our [], so we need to use [ and ] instead.
38770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38771  if test "x$has_forbidden_chars" != x; then
38772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38773    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38774  fi
38775
38776    # Output is in $new_path
38777
38778  windows_path="$new_path"
38779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38780    unix_path=`$CYGPATH -u "$windows_path"`
38781    new_path="$unix_path"
38782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38784    new_path="$unix_path"
38785  fi
38786
38787    # remove trailing .exe if any
38788    new_path="${new_path/%.exe/}"
38789
38790    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38791    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38792  fi
38793
38794    else
38795      # We're on a unix platform. Hooray! :)
38796      # First separate the path from the arguments. This will split at the first
38797      # space.
38798      complete="$MT"
38799      path="${complete%% *}"
38800      tmp="$complete EOL"
38801      arguments="${tmp#* }"
38802
38803      # Cannot rely on the command "which" here since it doesn't always work.
38804      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38805      if test -z "$is_absolute_path"; then
38806        # Path to executable is not absolute. Find it.
38807        IFS_save="$IFS"
38808        IFS=:
38809        for p in $PATH; do
38810          if test -f "$p/$path" && test -x "$p/$path"; then
38811            new_path="$p/$path"
38812            break
38813          fi
38814        done
38815        IFS="$IFS_save"
38816      else
38817        # This is an absolute path, we can use it without further modifications.
38818        new_path="$path"
38819      fi
38820
38821      if test "x$new_path" = x; then
38822        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38823$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38824        has_space=`$ECHO "$complete" | $GREP " "`
38825        if test "x$has_space" != x; then
38826          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38827$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38828        fi
38829        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38830      fi
38831    fi
38832
38833    # Now join together the path and the arguments once again
38834    if test "x$arguments" != xEOL; then
38835      new_complete="$new_path ${arguments% *}"
38836    else
38837      new_complete="$new_path"
38838    fi
38839
38840    if test "x$complete" != "x$new_complete"; then
38841      MT="$new_complete"
38842      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38843$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38844    fi
38845  fi
38846
38847    # Setup the resource compiler (RC)
38848    # Extract the first word of "rc", so it can be a program name with args.
38849set dummy rc; ac_word=$2
38850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38851$as_echo_n "checking for $ac_word... " >&6; }
38852if ${ac_cv_prog_RC+:} false; then :
38853  $as_echo_n "(cached) " >&6
38854else
38855  if test -n "$RC"; then
38856  ac_cv_prog_RC="$RC" # Let the user override the test.
38857else
38858  ac_prog_rejected=no
38859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38860for as_dir in $PATH
38861do
38862  IFS=$as_save_IFS
38863  test -z "$as_dir" && as_dir=.
38864    for ac_exec_ext in '' $ac_executable_extensions; do
38865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38866    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38867       ac_prog_rejected=yes
38868       continue
38869     fi
38870    ac_cv_prog_RC="rc"
38871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38872    break 2
38873  fi
38874done
38875  done
38876IFS=$as_save_IFS
38877
38878if test $ac_prog_rejected = yes; then
38879  # We found a bogon in the path, so make sure we never use it.
38880  set dummy $ac_cv_prog_RC
38881  shift
38882  if test $# != 0; then
38883    # We chose a different compiler from the bogus one.
38884    # However, it has the same basename, so the bogon will be chosen
38885    # first if we set RC to just the basename; use the full file name.
38886    shift
38887    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38888  fi
38889fi
38890fi
38891fi
38892RC=$ac_cv_prog_RC
38893if test -n "$RC"; then
38894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38895$as_echo "$RC" >&6; }
38896else
38897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38898$as_echo "no" >&6; }
38899fi
38900
38901
38902
38903  # Only process if variable expands to non-empty
38904
38905  if test "x$RC" != x; then
38906    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38907
38908  # First separate the path from the arguments. This will split at the first
38909  # space.
38910  complete="$RC"
38911  path="${complete%% *}"
38912  tmp="$complete EOL"
38913  arguments="${tmp#* }"
38914
38915  # Input might be given as Windows format, start by converting to
38916  # unix format.
38917  new_path=`$CYGPATH -u "$path"`
38918
38919  # Now try to locate executable using which
38920  new_path=`$WHICH "$new_path" 2> /dev/null`
38921  # bat and cmd files are not always considered executable in cygwin causing which
38922  # to not find them
38923  if test "x$new_path" = x \
38924      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38925      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38926    new_path=`$CYGPATH -u "$path"`
38927  fi
38928  if test "x$new_path" = x; then
38929    # Oops. Which didn't find the executable.
38930    # The splitting of arguments from the executable at a space might have been incorrect,
38931    # since paths with space are more likely in Windows. Give it another try with the whole
38932    # argument.
38933    path="$complete"
38934    arguments="EOL"
38935    new_path=`$CYGPATH -u "$path"`
38936    new_path=`$WHICH "$new_path" 2> /dev/null`
38937    # bat and cmd files are not always considered executable in cygwin causing which
38938    # to not find them
38939    if test "x$new_path" = x \
38940        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38941        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38942      new_path=`$CYGPATH -u "$path"`
38943    fi
38944    if test "x$new_path" = x; then
38945      # It's still not found. Now this is an unrecoverable error.
38946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38947$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38948      has_space=`$ECHO "$complete" | $GREP " "`
38949      if test "x$has_space" != x; then
38950        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38951$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38952      fi
38953      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38954    fi
38955  fi
38956
38957  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38958  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38959  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38960  # "foo.exe" is OK but "foo" is an error.
38961  #
38962  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38963  # It is also a way to make sure we got the proper file name for the real test later on.
38964  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38965  if test "x$test_shortpath" = x; then
38966    # Short path failed, file does not exist as specified.
38967    # Try adding .exe or .cmd
38968    if test -f "${new_path}.exe"; then
38969      input_to_shortpath="${new_path}.exe"
38970    elif test -f "${new_path}.cmd"; then
38971      input_to_shortpath="${new_path}.cmd"
38972    else
38973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38974$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38975      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38976$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38977      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38978    fi
38979  else
38980    input_to_shortpath="$new_path"
38981  fi
38982
38983  # Call helper function which possibly converts this using DOS-style short mode.
38984  # If so, the updated path is stored in $new_path.
38985  new_path="$input_to_shortpath"
38986
38987  input_path="$input_to_shortpath"
38988  # Check if we need to convert this using DOS-style short mode. If the path
38989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38990  # take no chances and rewrite it.
38991  # Note: m4 eats our [], so we need to use [ and ] instead.
38992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38993  if test "x$has_forbidden_chars" != x; then
38994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38995    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38996    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38997    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38998      # Going to short mode and back again did indeed matter. Since short mode is
38999      # case insensitive, let's make it lowercase to improve readability.
39000      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39001      # Now convert it back to Unix-style (cygpath)
39002      input_path=`$CYGPATH -u "$shortmode_path"`
39003      new_path="$input_path"
39004    fi
39005  fi
39006
39007  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39008  if test "x$test_cygdrive_prefix" = x; then
39009    # As a simple fix, exclude /usr/bin since it's not a real path.
39010    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39011      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39012      # a path prefixed by /cygdrive for fixpath to work.
39013      new_path="$CYGWIN_ROOT_PATH$input_path"
39014    fi
39015  fi
39016
39017  # remove trailing .exe if any
39018  new_path="${new_path/%.exe/}"
39019
39020    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39021
39022  # First separate the path from the arguments. This will split at the first
39023  # space.
39024  complete="$RC"
39025  path="${complete%% *}"
39026  tmp="$complete EOL"
39027  arguments="${tmp#* }"
39028
39029  # Input might be given as Windows format, start by converting to
39030  # unix format.
39031  new_path="$path"
39032
39033  windows_path="$new_path"
39034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39035    unix_path=`$CYGPATH -u "$windows_path"`
39036    new_path="$unix_path"
39037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39039    new_path="$unix_path"
39040  fi
39041
39042
39043  # Now try to locate executable using which
39044  new_path=`$WHICH "$new_path" 2> /dev/null`
39045
39046  if test "x$new_path" = x; then
39047    # Oops. Which didn't find the executable.
39048    # The splitting of arguments from the executable at a space might have been incorrect,
39049    # since paths with space are more likely in Windows. Give it another try with the whole
39050    # argument.
39051    path="$complete"
39052    arguments="EOL"
39053    new_path="$path"
39054
39055  windows_path="$new_path"
39056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39057    unix_path=`$CYGPATH -u "$windows_path"`
39058    new_path="$unix_path"
39059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39061    new_path="$unix_path"
39062  fi
39063
39064
39065    new_path=`$WHICH "$new_path" 2> /dev/null`
39066    # bat and cmd files are not always considered executable in MSYS causing which
39067    # to not find them
39068    if test "x$new_path" = x \
39069        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39070        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39071      new_path="$path"
39072
39073  windows_path="$new_path"
39074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39075    unix_path=`$CYGPATH -u "$windows_path"`
39076    new_path="$unix_path"
39077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39079    new_path="$unix_path"
39080  fi
39081
39082    fi
39083
39084    if test "x$new_path" = x; then
39085      # It's still not found. Now this is an unrecoverable error.
39086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39087$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39088      has_space=`$ECHO "$complete" | $GREP " "`
39089      if test "x$has_space" != x; then
39090        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39091$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39092      fi
39093      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39094    fi
39095  fi
39096
39097  # Now new_path has a complete unix path to the binary
39098  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39099    # Keep paths in /bin as-is, but remove trailing .exe if any
39100    new_path="${new_path/%.exe/}"
39101    # Do not save /bin paths to all_fixpath_prefixes!
39102  else
39103    # Not in mixed or Windows style, start by that.
39104    new_path=`cmd //c echo $new_path`
39105
39106  input_path="$new_path"
39107  # Check if we need to convert this using DOS-style short mode. If the path
39108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39109  # take no chances and rewrite it.
39110  # Note: m4 eats our [], so we need to use [ and ] instead.
39111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39112  if test "x$has_forbidden_chars" != x; then
39113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39114    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39115  fi
39116
39117    # Output is in $new_path
39118
39119  windows_path="$new_path"
39120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39121    unix_path=`$CYGPATH -u "$windows_path"`
39122    new_path="$unix_path"
39123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39125    new_path="$unix_path"
39126  fi
39127
39128    # remove trailing .exe if any
39129    new_path="${new_path/%.exe/}"
39130
39131    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39132    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39133  fi
39134
39135    else
39136      # We're on a unix platform. Hooray! :)
39137      # First separate the path from the arguments. This will split at the first
39138      # space.
39139      complete="$RC"
39140      path="${complete%% *}"
39141      tmp="$complete EOL"
39142      arguments="${tmp#* }"
39143
39144      # Cannot rely on the command "which" here since it doesn't always work.
39145      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39146      if test -z "$is_absolute_path"; then
39147        # Path to executable is not absolute. Find it.
39148        IFS_save="$IFS"
39149        IFS=:
39150        for p in $PATH; do
39151          if test -f "$p/$path" && test -x "$p/$path"; then
39152            new_path="$p/$path"
39153            break
39154          fi
39155        done
39156        IFS="$IFS_save"
39157      else
39158        # This is an absolute path, we can use it without further modifications.
39159        new_path="$path"
39160      fi
39161
39162      if test "x$new_path" = x; then
39163        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39164$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39165        has_space=`$ECHO "$complete" | $GREP " "`
39166        if test "x$has_space" != x; then
39167          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39168$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39169        fi
39170        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39171      fi
39172    fi
39173
39174    # Now join together the path and the arguments once again
39175    if test "x$arguments" != xEOL; then
39176      new_complete="$new_path ${arguments% *}"
39177    else
39178      new_complete="$new_path"
39179    fi
39180
39181    if test "x$complete" != "x$new_complete"; then
39182      RC="$new_complete"
39183      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39184$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39185    fi
39186  fi
39187
39188    # Extract the first word of "dumpbin", so it can be a program name with args.
39189set dummy dumpbin; ac_word=$2
39190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39191$as_echo_n "checking for $ac_word... " >&6; }
39192if ${ac_cv_prog_DUMPBIN+:} false; then :
39193  $as_echo_n "(cached) " >&6
39194else
39195  if test -n "$DUMPBIN"; then
39196  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39197else
39198as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39199for as_dir in $PATH
39200do
39201  IFS=$as_save_IFS
39202  test -z "$as_dir" && as_dir=.
39203    for ac_exec_ext in '' $ac_executable_extensions; do
39204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39205    ac_cv_prog_DUMPBIN="dumpbin"
39206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39207    break 2
39208  fi
39209done
39210  done
39211IFS=$as_save_IFS
39212
39213fi
39214fi
39215DUMPBIN=$ac_cv_prog_DUMPBIN
39216if test -n "$DUMPBIN"; then
39217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39218$as_echo "$DUMPBIN" >&6; }
39219else
39220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39221$as_echo "no" >&6; }
39222fi
39223
39224
39225
39226  # Only process if variable expands to non-empty
39227
39228  if test "x$DUMPBIN" != x; then
39229    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39230
39231  # First separate the path from the arguments. This will split at the first
39232  # space.
39233  complete="$DUMPBIN"
39234  path="${complete%% *}"
39235  tmp="$complete EOL"
39236  arguments="${tmp#* }"
39237
39238  # Input might be given as Windows format, start by converting to
39239  # unix format.
39240  new_path=`$CYGPATH -u "$path"`
39241
39242  # Now try to locate executable using which
39243  new_path=`$WHICH "$new_path" 2> /dev/null`
39244  # bat and cmd files are not always considered executable in cygwin causing which
39245  # to not find them
39246  if test "x$new_path" = x \
39247      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39248      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39249    new_path=`$CYGPATH -u "$path"`
39250  fi
39251  if test "x$new_path" = x; then
39252    # Oops. Which didn't find the executable.
39253    # The splitting of arguments from the executable at a space might have been incorrect,
39254    # since paths with space are more likely in Windows. Give it another try with the whole
39255    # argument.
39256    path="$complete"
39257    arguments="EOL"
39258    new_path=`$CYGPATH -u "$path"`
39259    new_path=`$WHICH "$new_path" 2> /dev/null`
39260    # bat and cmd files are not always considered executable in cygwin causing which
39261    # to not find them
39262    if test "x$new_path" = x \
39263        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39264        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39265      new_path=`$CYGPATH -u "$path"`
39266    fi
39267    if test "x$new_path" = x; then
39268      # It's still not found. Now this is an unrecoverable error.
39269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39270$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39271      has_space=`$ECHO "$complete" | $GREP " "`
39272      if test "x$has_space" != x; then
39273        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39274$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39275      fi
39276      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39277    fi
39278  fi
39279
39280  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39281  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39282  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39283  # "foo.exe" is OK but "foo" is an error.
39284  #
39285  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39286  # It is also a way to make sure we got the proper file name for the real test later on.
39287  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39288  if test "x$test_shortpath" = x; then
39289    # Short path failed, file does not exist as specified.
39290    # Try adding .exe or .cmd
39291    if test -f "${new_path}.exe"; then
39292      input_to_shortpath="${new_path}.exe"
39293    elif test -f "${new_path}.cmd"; then
39294      input_to_shortpath="${new_path}.cmd"
39295    else
39296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39297$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39298      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39299$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39300      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39301    fi
39302  else
39303    input_to_shortpath="$new_path"
39304  fi
39305
39306  # Call helper function which possibly converts this using DOS-style short mode.
39307  # If so, the updated path is stored in $new_path.
39308  new_path="$input_to_shortpath"
39309
39310  input_path="$input_to_shortpath"
39311  # Check if we need to convert this using DOS-style short mode. If the path
39312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39313  # take no chances and rewrite it.
39314  # Note: m4 eats our [], so we need to use [ and ] instead.
39315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39316  if test "x$has_forbidden_chars" != x; then
39317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39318    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39319    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39320    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39321      # Going to short mode and back again did indeed matter. Since short mode is
39322      # case insensitive, let's make it lowercase to improve readability.
39323      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39324      # Now convert it back to Unix-style (cygpath)
39325      input_path=`$CYGPATH -u "$shortmode_path"`
39326      new_path="$input_path"
39327    fi
39328  fi
39329
39330  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39331  if test "x$test_cygdrive_prefix" = x; then
39332    # As a simple fix, exclude /usr/bin since it's not a real path.
39333    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39334      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39335      # a path prefixed by /cygdrive for fixpath to work.
39336      new_path="$CYGWIN_ROOT_PATH$input_path"
39337    fi
39338  fi
39339
39340  # remove trailing .exe if any
39341  new_path="${new_path/%.exe/}"
39342
39343    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39344
39345  # First separate the path from the arguments. This will split at the first
39346  # space.
39347  complete="$DUMPBIN"
39348  path="${complete%% *}"
39349  tmp="$complete EOL"
39350  arguments="${tmp#* }"
39351
39352  # Input might be given as Windows format, start by converting to
39353  # unix format.
39354  new_path="$path"
39355
39356  windows_path="$new_path"
39357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39358    unix_path=`$CYGPATH -u "$windows_path"`
39359    new_path="$unix_path"
39360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39362    new_path="$unix_path"
39363  fi
39364
39365
39366  # Now try to locate executable using which
39367  new_path=`$WHICH "$new_path" 2> /dev/null`
39368
39369  if test "x$new_path" = x; then
39370    # Oops. Which didn't find the executable.
39371    # The splitting of arguments from the executable at a space might have been incorrect,
39372    # since paths with space are more likely in Windows. Give it another try with the whole
39373    # argument.
39374    path="$complete"
39375    arguments="EOL"
39376    new_path="$path"
39377
39378  windows_path="$new_path"
39379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39380    unix_path=`$CYGPATH -u "$windows_path"`
39381    new_path="$unix_path"
39382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39384    new_path="$unix_path"
39385  fi
39386
39387
39388    new_path=`$WHICH "$new_path" 2> /dev/null`
39389    # bat and cmd files are not always considered executable in MSYS causing which
39390    # to not find them
39391    if test "x$new_path" = x \
39392        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39393        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39394      new_path="$path"
39395
39396  windows_path="$new_path"
39397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39398    unix_path=`$CYGPATH -u "$windows_path"`
39399    new_path="$unix_path"
39400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39402    new_path="$unix_path"
39403  fi
39404
39405    fi
39406
39407    if test "x$new_path" = x; then
39408      # It's still not found. Now this is an unrecoverable error.
39409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39410$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39411      has_space=`$ECHO "$complete" | $GREP " "`
39412      if test "x$has_space" != x; then
39413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39415      fi
39416      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39417    fi
39418  fi
39419
39420  # Now new_path has a complete unix path to the binary
39421  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39422    # Keep paths in /bin as-is, but remove trailing .exe if any
39423    new_path="${new_path/%.exe/}"
39424    # Do not save /bin paths to all_fixpath_prefixes!
39425  else
39426    # Not in mixed or Windows style, start by that.
39427    new_path=`cmd //c echo $new_path`
39428
39429  input_path="$new_path"
39430  # Check if we need to convert this using DOS-style short mode. If the path
39431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39432  # take no chances and rewrite it.
39433  # Note: m4 eats our [], so we need to use [ and ] instead.
39434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39435  if test "x$has_forbidden_chars" != x; then
39436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39438  fi
39439
39440    # Output is in $new_path
39441
39442  windows_path="$new_path"
39443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39444    unix_path=`$CYGPATH -u "$windows_path"`
39445    new_path="$unix_path"
39446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39448    new_path="$unix_path"
39449  fi
39450
39451    # remove trailing .exe if any
39452    new_path="${new_path/%.exe/}"
39453
39454    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39455    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39456  fi
39457
39458    else
39459      # We're on a unix platform. Hooray! :)
39460      # First separate the path from the arguments. This will split at the first
39461      # space.
39462      complete="$DUMPBIN"
39463      path="${complete%% *}"
39464      tmp="$complete EOL"
39465      arguments="${tmp#* }"
39466
39467      # Cannot rely on the command "which" here since it doesn't always work.
39468      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39469      if test -z "$is_absolute_path"; then
39470        # Path to executable is not absolute. Find it.
39471        IFS_save="$IFS"
39472        IFS=:
39473        for p in $PATH; do
39474          if test -f "$p/$path" && test -x "$p/$path"; then
39475            new_path="$p/$path"
39476            break
39477          fi
39478        done
39479        IFS="$IFS_save"
39480      else
39481        # This is an absolute path, we can use it without further modifications.
39482        new_path="$path"
39483      fi
39484
39485      if test "x$new_path" = x; then
39486        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39487$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39488        has_space=`$ECHO "$complete" | $GREP " "`
39489        if test "x$has_space" != x; then
39490          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39491$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39492        fi
39493        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39494      fi
39495    fi
39496
39497    # Now join together the path and the arguments once again
39498    if test "x$arguments" != xEOL; then
39499      new_complete="$new_path ${arguments% *}"
39500    else
39501      new_complete="$new_path"
39502    fi
39503
39504    if test "x$complete" != "x$new_complete"; then
39505      DUMPBIN="$new_complete"
39506      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39507$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39508    fi
39509  fi
39510
39511    # We need to check for 'msbuild.exe' because at the place where we expect to
39512    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39513    # won't find the 'msbuild.exe' executable in that case (and the
39514    # 'ac_executable_extensions' is unusable due to performance reasons).
39515    # Notice that we intentionally don't fix up the path to MSBUILD because we
39516    # will call it in a DOS shell during freetype detection on Windows (see
39517    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39518    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39519set dummy msbuild.exe; ac_word=$2
39520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39521$as_echo_n "checking for $ac_word... " >&6; }
39522if ${ac_cv_prog_MSBUILD+:} false; then :
39523  $as_echo_n "(cached) " >&6
39524else
39525  if test -n "$MSBUILD"; then
39526  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39527else
39528as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39529for as_dir in $PATH
39530do
39531  IFS=$as_save_IFS
39532  test -z "$as_dir" && as_dir=.
39533    for ac_exec_ext in '' $ac_executable_extensions; do
39534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39535    ac_cv_prog_MSBUILD="msbuild.exe"
39536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39537    break 2
39538  fi
39539done
39540  done
39541IFS=$as_save_IFS
39542
39543fi
39544fi
39545MSBUILD=$ac_cv_prog_MSBUILD
39546if test -n "$MSBUILD"; then
39547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39548$as_echo "$MSBUILD" >&6; }
39549else
39550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39551$as_echo "no" >&6; }
39552fi
39553
39554
39555  fi
39556
39557  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39558
39559
39560  # Publish this variable in the help.
39561
39562
39563  if [ -z "${STRIP+x}" ]; then
39564    # The variable is not set by user, try to locate tool using the code snippet
39565    for ac_prog in strip
39566do
39567  # Extract the first word of "$ac_prog", so it can be a program name with args.
39568set dummy $ac_prog; ac_word=$2
39569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39570$as_echo_n "checking for $ac_word... " >&6; }
39571if ${ac_cv_path_STRIP+:} false; then :
39572  $as_echo_n "(cached) " >&6
39573else
39574  case $STRIP in
39575  [\\/]* | ?:[\\/]*)
39576  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39577  ;;
39578  *)
39579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39580for as_dir in $PATH
39581do
39582  IFS=$as_save_IFS
39583  test -z "$as_dir" && as_dir=.
39584    for ac_exec_ext in '' $ac_executable_extensions; do
39585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39586    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39588    break 2
39589  fi
39590done
39591  done
39592IFS=$as_save_IFS
39593
39594  ;;
39595esac
39596fi
39597STRIP=$ac_cv_path_STRIP
39598if test -n "$STRIP"; then
39599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39600$as_echo "$STRIP" >&6; }
39601else
39602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39603$as_echo "no" >&6; }
39604fi
39605
39606
39607  test -n "$STRIP" && break
39608done
39609
39610  else
39611    # The variable is set, but is it from the command line or the environment?
39612
39613    # Try to remove the string !STRIP! from our list.
39614    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39615    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39616      # If it failed, the variable was not from the command line. Ignore it,
39617      # but warn the user (except for BASH, which is always set by the calling BASH).
39618      if test "xSTRIP" != xBASH; then
39619        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39620$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39621      fi
39622      # Try to locate tool using the code snippet
39623      for ac_prog in strip
39624do
39625  # Extract the first word of "$ac_prog", so it can be a program name with args.
39626set dummy $ac_prog; ac_word=$2
39627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39628$as_echo_n "checking for $ac_word... " >&6; }
39629if ${ac_cv_path_STRIP+:} false; then :
39630  $as_echo_n "(cached) " >&6
39631else
39632  case $STRIP in
39633  [\\/]* | ?:[\\/]*)
39634  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39635  ;;
39636  *)
39637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39638for as_dir in $PATH
39639do
39640  IFS=$as_save_IFS
39641  test -z "$as_dir" && as_dir=.
39642    for ac_exec_ext in '' $ac_executable_extensions; do
39643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39644    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39646    break 2
39647  fi
39648done
39649  done
39650IFS=$as_save_IFS
39651
39652  ;;
39653esac
39654fi
39655STRIP=$ac_cv_path_STRIP
39656if test -n "$STRIP"; then
39657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39658$as_echo "$STRIP" >&6; }
39659else
39660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39661$as_echo "no" >&6; }
39662fi
39663
39664
39665  test -n "$STRIP" && break
39666done
39667
39668    else
39669      # If it succeeded, then it was overridden by the user. We will use it
39670      # for the tool.
39671
39672      # First remove it from the list of overridden variables, so we can test
39673      # for unknown variables in the end.
39674      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39675
39676      # Check if we try to supply an empty value
39677      if test "x$STRIP" = x; then
39678        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39679$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39680        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39681$as_echo_n "checking for STRIP... " >&6; }
39682        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39683$as_echo "disabled" >&6; }
39684      else
39685        # Check if the provided tool contains a complete path.
39686        tool_specified="$STRIP"
39687        tool_basename="${tool_specified##*/}"
39688        if test "x$tool_basename" = "x$tool_specified"; then
39689          # A command without a complete path is provided, search $PATH.
39690          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39691$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39692          # Extract the first word of "$tool_basename", so it can be a program name with args.
39693set dummy $tool_basename; ac_word=$2
39694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39695$as_echo_n "checking for $ac_word... " >&6; }
39696if ${ac_cv_path_STRIP+:} false; then :
39697  $as_echo_n "(cached) " >&6
39698else
39699  case $STRIP in
39700  [\\/]* | ?:[\\/]*)
39701  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39702  ;;
39703  *)
39704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39705for as_dir in $PATH
39706do
39707  IFS=$as_save_IFS
39708  test -z "$as_dir" && as_dir=.
39709    for ac_exec_ext in '' $ac_executable_extensions; do
39710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39711    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39713    break 2
39714  fi
39715done
39716  done
39717IFS=$as_save_IFS
39718
39719  ;;
39720esac
39721fi
39722STRIP=$ac_cv_path_STRIP
39723if test -n "$STRIP"; then
39724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39725$as_echo "$STRIP" >&6; }
39726else
39727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39728$as_echo "no" >&6; }
39729fi
39730
39731
39732          if test "x$STRIP" = x; then
39733            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39734          fi
39735        else
39736          # Otherwise we believe it is a complete path. Use it as it is.
39737          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39738$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39739          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39740$as_echo_n "checking for STRIP... " >&6; }
39741          if test ! -x "$tool_specified"; then
39742            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39743$as_echo "not found" >&6; }
39744            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39745          fi
39746          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39747$as_echo "$tool_specified" >&6; }
39748        fi
39749      fi
39750    fi
39751
39752  fi
39753
39754
39755
39756  # Only process if variable expands to non-empty
39757
39758  if test "x$STRIP" != x; then
39759    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39760
39761  # First separate the path from the arguments. This will split at the first
39762  # space.
39763  complete="$STRIP"
39764  path="${complete%% *}"
39765  tmp="$complete EOL"
39766  arguments="${tmp#* }"
39767
39768  # Input might be given as Windows format, start by converting to
39769  # unix format.
39770  new_path=`$CYGPATH -u "$path"`
39771
39772  # Now try to locate executable using which
39773  new_path=`$WHICH "$new_path" 2> /dev/null`
39774  # bat and cmd files are not always considered executable in cygwin causing which
39775  # to not find them
39776  if test "x$new_path" = x \
39777      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39778      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39779    new_path=`$CYGPATH -u "$path"`
39780  fi
39781  if test "x$new_path" = x; then
39782    # Oops. Which didn't find the executable.
39783    # The splitting of arguments from the executable at a space might have been incorrect,
39784    # since paths with space are more likely in Windows. Give it another try with the whole
39785    # argument.
39786    path="$complete"
39787    arguments="EOL"
39788    new_path=`$CYGPATH -u "$path"`
39789    new_path=`$WHICH "$new_path" 2> /dev/null`
39790    # bat and cmd files are not always considered executable in cygwin causing which
39791    # to not find them
39792    if test "x$new_path" = x \
39793        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39794        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39795      new_path=`$CYGPATH -u "$path"`
39796    fi
39797    if test "x$new_path" = x; then
39798      # It's still not found. Now this is an unrecoverable error.
39799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39800$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39801      has_space=`$ECHO "$complete" | $GREP " "`
39802      if test "x$has_space" != x; then
39803        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39804$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39805      fi
39806      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39807    fi
39808  fi
39809
39810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39813  # "foo.exe" is OK but "foo" is an error.
39814  #
39815  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39816  # It is also a way to make sure we got the proper file name for the real test later on.
39817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39818  if test "x$test_shortpath" = x; then
39819    # Short path failed, file does not exist as specified.
39820    # Try adding .exe or .cmd
39821    if test -f "${new_path}.exe"; then
39822      input_to_shortpath="${new_path}.exe"
39823    elif test -f "${new_path}.cmd"; then
39824      input_to_shortpath="${new_path}.cmd"
39825    else
39826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39827$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39828      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39829$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39830      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39831    fi
39832  else
39833    input_to_shortpath="$new_path"
39834  fi
39835
39836  # Call helper function which possibly converts this using DOS-style short mode.
39837  # If so, the updated path is stored in $new_path.
39838  new_path="$input_to_shortpath"
39839
39840  input_path="$input_to_shortpath"
39841  # Check if we need to convert this using DOS-style short mode. If the path
39842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39843  # take no chances and rewrite it.
39844  # Note: m4 eats our [], so we need to use [ and ] instead.
39845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39846  if test "x$has_forbidden_chars" != x; then
39847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39848    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39849    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39850    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39851      # Going to short mode and back again did indeed matter. Since short mode is
39852      # case insensitive, let's make it lowercase to improve readability.
39853      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39854      # Now convert it back to Unix-style (cygpath)
39855      input_path=`$CYGPATH -u "$shortmode_path"`
39856      new_path="$input_path"
39857    fi
39858  fi
39859
39860  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39861  if test "x$test_cygdrive_prefix" = x; then
39862    # As a simple fix, exclude /usr/bin since it's not a real path.
39863    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39864      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39865      # a path prefixed by /cygdrive for fixpath to work.
39866      new_path="$CYGWIN_ROOT_PATH$input_path"
39867    fi
39868  fi
39869
39870  # remove trailing .exe if any
39871  new_path="${new_path/%.exe/}"
39872
39873    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39874
39875  # First separate the path from the arguments. This will split at the first
39876  # space.
39877  complete="$STRIP"
39878  path="${complete%% *}"
39879  tmp="$complete EOL"
39880  arguments="${tmp#* }"
39881
39882  # Input might be given as Windows format, start by converting to
39883  # unix format.
39884  new_path="$path"
39885
39886  windows_path="$new_path"
39887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39888    unix_path=`$CYGPATH -u "$windows_path"`
39889    new_path="$unix_path"
39890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39892    new_path="$unix_path"
39893  fi
39894
39895
39896  # Now try to locate executable using which
39897  new_path=`$WHICH "$new_path" 2> /dev/null`
39898
39899  if test "x$new_path" = x; then
39900    # Oops. Which didn't find the executable.
39901    # The splitting of arguments from the executable at a space might have been incorrect,
39902    # since paths with space are more likely in Windows. Give it another try with the whole
39903    # argument.
39904    path="$complete"
39905    arguments="EOL"
39906    new_path="$path"
39907
39908  windows_path="$new_path"
39909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39910    unix_path=`$CYGPATH -u "$windows_path"`
39911    new_path="$unix_path"
39912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39914    new_path="$unix_path"
39915  fi
39916
39917
39918    new_path=`$WHICH "$new_path" 2> /dev/null`
39919    # bat and cmd files are not always considered executable in MSYS causing which
39920    # to not find them
39921    if test "x$new_path" = x \
39922        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39923        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39924      new_path="$path"
39925
39926  windows_path="$new_path"
39927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39928    unix_path=`$CYGPATH -u "$windows_path"`
39929    new_path="$unix_path"
39930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39932    new_path="$unix_path"
39933  fi
39934
39935    fi
39936
39937    if test "x$new_path" = x; then
39938      # It's still not found. Now this is an unrecoverable error.
39939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39940$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39941      has_space=`$ECHO "$complete" | $GREP " "`
39942      if test "x$has_space" != x; then
39943        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39944$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39945      fi
39946      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39947    fi
39948  fi
39949
39950  # Now new_path has a complete unix path to the binary
39951  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39952    # Keep paths in /bin as-is, but remove trailing .exe if any
39953    new_path="${new_path/%.exe/}"
39954    # Do not save /bin paths to all_fixpath_prefixes!
39955  else
39956    # Not in mixed or Windows style, start by that.
39957    new_path=`cmd //c echo $new_path`
39958
39959  input_path="$new_path"
39960  # Check if we need to convert this using DOS-style short mode. If the path
39961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39962  # take no chances and rewrite it.
39963  # Note: m4 eats our [], so we need to use [ and ] instead.
39964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39965  if test "x$has_forbidden_chars" != x; then
39966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39967    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39968  fi
39969
39970    # Output is in $new_path
39971
39972  windows_path="$new_path"
39973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39974    unix_path=`$CYGPATH -u "$windows_path"`
39975    new_path="$unix_path"
39976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39978    new_path="$unix_path"
39979  fi
39980
39981    # remove trailing .exe if any
39982    new_path="${new_path/%.exe/}"
39983
39984    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39985    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39986  fi
39987
39988    else
39989      # We're on a unix platform. Hooray! :)
39990      # First separate the path from the arguments. This will split at the first
39991      # space.
39992      complete="$STRIP"
39993      path="${complete%% *}"
39994      tmp="$complete EOL"
39995      arguments="${tmp#* }"
39996
39997      # Cannot rely on the command "which" here since it doesn't always work.
39998      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39999      if test -z "$is_absolute_path"; then
40000        # Path to executable is not absolute. Find it.
40001        IFS_save="$IFS"
40002        IFS=:
40003        for p in $PATH; do
40004          if test -f "$p/$path" && test -x "$p/$path"; then
40005            new_path="$p/$path"
40006            break
40007          fi
40008        done
40009        IFS="$IFS_save"
40010      else
40011        # This is an absolute path, we can use it without further modifications.
40012        new_path="$path"
40013      fi
40014
40015      if test "x$new_path" = x; then
40016        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40017$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40018        has_space=`$ECHO "$complete" | $GREP " "`
40019        if test "x$has_space" != x; then
40020          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40021$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40022        fi
40023        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40024      fi
40025    fi
40026
40027    # Now join together the path and the arguments once again
40028    if test "x$arguments" != xEOL; then
40029      new_complete="$new_path ${arguments% *}"
40030    else
40031      new_complete="$new_path"
40032    fi
40033
40034    if test "x$complete" != "x$new_complete"; then
40035      STRIP="$new_complete"
40036      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40037$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40038    fi
40039  fi
40040
40041
40042
40043  # Publish this variable in the help.
40044
40045
40046  if [ -z "${NM+x}" ]; then
40047    # The variable is not set by user, try to locate tool using the code snippet
40048    for ac_prog in nm
40049do
40050  # Extract the first word of "$ac_prog", so it can be a program name with args.
40051set dummy $ac_prog; ac_word=$2
40052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40053$as_echo_n "checking for $ac_word... " >&6; }
40054if ${ac_cv_path_NM+:} false; then :
40055  $as_echo_n "(cached) " >&6
40056else
40057  case $NM in
40058  [\\/]* | ?:[\\/]*)
40059  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40060  ;;
40061  *)
40062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40063for as_dir in $PATH
40064do
40065  IFS=$as_save_IFS
40066  test -z "$as_dir" && as_dir=.
40067    for ac_exec_ext in '' $ac_executable_extensions; do
40068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40069    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40071    break 2
40072  fi
40073done
40074  done
40075IFS=$as_save_IFS
40076
40077  ;;
40078esac
40079fi
40080NM=$ac_cv_path_NM
40081if test -n "$NM"; then
40082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40083$as_echo "$NM" >&6; }
40084else
40085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40086$as_echo "no" >&6; }
40087fi
40088
40089
40090  test -n "$NM" && break
40091done
40092
40093  else
40094    # The variable is set, but is it from the command line or the environment?
40095
40096    # Try to remove the string !NM! from our list.
40097    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40098    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40099      # If it failed, the variable was not from the command line. Ignore it,
40100      # but warn the user (except for BASH, which is always set by the calling BASH).
40101      if test "xNM" != xBASH; then
40102        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40103$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40104      fi
40105      # Try to locate tool using the code snippet
40106      for ac_prog in nm
40107do
40108  # Extract the first word of "$ac_prog", so it can be a program name with args.
40109set dummy $ac_prog; ac_word=$2
40110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40111$as_echo_n "checking for $ac_word... " >&6; }
40112if ${ac_cv_path_NM+:} false; then :
40113  $as_echo_n "(cached) " >&6
40114else
40115  case $NM in
40116  [\\/]* | ?:[\\/]*)
40117  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40118  ;;
40119  *)
40120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40121for as_dir in $PATH
40122do
40123  IFS=$as_save_IFS
40124  test -z "$as_dir" && as_dir=.
40125    for ac_exec_ext in '' $ac_executable_extensions; do
40126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40127    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40129    break 2
40130  fi
40131done
40132  done
40133IFS=$as_save_IFS
40134
40135  ;;
40136esac
40137fi
40138NM=$ac_cv_path_NM
40139if test -n "$NM"; then
40140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40141$as_echo "$NM" >&6; }
40142else
40143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40144$as_echo "no" >&6; }
40145fi
40146
40147
40148  test -n "$NM" && break
40149done
40150
40151    else
40152      # If it succeeded, then it was overridden by the user. We will use it
40153      # for the tool.
40154
40155      # First remove it from the list of overridden variables, so we can test
40156      # for unknown variables in the end.
40157      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40158
40159      # Check if we try to supply an empty value
40160      if test "x$NM" = x; then
40161        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40162$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40163        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40164$as_echo_n "checking for NM... " >&6; }
40165        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40166$as_echo "disabled" >&6; }
40167      else
40168        # Check if the provided tool contains a complete path.
40169        tool_specified="$NM"
40170        tool_basename="${tool_specified##*/}"
40171        if test "x$tool_basename" = "x$tool_specified"; then
40172          # A command without a complete path is provided, search $PATH.
40173          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40174$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40175          # Extract the first word of "$tool_basename", so it can be a program name with args.
40176set dummy $tool_basename; ac_word=$2
40177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40178$as_echo_n "checking for $ac_word... " >&6; }
40179if ${ac_cv_path_NM+:} false; then :
40180  $as_echo_n "(cached) " >&6
40181else
40182  case $NM in
40183  [\\/]* | ?:[\\/]*)
40184  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40185  ;;
40186  *)
40187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40188for as_dir in $PATH
40189do
40190  IFS=$as_save_IFS
40191  test -z "$as_dir" && as_dir=.
40192    for ac_exec_ext in '' $ac_executable_extensions; do
40193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40194    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40196    break 2
40197  fi
40198done
40199  done
40200IFS=$as_save_IFS
40201
40202  ;;
40203esac
40204fi
40205NM=$ac_cv_path_NM
40206if test -n "$NM"; then
40207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40208$as_echo "$NM" >&6; }
40209else
40210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40211$as_echo "no" >&6; }
40212fi
40213
40214
40215          if test "x$NM" = x; then
40216            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40217          fi
40218        else
40219          # Otherwise we believe it is a complete path. Use it as it is.
40220          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40221$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40222          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40223$as_echo_n "checking for NM... " >&6; }
40224          if test ! -x "$tool_specified"; then
40225            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40226$as_echo "not found" >&6; }
40227            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40228          fi
40229          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40230$as_echo "$tool_specified" >&6; }
40231        fi
40232      fi
40233    fi
40234
40235  fi
40236
40237
40238
40239  # Only process if variable expands to non-empty
40240
40241  if test "x$NM" != x; then
40242    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40243
40244  # First separate the path from the arguments. This will split at the first
40245  # space.
40246  complete="$NM"
40247  path="${complete%% *}"
40248  tmp="$complete EOL"
40249  arguments="${tmp#* }"
40250
40251  # Input might be given as Windows format, start by converting to
40252  # unix format.
40253  new_path=`$CYGPATH -u "$path"`
40254
40255  # Now try to locate executable using which
40256  new_path=`$WHICH "$new_path" 2> /dev/null`
40257  # bat and cmd files are not always considered executable in cygwin causing which
40258  # to not find them
40259  if test "x$new_path" = x \
40260      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40261      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40262    new_path=`$CYGPATH -u "$path"`
40263  fi
40264  if test "x$new_path" = x; then
40265    # Oops. Which didn't find the executable.
40266    # The splitting of arguments from the executable at a space might have been incorrect,
40267    # since paths with space are more likely in Windows. Give it another try with the whole
40268    # argument.
40269    path="$complete"
40270    arguments="EOL"
40271    new_path=`$CYGPATH -u "$path"`
40272    new_path=`$WHICH "$new_path" 2> /dev/null`
40273    # bat and cmd files are not always considered executable in cygwin causing which
40274    # to not find them
40275    if test "x$new_path" = x \
40276        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40277        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40278      new_path=`$CYGPATH -u "$path"`
40279    fi
40280    if test "x$new_path" = x; then
40281      # It's still not found. Now this is an unrecoverable error.
40282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40283$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40284      has_space=`$ECHO "$complete" | $GREP " "`
40285      if test "x$has_space" != x; then
40286        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40287$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40288      fi
40289      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40290    fi
40291  fi
40292
40293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40296  # "foo.exe" is OK but "foo" is an error.
40297  #
40298  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40299  # It is also a way to make sure we got the proper file name for the real test later on.
40300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40301  if test "x$test_shortpath" = x; then
40302    # Short path failed, file does not exist as specified.
40303    # Try adding .exe or .cmd
40304    if test -f "${new_path}.exe"; then
40305      input_to_shortpath="${new_path}.exe"
40306    elif test -f "${new_path}.cmd"; then
40307      input_to_shortpath="${new_path}.cmd"
40308    else
40309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40310$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40311      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40312$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40313      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40314    fi
40315  else
40316    input_to_shortpath="$new_path"
40317  fi
40318
40319  # Call helper function which possibly converts this using DOS-style short mode.
40320  # If so, the updated path is stored in $new_path.
40321  new_path="$input_to_shortpath"
40322
40323  input_path="$input_to_shortpath"
40324  # Check if we need to convert this using DOS-style short mode. If the path
40325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40326  # take no chances and rewrite it.
40327  # Note: m4 eats our [], so we need to use [ and ] instead.
40328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40329  if test "x$has_forbidden_chars" != x; then
40330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40334      # Going to short mode and back again did indeed matter. Since short mode is
40335      # case insensitive, let's make it lowercase to improve readability.
40336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40337      # Now convert it back to Unix-style (cygpath)
40338      input_path=`$CYGPATH -u "$shortmode_path"`
40339      new_path="$input_path"
40340    fi
40341  fi
40342
40343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40344  if test "x$test_cygdrive_prefix" = x; then
40345    # As a simple fix, exclude /usr/bin since it's not a real path.
40346    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40348      # a path prefixed by /cygdrive for fixpath to work.
40349      new_path="$CYGWIN_ROOT_PATH$input_path"
40350    fi
40351  fi
40352
40353  # remove trailing .exe if any
40354  new_path="${new_path/%.exe/}"
40355
40356    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40357
40358  # First separate the path from the arguments. This will split at the first
40359  # space.
40360  complete="$NM"
40361  path="${complete%% *}"
40362  tmp="$complete EOL"
40363  arguments="${tmp#* }"
40364
40365  # Input might be given as Windows format, start by converting to
40366  # unix format.
40367  new_path="$path"
40368
40369  windows_path="$new_path"
40370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40371    unix_path=`$CYGPATH -u "$windows_path"`
40372    new_path="$unix_path"
40373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40375    new_path="$unix_path"
40376  fi
40377
40378
40379  # Now try to locate executable using which
40380  new_path=`$WHICH "$new_path" 2> /dev/null`
40381
40382  if test "x$new_path" = x; then
40383    # Oops. Which didn't find the executable.
40384    # The splitting of arguments from the executable at a space might have been incorrect,
40385    # since paths with space are more likely in Windows. Give it another try with the whole
40386    # argument.
40387    path="$complete"
40388    arguments="EOL"
40389    new_path="$path"
40390
40391  windows_path="$new_path"
40392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40393    unix_path=`$CYGPATH -u "$windows_path"`
40394    new_path="$unix_path"
40395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40397    new_path="$unix_path"
40398  fi
40399
40400
40401    new_path=`$WHICH "$new_path" 2> /dev/null`
40402    # bat and cmd files are not always considered executable in MSYS causing which
40403    # to not find them
40404    if test "x$new_path" = x \
40405        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40406        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40407      new_path="$path"
40408
40409  windows_path="$new_path"
40410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40411    unix_path=`$CYGPATH -u "$windows_path"`
40412    new_path="$unix_path"
40413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40415    new_path="$unix_path"
40416  fi
40417
40418    fi
40419
40420    if test "x$new_path" = x; then
40421      # It's still not found. Now this is an unrecoverable error.
40422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40423$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40424      has_space=`$ECHO "$complete" | $GREP " "`
40425      if test "x$has_space" != x; then
40426        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40427$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40428      fi
40429      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40430    fi
40431  fi
40432
40433  # Now new_path has a complete unix path to the binary
40434  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40435    # Keep paths in /bin as-is, but remove trailing .exe if any
40436    new_path="${new_path/%.exe/}"
40437    # Do not save /bin paths to all_fixpath_prefixes!
40438  else
40439    # Not in mixed or Windows style, start by that.
40440    new_path=`cmd //c echo $new_path`
40441
40442  input_path="$new_path"
40443  # Check if we need to convert this using DOS-style short mode. If the path
40444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40445  # take no chances and rewrite it.
40446  # Note: m4 eats our [], so we need to use [ and ] instead.
40447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40448  if test "x$has_forbidden_chars" != x; then
40449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40451  fi
40452
40453    # Output is in $new_path
40454
40455  windows_path="$new_path"
40456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40457    unix_path=`$CYGPATH -u "$windows_path"`
40458    new_path="$unix_path"
40459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40461    new_path="$unix_path"
40462  fi
40463
40464    # remove trailing .exe if any
40465    new_path="${new_path/%.exe/}"
40466
40467    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40468    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40469  fi
40470
40471    else
40472      # We're on a unix platform. Hooray! :)
40473      # First separate the path from the arguments. This will split at the first
40474      # space.
40475      complete="$NM"
40476      path="${complete%% *}"
40477      tmp="$complete EOL"
40478      arguments="${tmp#* }"
40479
40480      # Cannot rely on the command "which" here since it doesn't always work.
40481      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40482      if test -z "$is_absolute_path"; then
40483        # Path to executable is not absolute. Find it.
40484        IFS_save="$IFS"
40485        IFS=:
40486        for p in $PATH; do
40487          if test -f "$p/$path" && test -x "$p/$path"; then
40488            new_path="$p/$path"
40489            break
40490          fi
40491        done
40492        IFS="$IFS_save"
40493      else
40494        # This is an absolute path, we can use it without further modifications.
40495        new_path="$path"
40496      fi
40497
40498      if test "x$new_path" = x; then
40499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40500$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40501        has_space=`$ECHO "$complete" | $GREP " "`
40502        if test "x$has_space" != x; then
40503          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40504$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40505        fi
40506        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40507      fi
40508    fi
40509
40510    # Now join together the path and the arguments once again
40511    if test "x$arguments" != xEOL; then
40512      new_complete="$new_path ${arguments% *}"
40513    else
40514      new_complete="$new_path"
40515    fi
40516
40517    if test "x$complete" != "x$new_complete"; then
40518      NM="$new_complete"
40519      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40520$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40521    fi
40522  fi
40523
40524
40525
40526  # Publish this variable in the help.
40527
40528
40529  if [ -z "${GNM+x}" ]; then
40530    # The variable is not set by user, try to locate tool using the code snippet
40531    for ac_prog in gnm
40532do
40533  # Extract the first word of "$ac_prog", so it can be a program name with args.
40534set dummy $ac_prog; ac_word=$2
40535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40536$as_echo_n "checking for $ac_word... " >&6; }
40537if ${ac_cv_path_GNM+:} false; then :
40538  $as_echo_n "(cached) " >&6
40539else
40540  case $GNM in
40541  [\\/]* | ?:[\\/]*)
40542  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40543  ;;
40544  *)
40545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40546for as_dir in $PATH
40547do
40548  IFS=$as_save_IFS
40549  test -z "$as_dir" && as_dir=.
40550    for ac_exec_ext in '' $ac_executable_extensions; do
40551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40552    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40554    break 2
40555  fi
40556done
40557  done
40558IFS=$as_save_IFS
40559
40560  ;;
40561esac
40562fi
40563GNM=$ac_cv_path_GNM
40564if test -n "$GNM"; then
40565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40566$as_echo "$GNM" >&6; }
40567else
40568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40569$as_echo "no" >&6; }
40570fi
40571
40572
40573  test -n "$GNM" && break
40574done
40575
40576  else
40577    # The variable is set, but is it from the command line or the environment?
40578
40579    # Try to remove the string !GNM! from our list.
40580    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40581    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40582      # If it failed, the variable was not from the command line. Ignore it,
40583      # but warn the user (except for BASH, which is always set by the calling BASH).
40584      if test "xGNM" != xBASH; then
40585        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40586$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40587      fi
40588      # Try to locate tool using the code snippet
40589      for ac_prog in gnm
40590do
40591  # Extract the first word of "$ac_prog", so it can be a program name with args.
40592set dummy $ac_prog; ac_word=$2
40593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40594$as_echo_n "checking for $ac_word... " >&6; }
40595if ${ac_cv_path_GNM+:} false; then :
40596  $as_echo_n "(cached) " >&6
40597else
40598  case $GNM in
40599  [\\/]* | ?:[\\/]*)
40600  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40601  ;;
40602  *)
40603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40604for as_dir in $PATH
40605do
40606  IFS=$as_save_IFS
40607  test -z "$as_dir" && as_dir=.
40608    for ac_exec_ext in '' $ac_executable_extensions; do
40609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40610    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40612    break 2
40613  fi
40614done
40615  done
40616IFS=$as_save_IFS
40617
40618  ;;
40619esac
40620fi
40621GNM=$ac_cv_path_GNM
40622if test -n "$GNM"; then
40623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40624$as_echo "$GNM" >&6; }
40625else
40626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40627$as_echo "no" >&6; }
40628fi
40629
40630
40631  test -n "$GNM" && break
40632done
40633
40634    else
40635      # If it succeeded, then it was overridden by the user. We will use it
40636      # for the tool.
40637
40638      # First remove it from the list of overridden variables, so we can test
40639      # for unknown variables in the end.
40640      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40641
40642      # Check if we try to supply an empty value
40643      if test "x$GNM" = x; then
40644        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40645$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40646        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40647$as_echo_n "checking for GNM... " >&6; }
40648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40649$as_echo "disabled" >&6; }
40650      else
40651        # Check if the provided tool contains a complete path.
40652        tool_specified="$GNM"
40653        tool_basename="${tool_specified##*/}"
40654        if test "x$tool_basename" = "x$tool_specified"; then
40655          # A command without a complete path is provided, search $PATH.
40656          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40657$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40658          # Extract the first word of "$tool_basename", so it can be a program name with args.
40659set dummy $tool_basename; ac_word=$2
40660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40661$as_echo_n "checking for $ac_word... " >&6; }
40662if ${ac_cv_path_GNM+:} false; then :
40663  $as_echo_n "(cached) " >&6
40664else
40665  case $GNM in
40666  [\\/]* | ?:[\\/]*)
40667  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40668  ;;
40669  *)
40670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40671for as_dir in $PATH
40672do
40673  IFS=$as_save_IFS
40674  test -z "$as_dir" && as_dir=.
40675    for ac_exec_ext in '' $ac_executable_extensions; do
40676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40677    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40679    break 2
40680  fi
40681done
40682  done
40683IFS=$as_save_IFS
40684
40685  ;;
40686esac
40687fi
40688GNM=$ac_cv_path_GNM
40689if test -n "$GNM"; then
40690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40691$as_echo "$GNM" >&6; }
40692else
40693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40694$as_echo "no" >&6; }
40695fi
40696
40697
40698          if test "x$GNM" = x; then
40699            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40700          fi
40701        else
40702          # Otherwise we believe it is a complete path. Use it as it is.
40703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40704$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40705          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40706$as_echo_n "checking for GNM... " >&6; }
40707          if test ! -x "$tool_specified"; then
40708            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40709$as_echo "not found" >&6; }
40710            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40711          fi
40712          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40713$as_echo "$tool_specified" >&6; }
40714        fi
40715      fi
40716    fi
40717
40718  fi
40719
40720
40721
40722  # Only process if variable expands to non-empty
40723
40724  if test "x$GNM" != x; then
40725    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40726
40727  # First separate the path from the arguments. This will split at the first
40728  # space.
40729  complete="$GNM"
40730  path="${complete%% *}"
40731  tmp="$complete EOL"
40732  arguments="${tmp#* }"
40733
40734  # Input might be given as Windows format, start by converting to
40735  # unix format.
40736  new_path=`$CYGPATH -u "$path"`
40737
40738  # Now try to locate executable using which
40739  new_path=`$WHICH "$new_path" 2> /dev/null`
40740  # bat and cmd files are not always considered executable in cygwin causing which
40741  # to not find them
40742  if test "x$new_path" = x \
40743      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40744      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40745    new_path=`$CYGPATH -u "$path"`
40746  fi
40747  if test "x$new_path" = x; then
40748    # Oops. Which didn't find the executable.
40749    # The splitting of arguments from the executable at a space might have been incorrect,
40750    # since paths with space are more likely in Windows. Give it another try with the whole
40751    # argument.
40752    path="$complete"
40753    arguments="EOL"
40754    new_path=`$CYGPATH -u "$path"`
40755    new_path=`$WHICH "$new_path" 2> /dev/null`
40756    # bat and cmd files are not always considered executable in cygwin causing which
40757    # to not find them
40758    if test "x$new_path" = x \
40759        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40760        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40761      new_path=`$CYGPATH -u "$path"`
40762    fi
40763    if test "x$new_path" = x; then
40764      # It's still not found. Now this is an unrecoverable error.
40765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40766$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40767      has_space=`$ECHO "$complete" | $GREP " "`
40768      if test "x$has_space" != x; then
40769        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40770$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40771      fi
40772      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40773    fi
40774  fi
40775
40776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40779  # "foo.exe" is OK but "foo" is an error.
40780  #
40781  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40782  # It is also a way to make sure we got the proper file name for the real test later on.
40783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40784  if test "x$test_shortpath" = x; then
40785    # Short path failed, file does not exist as specified.
40786    # Try adding .exe or .cmd
40787    if test -f "${new_path}.exe"; then
40788      input_to_shortpath="${new_path}.exe"
40789    elif test -f "${new_path}.cmd"; then
40790      input_to_shortpath="${new_path}.cmd"
40791    else
40792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40793$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40794      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40795$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40796      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40797    fi
40798  else
40799    input_to_shortpath="$new_path"
40800  fi
40801
40802  # Call helper function which possibly converts this using DOS-style short mode.
40803  # If so, the updated path is stored in $new_path.
40804  new_path="$input_to_shortpath"
40805
40806  input_path="$input_to_shortpath"
40807  # Check if we need to convert this using DOS-style short mode. If the path
40808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40809  # take no chances and rewrite it.
40810  # Note: m4 eats our [], so we need to use [ and ] instead.
40811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40812  if test "x$has_forbidden_chars" != x; then
40813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40817      # Going to short mode and back again did indeed matter. Since short mode is
40818      # case insensitive, let's make it lowercase to improve readability.
40819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40820      # Now convert it back to Unix-style (cygpath)
40821      input_path=`$CYGPATH -u "$shortmode_path"`
40822      new_path="$input_path"
40823    fi
40824  fi
40825
40826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40827  if test "x$test_cygdrive_prefix" = x; then
40828    # As a simple fix, exclude /usr/bin since it's not a real path.
40829    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40831      # a path prefixed by /cygdrive for fixpath to work.
40832      new_path="$CYGWIN_ROOT_PATH$input_path"
40833    fi
40834  fi
40835
40836  # remove trailing .exe if any
40837  new_path="${new_path/%.exe/}"
40838
40839    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40840
40841  # First separate the path from the arguments. This will split at the first
40842  # space.
40843  complete="$GNM"
40844  path="${complete%% *}"
40845  tmp="$complete EOL"
40846  arguments="${tmp#* }"
40847
40848  # Input might be given as Windows format, start by converting to
40849  # unix format.
40850  new_path="$path"
40851
40852  windows_path="$new_path"
40853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40854    unix_path=`$CYGPATH -u "$windows_path"`
40855    new_path="$unix_path"
40856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40858    new_path="$unix_path"
40859  fi
40860
40861
40862  # Now try to locate executable using which
40863  new_path=`$WHICH "$new_path" 2> /dev/null`
40864
40865  if test "x$new_path" = x; then
40866    # Oops. Which didn't find the executable.
40867    # The splitting of arguments from the executable at a space might have been incorrect,
40868    # since paths with space are more likely in Windows. Give it another try with the whole
40869    # argument.
40870    path="$complete"
40871    arguments="EOL"
40872    new_path="$path"
40873
40874  windows_path="$new_path"
40875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40876    unix_path=`$CYGPATH -u "$windows_path"`
40877    new_path="$unix_path"
40878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40880    new_path="$unix_path"
40881  fi
40882
40883
40884    new_path=`$WHICH "$new_path" 2> /dev/null`
40885    # bat and cmd files are not always considered executable in MSYS causing which
40886    # to not find them
40887    if test "x$new_path" = x \
40888        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40889        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40890      new_path="$path"
40891
40892  windows_path="$new_path"
40893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40894    unix_path=`$CYGPATH -u "$windows_path"`
40895    new_path="$unix_path"
40896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40898    new_path="$unix_path"
40899  fi
40900
40901    fi
40902
40903    if test "x$new_path" = x; then
40904      # It's still not found. Now this is an unrecoverable error.
40905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40906$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40907      has_space=`$ECHO "$complete" | $GREP " "`
40908      if test "x$has_space" != x; then
40909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40911      fi
40912      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40913    fi
40914  fi
40915
40916  # Now new_path has a complete unix path to the binary
40917  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40918    # Keep paths in /bin as-is, but remove trailing .exe if any
40919    new_path="${new_path/%.exe/}"
40920    # Do not save /bin paths to all_fixpath_prefixes!
40921  else
40922    # Not in mixed or Windows style, start by that.
40923    new_path=`cmd //c echo $new_path`
40924
40925  input_path="$new_path"
40926  # Check if we need to convert this using DOS-style short mode. If the path
40927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40928  # take no chances and rewrite it.
40929  # Note: m4 eats our [], so we need to use [ and ] instead.
40930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40931  if test "x$has_forbidden_chars" != x; then
40932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40933    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40934  fi
40935
40936    # Output is in $new_path
40937
40938  windows_path="$new_path"
40939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40940    unix_path=`$CYGPATH -u "$windows_path"`
40941    new_path="$unix_path"
40942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40944    new_path="$unix_path"
40945  fi
40946
40947    # remove trailing .exe if any
40948    new_path="${new_path/%.exe/}"
40949
40950    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40951    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40952  fi
40953
40954    else
40955      # We're on a unix platform. Hooray! :)
40956      # First separate the path from the arguments. This will split at the first
40957      # space.
40958      complete="$GNM"
40959      path="${complete%% *}"
40960      tmp="$complete EOL"
40961      arguments="${tmp#* }"
40962
40963      # Cannot rely on the command "which" here since it doesn't always work.
40964      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40965      if test -z "$is_absolute_path"; then
40966        # Path to executable is not absolute. Find it.
40967        IFS_save="$IFS"
40968        IFS=:
40969        for p in $PATH; do
40970          if test -f "$p/$path" && test -x "$p/$path"; then
40971            new_path="$p/$path"
40972            break
40973          fi
40974        done
40975        IFS="$IFS_save"
40976      else
40977        # This is an absolute path, we can use it without further modifications.
40978        new_path="$path"
40979      fi
40980
40981      if test "x$new_path" = x; then
40982        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40983$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40984        has_space=`$ECHO "$complete" | $GREP " "`
40985        if test "x$has_space" != x; then
40986          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40987$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40988        fi
40989        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40990      fi
40991    fi
40992
40993    # Now join together the path and the arguments once again
40994    if test "x$arguments" != xEOL; then
40995      new_complete="$new_path ${arguments% *}"
40996    else
40997      new_complete="$new_path"
40998    fi
40999
41000    if test "x$complete" != "x$new_complete"; then
41001      GNM="$new_complete"
41002      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41003$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41004    fi
41005  fi
41006
41007  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41008    # FIXME: we should unify this with the solaris case above.
41009
41010
41011  # Publish this variable in the help.
41012
41013
41014  if [ -z "${STRIP+x}" ]; then
41015    # The variable is not set by user, try to locate tool using the code snippet
41016    if test -n "$ac_tool_prefix"; then
41017  for ac_prog in strip
41018  do
41019    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41020set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41022$as_echo_n "checking for $ac_word... " >&6; }
41023if ${ac_cv_prog_STRIP+:} false; then :
41024  $as_echo_n "(cached) " >&6
41025else
41026  if test -n "$STRIP"; then
41027  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41028else
41029as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41030for as_dir in $PATH
41031do
41032  IFS=$as_save_IFS
41033  test -z "$as_dir" && as_dir=.
41034    for ac_exec_ext in '' $ac_executable_extensions; do
41035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41036    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41038    break 2
41039  fi
41040done
41041  done
41042IFS=$as_save_IFS
41043
41044fi
41045fi
41046STRIP=$ac_cv_prog_STRIP
41047if test -n "$STRIP"; then
41048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41049$as_echo "$STRIP" >&6; }
41050else
41051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41052$as_echo "no" >&6; }
41053fi
41054
41055
41056    test -n "$STRIP" && break
41057  done
41058fi
41059if test -z "$STRIP"; then
41060  ac_ct_STRIP=$STRIP
41061  for ac_prog in strip
41062do
41063  # Extract the first word of "$ac_prog", so it can be a program name with args.
41064set dummy $ac_prog; ac_word=$2
41065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41066$as_echo_n "checking for $ac_word... " >&6; }
41067if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41068  $as_echo_n "(cached) " >&6
41069else
41070  if test -n "$ac_ct_STRIP"; then
41071  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41072else
41073as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41074for as_dir in $PATH
41075do
41076  IFS=$as_save_IFS
41077  test -z "$as_dir" && as_dir=.
41078    for ac_exec_ext in '' $ac_executable_extensions; do
41079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41080    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41082    break 2
41083  fi
41084done
41085  done
41086IFS=$as_save_IFS
41087
41088fi
41089fi
41090ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41091if test -n "$ac_ct_STRIP"; then
41092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41093$as_echo "$ac_ct_STRIP" >&6; }
41094else
41095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41096$as_echo "no" >&6; }
41097fi
41098
41099
41100  test -n "$ac_ct_STRIP" && break
41101done
41102
41103  if test "x$ac_ct_STRIP" = x; then
41104    STRIP=""
41105  else
41106    case $cross_compiling:$ac_tool_warned in
41107yes:)
41108{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41109$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41110ac_tool_warned=yes ;;
41111esac
41112    STRIP=$ac_ct_STRIP
41113  fi
41114fi
41115
41116  else
41117    # The variable is set, but is it from the command line or the environment?
41118
41119    # Try to remove the string !STRIP! from our list.
41120    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41121    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41122      # If it failed, the variable was not from the command line. Ignore it,
41123      # but warn the user (except for BASH, which is always set by the calling BASH).
41124      if test "xSTRIP" != xBASH; then
41125        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41126$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41127      fi
41128      # Try to locate tool using the code snippet
41129      if test -n "$ac_tool_prefix"; then
41130  for ac_prog in strip
41131  do
41132    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41133set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41135$as_echo_n "checking for $ac_word... " >&6; }
41136if ${ac_cv_prog_STRIP+:} false; then :
41137  $as_echo_n "(cached) " >&6
41138else
41139  if test -n "$STRIP"; then
41140  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41141else
41142as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41143for as_dir in $PATH
41144do
41145  IFS=$as_save_IFS
41146  test -z "$as_dir" && as_dir=.
41147    for ac_exec_ext in '' $ac_executable_extensions; do
41148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41149    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41151    break 2
41152  fi
41153done
41154  done
41155IFS=$as_save_IFS
41156
41157fi
41158fi
41159STRIP=$ac_cv_prog_STRIP
41160if test -n "$STRIP"; then
41161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41162$as_echo "$STRIP" >&6; }
41163else
41164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41165$as_echo "no" >&6; }
41166fi
41167
41168
41169    test -n "$STRIP" && break
41170  done
41171fi
41172if test -z "$STRIP"; then
41173  ac_ct_STRIP=$STRIP
41174  for ac_prog in strip
41175do
41176  # Extract the first word of "$ac_prog", so it can be a program name with args.
41177set dummy $ac_prog; ac_word=$2
41178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41179$as_echo_n "checking for $ac_word... " >&6; }
41180if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41181  $as_echo_n "(cached) " >&6
41182else
41183  if test -n "$ac_ct_STRIP"; then
41184  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41185else
41186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41187for as_dir in $PATH
41188do
41189  IFS=$as_save_IFS
41190  test -z "$as_dir" && as_dir=.
41191    for ac_exec_ext in '' $ac_executable_extensions; do
41192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41193    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41195    break 2
41196  fi
41197done
41198  done
41199IFS=$as_save_IFS
41200
41201fi
41202fi
41203ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41204if test -n "$ac_ct_STRIP"; then
41205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41206$as_echo "$ac_ct_STRIP" >&6; }
41207else
41208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41209$as_echo "no" >&6; }
41210fi
41211
41212
41213  test -n "$ac_ct_STRIP" && break
41214done
41215
41216  if test "x$ac_ct_STRIP" = x; then
41217    STRIP=""
41218  else
41219    case $cross_compiling:$ac_tool_warned in
41220yes:)
41221{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41222$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41223ac_tool_warned=yes ;;
41224esac
41225    STRIP=$ac_ct_STRIP
41226  fi
41227fi
41228
41229    else
41230      # If it succeeded, then it was overridden by the user. We will use it
41231      # for the tool.
41232
41233      # First remove it from the list of overridden variables, so we can test
41234      # for unknown variables in the end.
41235      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41236
41237      # Check if we try to supply an empty value
41238      if test "x$STRIP" = x; then
41239        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41240$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41241        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41242$as_echo_n "checking for STRIP... " >&6; }
41243        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41244$as_echo "disabled" >&6; }
41245      else
41246        # Check if the provided tool contains a complete path.
41247        tool_specified="$STRIP"
41248        tool_basename="${tool_specified##*/}"
41249        if test "x$tool_basename" = "x$tool_specified"; then
41250          # A command without a complete path is provided, search $PATH.
41251          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41252$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41253          # Extract the first word of "$tool_basename", so it can be a program name with args.
41254set dummy $tool_basename; ac_word=$2
41255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41256$as_echo_n "checking for $ac_word... " >&6; }
41257if ${ac_cv_path_STRIP+:} false; then :
41258  $as_echo_n "(cached) " >&6
41259else
41260  case $STRIP in
41261  [\\/]* | ?:[\\/]*)
41262  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41263  ;;
41264  *)
41265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41266for as_dir in $PATH
41267do
41268  IFS=$as_save_IFS
41269  test -z "$as_dir" && as_dir=.
41270    for ac_exec_ext in '' $ac_executable_extensions; do
41271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41272    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41274    break 2
41275  fi
41276done
41277  done
41278IFS=$as_save_IFS
41279
41280  ;;
41281esac
41282fi
41283STRIP=$ac_cv_path_STRIP
41284if test -n "$STRIP"; then
41285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41286$as_echo "$STRIP" >&6; }
41287else
41288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41289$as_echo "no" >&6; }
41290fi
41291
41292
41293          if test "x$STRIP" = x; then
41294            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41295          fi
41296        else
41297          # Otherwise we believe it is a complete path. Use it as it is.
41298          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41299$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41300          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41301$as_echo_n "checking for STRIP... " >&6; }
41302          if test ! -x "$tool_specified"; then
41303            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41304$as_echo "not found" >&6; }
41305            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41306          fi
41307          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41308$as_echo "$tool_specified" >&6; }
41309        fi
41310      fi
41311    fi
41312
41313  fi
41314
41315
41316
41317  # Only process if variable expands to non-empty
41318
41319  if test "x$STRIP" != x; then
41320    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41321
41322  # First separate the path from the arguments. This will split at the first
41323  # space.
41324  complete="$STRIP"
41325  path="${complete%% *}"
41326  tmp="$complete EOL"
41327  arguments="${tmp#* }"
41328
41329  # Input might be given as Windows format, start by converting to
41330  # unix format.
41331  new_path=`$CYGPATH -u "$path"`
41332
41333  # Now try to locate executable using which
41334  new_path=`$WHICH "$new_path" 2> /dev/null`
41335  # bat and cmd files are not always considered executable in cygwin causing which
41336  # to not find them
41337  if test "x$new_path" = x \
41338      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41339      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41340    new_path=`$CYGPATH -u "$path"`
41341  fi
41342  if test "x$new_path" = x; then
41343    # Oops. Which didn't find the executable.
41344    # The splitting of arguments from the executable at a space might have been incorrect,
41345    # since paths with space are more likely in Windows. Give it another try with the whole
41346    # argument.
41347    path="$complete"
41348    arguments="EOL"
41349    new_path=`$CYGPATH -u "$path"`
41350    new_path=`$WHICH "$new_path" 2> /dev/null`
41351    # bat and cmd files are not always considered executable in cygwin causing which
41352    # to not find them
41353    if test "x$new_path" = x \
41354        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41355        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41356      new_path=`$CYGPATH -u "$path"`
41357    fi
41358    if test "x$new_path" = x; then
41359      # It's still not found. Now this is an unrecoverable error.
41360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41361$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41362      has_space=`$ECHO "$complete" | $GREP " "`
41363      if test "x$has_space" != x; then
41364        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41365$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41366      fi
41367      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41368    fi
41369  fi
41370
41371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41374  # "foo.exe" is OK but "foo" is an error.
41375  #
41376  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41377  # It is also a way to make sure we got the proper file name for the real test later on.
41378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41379  if test "x$test_shortpath" = x; then
41380    # Short path failed, file does not exist as specified.
41381    # Try adding .exe or .cmd
41382    if test -f "${new_path}.exe"; then
41383      input_to_shortpath="${new_path}.exe"
41384    elif test -f "${new_path}.cmd"; then
41385      input_to_shortpath="${new_path}.cmd"
41386    else
41387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41388$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41389      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41390$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41391      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41392    fi
41393  else
41394    input_to_shortpath="$new_path"
41395  fi
41396
41397  # Call helper function which possibly converts this using DOS-style short mode.
41398  # If so, the updated path is stored in $new_path.
41399  new_path="$input_to_shortpath"
41400
41401  input_path="$input_to_shortpath"
41402  # Check if we need to convert this using DOS-style short mode. If the path
41403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41404  # take no chances and rewrite it.
41405  # Note: m4 eats our [], so we need to use [ and ] instead.
41406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41407  if test "x$has_forbidden_chars" != x; then
41408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41409    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41410    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41411    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41412      # Going to short mode and back again did indeed matter. Since short mode is
41413      # case insensitive, let's make it lowercase to improve readability.
41414      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41415      # Now convert it back to Unix-style (cygpath)
41416      input_path=`$CYGPATH -u "$shortmode_path"`
41417      new_path="$input_path"
41418    fi
41419  fi
41420
41421  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41422  if test "x$test_cygdrive_prefix" = x; then
41423    # As a simple fix, exclude /usr/bin since it's not a real path.
41424    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41425      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41426      # a path prefixed by /cygdrive for fixpath to work.
41427      new_path="$CYGWIN_ROOT_PATH$input_path"
41428    fi
41429  fi
41430
41431  # remove trailing .exe if any
41432  new_path="${new_path/%.exe/}"
41433
41434    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41435
41436  # First separate the path from the arguments. This will split at the first
41437  # space.
41438  complete="$STRIP"
41439  path="${complete%% *}"
41440  tmp="$complete EOL"
41441  arguments="${tmp#* }"
41442
41443  # Input might be given as Windows format, start by converting to
41444  # unix format.
41445  new_path="$path"
41446
41447  windows_path="$new_path"
41448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41449    unix_path=`$CYGPATH -u "$windows_path"`
41450    new_path="$unix_path"
41451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41453    new_path="$unix_path"
41454  fi
41455
41456
41457  # Now try to locate executable using which
41458  new_path=`$WHICH "$new_path" 2> /dev/null`
41459
41460  if test "x$new_path" = x; then
41461    # Oops. Which didn't find the executable.
41462    # The splitting of arguments from the executable at a space might have been incorrect,
41463    # since paths with space are more likely in Windows. Give it another try with the whole
41464    # argument.
41465    path="$complete"
41466    arguments="EOL"
41467    new_path="$path"
41468
41469  windows_path="$new_path"
41470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41471    unix_path=`$CYGPATH -u "$windows_path"`
41472    new_path="$unix_path"
41473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41475    new_path="$unix_path"
41476  fi
41477
41478
41479    new_path=`$WHICH "$new_path" 2> /dev/null`
41480    # bat and cmd files are not always considered executable in MSYS causing which
41481    # to not find them
41482    if test "x$new_path" = x \
41483        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41484        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41485      new_path="$path"
41486
41487  windows_path="$new_path"
41488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41489    unix_path=`$CYGPATH -u "$windows_path"`
41490    new_path="$unix_path"
41491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41493    new_path="$unix_path"
41494  fi
41495
41496    fi
41497
41498    if test "x$new_path" = x; then
41499      # It's still not found. Now this is an unrecoverable error.
41500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41501$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41502      has_space=`$ECHO "$complete" | $GREP " "`
41503      if test "x$has_space" != x; then
41504        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41505$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41506      fi
41507      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41508    fi
41509  fi
41510
41511  # Now new_path has a complete unix path to the binary
41512  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41513    # Keep paths in /bin as-is, but remove trailing .exe if any
41514    new_path="${new_path/%.exe/}"
41515    # Do not save /bin paths to all_fixpath_prefixes!
41516  else
41517    # Not in mixed or Windows style, start by that.
41518    new_path=`cmd //c echo $new_path`
41519
41520  input_path="$new_path"
41521  # Check if we need to convert this using DOS-style short mode. If the path
41522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41523  # take no chances and rewrite it.
41524  # Note: m4 eats our [], so we need to use [ and ] instead.
41525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41526  if test "x$has_forbidden_chars" != x; then
41527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41528    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41529  fi
41530
41531    # Output is in $new_path
41532
41533  windows_path="$new_path"
41534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41535    unix_path=`$CYGPATH -u "$windows_path"`
41536    new_path="$unix_path"
41537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41539    new_path="$unix_path"
41540  fi
41541
41542    # remove trailing .exe if any
41543    new_path="${new_path/%.exe/}"
41544
41545    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41546    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41547  fi
41548
41549    else
41550      # We're on a unix platform. Hooray! :)
41551      # First separate the path from the arguments. This will split at the first
41552      # space.
41553      complete="$STRIP"
41554      path="${complete%% *}"
41555      tmp="$complete EOL"
41556      arguments="${tmp#* }"
41557
41558      # Cannot rely on the command "which" here since it doesn't always work.
41559      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41560      if test -z "$is_absolute_path"; then
41561        # Path to executable is not absolute. Find it.
41562        IFS_save="$IFS"
41563        IFS=:
41564        for p in $PATH; do
41565          if test -f "$p/$path" && test -x "$p/$path"; then
41566            new_path="$p/$path"
41567            break
41568          fi
41569        done
41570        IFS="$IFS_save"
41571      else
41572        # This is an absolute path, we can use it without further modifications.
41573        new_path="$path"
41574      fi
41575
41576      if test "x$new_path" = x; then
41577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41578$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41579        has_space=`$ECHO "$complete" | $GREP " "`
41580        if test "x$has_space" != x; then
41581          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41582$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41583        fi
41584        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41585      fi
41586    fi
41587
41588    # Now join together the path and the arguments once again
41589    if test "x$arguments" != xEOL; then
41590      new_complete="$new_path ${arguments% *}"
41591    else
41592      new_complete="$new_path"
41593    fi
41594
41595    if test "x$complete" != "x$new_complete"; then
41596      STRIP="$new_complete"
41597      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41598$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41599    fi
41600  fi
41601
41602    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41603
41604
41605  # Publish this variable in the help.
41606
41607
41608  if [ -z "${NM+x}" ]; then
41609    # The variable is not set by user, try to locate tool using the code snippet
41610    if test -n "$ac_tool_prefix"; then
41611  for ac_prog in nm gcc-nm
41612  do
41613    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41614set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41616$as_echo_n "checking for $ac_word... " >&6; }
41617if ${ac_cv_prog_NM+:} false; then :
41618  $as_echo_n "(cached) " >&6
41619else
41620  if test -n "$NM"; then
41621  ac_cv_prog_NM="$NM" # Let the user override the test.
41622else
41623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41624for as_dir in $PATH
41625do
41626  IFS=$as_save_IFS
41627  test -z "$as_dir" && as_dir=.
41628    for ac_exec_ext in '' $ac_executable_extensions; do
41629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41630    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41632    break 2
41633  fi
41634done
41635  done
41636IFS=$as_save_IFS
41637
41638fi
41639fi
41640NM=$ac_cv_prog_NM
41641if test -n "$NM"; then
41642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41643$as_echo "$NM" >&6; }
41644else
41645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41646$as_echo "no" >&6; }
41647fi
41648
41649
41650    test -n "$NM" && break
41651  done
41652fi
41653if test -z "$NM"; then
41654  ac_ct_NM=$NM
41655  for ac_prog in nm gcc-nm
41656do
41657  # Extract the first word of "$ac_prog", so it can be a program name with args.
41658set dummy $ac_prog; ac_word=$2
41659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41660$as_echo_n "checking for $ac_word... " >&6; }
41661if ${ac_cv_prog_ac_ct_NM+:} false; then :
41662  $as_echo_n "(cached) " >&6
41663else
41664  if test -n "$ac_ct_NM"; then
41665  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41666else
41667as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41668for as_dir in $PATH
41669do
41670  IFS=$as_save_IFS
41671  test -z "$as_dir" && as_dir=.
41672    for ac_exec_ext in '' $ac_executable_extensions; do
41673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41674    ac_cv_prog_ac_ct_NM="$ac_prog"
41675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41676    break 2
41677  fi
41678done
41679  done
41680IFS=$as_save_IFS
41681
41682fi
41683fi
41684ac_ct_NM=$ac_cv_prog_ac_ct_NM
41685if test -n "$ac_ct_NM"; then
41686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41687$as_echo "$ac_ct_NM" >&6; }
41688else
41689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41690$as_echo "no" >&6; }
41691fi
41692
41693
41694  test -n "$ac_ct_NM" && break
41695done
41696
41697  if test "x$ac_ct_NM" = x; then
41698    NM=""
41699  else
41700    case $cross_compiling:$ac_tool_warned in
41701yes:)
41702{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41703$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41704ac_tool_warned=yes ;;
41705esac
41706    NM=$ac_ct_NM
41707  fi
41708fi
41709
41710  else
41711    # The variable is set, but is it from the command line or the environment?
41712
41713    # Try to remove the string !NM! from our list.
41714    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41715    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41716      # If it failed, the variable was not from the command line. Ignore it,
41717      # but warn the user (except for BASH, which is always set by the calling BASH).
41718      if test "xNM" != xBASH; then
41719        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41720$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41721      fi
41722      # Try to locate tool using the code snippet
41723      if test -n "$ac_tool_prefix"; then
41724  for ac_prog in nm gcc-nm
41725  do
41726    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41727set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41729$as_echo_n "checking for $ac_word... " >&6; }
41730if ${ac_cv_prog_NM+:} false; then :
41731  $as_echo_n "(cached) " >&6
41732else
41733  if test -n "$NM"; then
41734  ac_cv_prog_NM="$NM" # Let the user override the test.
41735else
41736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41737for as_dir in $PATH
41738do
41739  IFS=$as_save_IFS
41740  test -z "$as_dir" && as_dir=.
41741    for ac_exec_ext in '' $ac_executable_extensions; do
41742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41743    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41745    break 2
41746  fi
41747done
41748  done
41749IFS=$as_save_IFS
41750
41751fi
41752fi
41753NM=$ac_cv_prog_NM
41754if test -n "$NM"; then
41755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41756$as_echo "$NM" >&6; }
41757else
41758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41759$as_echo "no" >&6; }
41760fi
41761
41762
41763    test -n "$NM" && break
41764  done
41765fi
41766if test -z "$NM"; then
41767  ac_ct_NM=$NM
41768  for ac_prog in nm gcc-nm
41769do
41770  # Extract the first word of "$ac_prog", so it can be a program name with args.
41771set dummy $ac_prog; ac_word=$2
41772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41773$as_echo_n "checking for $ac_word... " >&6; }
41774if ${ac_cv_prog_ac_ct_NM+:} false; then :
41775  $as_echo_n "(cached) " >&6
41776else
41777  if test -n "$ac_ct_NM"; then
41778  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41779else
41780as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41781for as_dir in $PATH
41782do
41783  IFS=$as_save_IFS
41784  test -z "$as_dir" && as_dir=.
41785    for ac_exec_ext in '' $ac_executable_extensions; do
41786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41787    ac_cv_prog_ac_ct_NM="$ac_prog"
41788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41789    break 2
41790  fi
41791done
41792  done
41793IFS=$as_save_IFS
41794
41795fi
41796fi
41797ac_ct_NM=$ac_cv_prog_ac_ct_NM
41798if test -n "$ac_ct_NM"; then
41799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41800$as_echo "$ac_ct_NM" >&6; }
41801else
41802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41803$as_echo "no" >&6; }
41804fi
41805
41806
41807  test -n "$ac_ct_NM" && break
41808done
41809
41810  if test "x$ac_ct_NM" = x; then
41811    NM=""
41812  else
41813    case $cross_compiling:$ac_tool_warned in
41814yes:)
41815{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41816$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41817ac_tool_warned=yes ;;
41818esac
41819    NM=$ac_ct_NM
41820  fi
41821fi
41822
41823    else
41824      # If it succeeded, then it was overridden by the user. We will use it
41825      # for the tool.
41826
41827      # First remove it from the list of overridden variables, so we can test
41828      # for unknown variables in the end.
41829      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41830
41831      # Check if we try to supply an empty value
41832      if test "x$NM" = x; then
41833        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41834$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41835        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41836$as_echo_n "checking for NM... " >&6; }
41837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41838$as_echo "disabled" >&6; }
41839      else
41840        # Check if the provided tool contains a complete path.
41841        tool_specified="$NM"
41842        tool_basename="${tool_specified##*/}"
41843        if test "x$tool_basename" = "x$tool_specified"; then
41844          # A command without a complete path is provided, search $PATH.
41845          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41846$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41847          # Extract the first word of "$tool_basename", so it can be a program name with args.
41848set dummy $tool_basename; ac_word=$2
41849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41850$as_echo_n "checking for $ac_word... " >&6; }
41851if ${ac_cv_path_NM+:} false; then :
41852  $as_echo_n "(cached) " >&6
41853else
41854  case $NM in
41855  [\\/]* | ?:[\\/]*)
41856  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41857  ;;
41858  *)
41859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41860for as_dir in $PATH
41861do
41862  IFS=$as_save_IFS
41863  test -z "$as_dir" && as_dir=.
41864    for ac_exec_ext in '' $ac_executable_extensions; do
41865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41866    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41868    break 2
41869  fi
41870done
41871  done
41872IFS=$as_save_IFS
41873
41874  ;;
41875esac
41876fi
41877NM=$ac_cv_path_NM
41878if test -n "$NM"; then
41879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41880$as_echo "$NM" >&6; }
41881else
41882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41883$as_echo "no" >&6; }
41884fi
41885
41886
41887          if test "x$NM" = x; then
41888            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41889          fi
41890        else
41891          # Otherwise we believe it is a complete path. Use it as it is.
41892          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41893$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41894          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41895$as_echo_n "checking for NM... " >&6; }
41896          if test ! -x "$tool_specified"; then
41897            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41898$as_echo "not found" >&6; }
41899            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41900          fi
41901          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41902$as_echo "$tool_specified" >&6; }
41903        fi
41904      fi
41905    fi
41906
41907  fi
41908
41909
41910    else
41911
41912
41913  # Publish this variable in the help.
41914
41915
41916  if [ -z "${NM+x}" ]; then
41917    # The variable is not set by user, try to locate tool using the code snippet
41918    if test -n "$ac_tool_prefix"; then
41919  for ac_prog in nm
41920  do
41921    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41922set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41924$as_echo_n "checking for $ac_word... " >&6; }
41925if ${ac_cv_prog_NM+:} false; then :
41926  $as_echo_n "(cached) " >&6
41927else
41928  if test -n "$NM"; then
41929  ac_cv_prog_NM="$NM" # Let the user override the test.
41930else
41931as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41932for as_dir in $PATH
41933do
41934  IFS=$as_save_IFS
41935  test -z "$as_dir" && as_dir=.
41936    for ac_exec_ext in '' $ac_executable_extensions; do
41937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41938    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41940    break 2
41941  fi
41942done
41943  done
41944IFS=$as_save_IFS
41945
41946fi
41947fi
41948NM=$ac_cv_prog_NM
41949if test -n "$NM"; then
41950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41951$as_echo "$NM" >&6; }
41952else
41953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41954$as_echo "no" >&6; }
41955fi
41956
41957
41958    test -n "$NM" && break
41959  done
41960fi
41961if test -z "$NM"; then
41962  ac_ct_NM=$NM
41963  for ac_prog in nm
41964do
41965  # Extract the first word of "$ac_prog", so it can be a program name with args.
41966set dummy $ac_prog; ac_word=$2
41967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41968$as_echo_n "checking for $ac_word... " >&6; }
41969if ${ac_cv_prog_ac_ct_NM+:} false; then :
41970  $as_echo_n "(cached) " >&6
41971else
41972  if test -n "$ac_ct_NM"; then
41973  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41974else
41975as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41976for as_dir in $PATH
41977do
41978  IFS=$as_save_IFS
41979  test -z "$as_dir" && as_dir=.
41980    for ac_exec_ext in '' $ac_executable_extensions; do
41981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41982    ac_cv_prog_ac_ct_NM="$ac_prog"
41983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41984    break 2
41985  fi
41986done
41987  done
41988IFS=$as_save_IFS
41989
41990fi
41991fi
41992ac_ct_NM=$ac_cv_prog_ac_ct_NM
41993if test -n "$ac_ct_NM"; then
41994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41995$as_echo "$ac_ct_NM" >&6; }
41996else
41997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41998$as_echo "no" >&6; }
41999fi
42000
42001
42002  test -n "$ac_ct_NM" && break
42003done
42004
42005  if test "x$ac_ct_NM" = x; then
42006    NM=""
42007  else
42008    case $cross_compiling:$ac_tool_warned in
42009yes:)
42010{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42011$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42012ac_tool_warned=yes ;;
42013esac
42014    NM=$ac_ct_NM
42015  fi
42016fi
42017
42018  else
42019    # The variable is set, but is it from the command line or the environment?
42020
42021    # Try to remove the string !NM! from our list.
42022    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42023    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42024      # If it failed, the variable was not from the command line. Ignore it,
42025      # but warn the user (except for BASH, which is always set by the calling BASH).
42026      if test "xNM" != xBASH; then
42027        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42028$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42029      fi
42030      # Try to locate tool using the code snippet
42031      if test -n "$ac_tool_prefix"; then
42032  for ac_prog in nm
42033  do
42034    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42035set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42037$as_echo_n "checking for $ac_word... " >&6; }
42038if ${ac_cv_prog_NM+:} false; then :
42039  $as_echo_n "(cached) " >&6
42040else
42041  if test -n "$NM"; then
42042  ac_cv_prog_NM="$NM" # Let the user override the test.
42043else
42044as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42045for as_dir in $PATH
42046do
42047  IFS=$as_save_IFS
42048  test -z "$as_dir" && as_dir=.
42049    for ac_exec_ext in '' $ac_executable_extensions; do
42050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42051    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42053    break 2
42054  fi
42055done
42056  done
42057IFS=$as_save_IFS
42058
42059fi
42060fi
42061NM=$ac_cv_prog_NM
42062if test -n "$NM"; then
42063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42064$as_echo "$NM" >&6; }
42065else
42066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42067$as_echo "no" >&6; }
42068fi
42069
42070
42071    test -n "$NM" && break
42072  done
42073fi
42074if test -z "$NM"; then
42075  ac_ct_NM=$NM
42076  for ac_prog in nm
42077do
42078  # Extract the first word of "$ac_prog", so it can be a program name with args.
42079set dummy $ac_prog; ac_word=$2
42080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42081$as_echo_n "checking for $ac_word... " >&6; }
42082if ${ac_cv_prog_ac_ct_NM+:} false; then :
42083  $as_echo_n "(cached) " >&6
42084else
42085  if test -n "$ac_ct_NM"; then
42086  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42087else
42088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42089for as_dir in $PATH
42090do
42091  IFS=$as_save_IFS
42092  test -z "$as_dir" && as_dir=.
42093    for ac_exec_ext in '' $ac_executable_extensions; do
42094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42095    ac_cv_prog_ac_ct_NM="$ac_prog"
42096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42097    break 2
42098  fi
42099done
42100  done
42101IFS=$as_save_IFS
42102
42103fi
42104fi
42105ac_ct_NM=$ac_cv_prog_ac_ct_NM
42106if test -n "$ac_ct_NM"; then
42107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42108$as_echo "$ac_ct_NM" >&6; }
42109else
42110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42111$as_echo "no" >&6; }
42112fi
42113
42114
42115  test -n "$ac_ct_NM" && break
42116done
42117
42118  if test "x$ac_ct_NM" = x; then
42119    NM=""
42120  else
42121    case $cross_compiling:$ac_tool_warned in
42122yes:)
42123{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42124$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42125ac_tool_warned=yes ;;
42126esac
42127    NM=$ac_ct_NM
42128  fi
42129fi
42130
42131    else
42132      # If it succeeded, then it was overridden by the user. We will use it
42133      # for the tool.
42134
42135      # First remove it from the list of overridden variables, so we can test
42136      # for unknown variables in the end.
42137      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42138
42139      # Check if we try to supply an empty value
42140      if test "x$NM" = x; then
42141        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42142$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42143        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42144$as_echo_n "checking for NM... " >&6; }
42145        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42146$as_echo "disabled" >&6; }
42147      else
42148        # Check if the provided tool contains a complete path.
42149        tool_specified="$NM"
42150        tool_basename="${tool_specified##*/}"
42151        if test "x$tool_basename" = "x$tool_specified"; then
42152          # A command without a complete path is provided, search $PATH.
42153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42154$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42155          # Extract the first word of "$tool_basename", so it can be a program name with args.
42156set dummy $tool_basename; ac_word=$2
42157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42158$as_echo_n "checking for $ac_word... " >&6; }
42159if ${ac_cv_path_NM+:} false; then :
42160  $as_echo_n "(cached) " >&6
42161else
42162  case $NM in
42163  [\\/]* | ?:[\\/]*)
42164  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42165  ;;
42166  *)
42167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42168for as_dir in $PATH
42169do
42170  IFS=$as_save_IFS
42171  test -z "$as_dir" && as_dir=.
42172    for ac_exec_ext in '' $ac_executable_extensions; do
42173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42174    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42176    break 2
42177  fi
42178done
42179  done
42180IFS=$as_save_IFS
42181
42182  ;;
42183esac
42184fi
42185NM=$ac_cv_path_NM
42186if test -n "$NM"; then
42187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42188$as_echo "$NM" >&6; }
42189else
42190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42191$as_echo "no" >&6; }
42192fi
42193
42194
42195          if test "x$NM" = x; then
42196            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42197          fi
42198        else
42199          # Otherwise we believe it is a complete path. Use it as it is.
42200          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42201$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42202          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42203$as_echo_n "checking for NM... " >&6; }
42204          if test ! -x "$tool_specified"; then
42205            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42206$as_echo "not found" >&6; }
42207            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42208          fi
42209          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42210$as_echo "$tool_specified" >&6; }
42211        fi
42212      fi
42213    fi
42214
42215  fi
42216
42217
42218    fi
42219
42220  # Only process if variable expands to non-empty
42221
42222  if test "x$NM" != x; then
42223    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42224
42225  # First separate the path from the arguments. This will split at the first
42226  # space.
42227  complete="$NM"
42228  path="${complete%% *}"
42229  tmp="$complete EOL"
42230  arguments="${tmp#* }"
42231
42232  # Input might be given as Windows format, start by converting to
42233  # unix format.
42234  new_path=`$CYGPATH -u "$path"`
42235
42236  # Now try to locate executable using which
42237  new_path=`$WHICH "$new_path" 2> /dev/null`
42238  # bat and cmd files are not always considered executable in cygwin causing which
42239  # to not find them
42240  if test "x$new_path" = x \
42241      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42242      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42243    new_path=`$CYGPATH -u "$path"`
42244  fi
42245  if test "x$new_path" = x; then
42246    # Oops. Which didn't find the executable.
42247    # The splitting of arguments from the executable at a space might have been incorrect,
42248    # since paths with space are more likely in Windows. Give it another try with the whole
42249    # argument.
42250    path="$complete"
42251    arguments="EOL"
42252    new_path=`$CYGPATH -u "$path"`
42253    new_path=`$WHICH "$new_path" 2> /dev/null`
42254    # bat and cmd files are not always considered executable in cygwin causing which
42255    # to not find them
42256    if test "x$new_path" = x \
42257        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42258        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42259      new_path=`$CYGPATH -u "$path"`
42260    fi
42261    if test "x$new_path" = x; then
42262      # It's still not found. Now this is an unrecoverable error.
42263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42264$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42265      has_space=`$ECHO "$complete" | $GREP " "`
42266      if test "x$has_space" != x; then
42267        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42268$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42269      fi
42270      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42271    fi
42272  fi
42273
42274  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42275  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42276  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42277  # "foo.exe" is OK but "foo" is an error.
42278  #
42279  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42280  # It is also a way to make sure we got the proper file name for the real test later on.
42281  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42282  if test "x$test_shortpath" = x; then
42283    # Short path failed, file does not exist as specified.
42284    # Try adding .exe or .cmd
42285    if test -f "${new_path}.exe"; then
42286      input_to_shortpath="${new_path}.exe"
42287    elif test -f "${new_path}.cmd"; then
42288      input_to_shortpath="${new_path}.cmd"
42289    else
42290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42291$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42292      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42293$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42294      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42295    fi
42296  else
42297    input_to_shortpath="$new_path"
42298  fi
42299
42300  # Call helper function which possibly converts this using DOS-style short mode.
42301  # If so, the updated path is stored in $new_path.
42302  new_path="$input_to_shortpath"
42303
42304  input_path="$input_to_shortpath"
42305  # Check if we need to convert this using DOS-style short mode. If the path
42306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42307  # take no chances and rewrite it.
42308  # Note: m4 eats our [], so we need to use [ and ] instead.
42309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42310  if test "x$has_forbidden_chars" != x; then
42311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42315      # Going to short mode and back again did indeed matter. Since short mode is
42316      # case insensitive, let's make it lowercase to improve readability.
42317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42318      # Now convert it back to Unix-style (cygpath)
42319      input_path=`$CYGPATH -u "$shortmode_path"`
42320      new_path="$input_path"
42321    fi
42322  fi
42323
42324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42325  if test "x$test_cygdrive_prefix" = x; then
42326    # As a simple fix, exclude /usr/bin since it's not a real path.
42327    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42329      # a path prefixed by /cygdrive for fixpath to work.
42330      new_path="$CYGWIN_ROOT_PATH$input_path"
42331    fi
42332  fi
42333
42334  # remove trailing .exe if any
42335  new_path="${new_path/%.exe/}"
42336
42337    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42338
42339  # First separate the path from the arguments. This will split at the first
42340  # space.
42341  complete="$NM"
42342  path="${complete%% *}"
42343  tmp="$complete EOL"
42344  arguments="${tmp#* }"
42345
42346  # Input might be given as Windows format, start by converting to
42347  # unix format.
42348  new_path="$path"
42349
42350  windows_path="$new_path"
42351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42352    unix_path=`$CYGPATH -u "$windows_path"`
42353    new_path="$unix_path"
42354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42356    new_path="$unix_path"
42357  fi
42358
42359
42360  # Now try to locate executable using which
42361  new_path=`$WHICH "$new_path" 2> /dev/null`
42362
42363  if test "x$new_path" = x; then
42364    # Oops. Which didn't find the executable.
42365    # The splitting of arguments from the executable at a space might have been incorrect,
42366    # since paths with space are more likely in Windows. Give it another try with the whole
42367    # argument.
42368    path="$complete"
42369    arguments="EOL"
42370    new_path="$path"
42371
42372  windows_path="$new_path"
42373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42374    unix_path=`$CYGPATH -u "$windows_path"`
42375    new_path="$unix_path"
42376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42378    new_path="$unix_path"
42379  fi
42380
42381
42382    new_path=`$WHICH "$new_path" 2> /dev/null`
42383    # bat and cmd files are not always considered executable in MSYS causing which
42384    # to not find them
42385    if test "x$new_path" = x \
42386        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42387        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42388      new_path="$path"
42389
42390  windows_path="$new_path"
42391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42392    unix_path=`$CYGPATH -u "$windows_path"`
42393    new_path="$unix_path"
42394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42396    new_path="$unix_path"
42397  fi
42398
42399    fi
42400
42401    if test "x$new_path" = x; then
42402      # It's still not found. Now this is an unrecoverable error.
42403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42404$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42405      has_space=`$ECHO "$complete" | $GREP " "`
42406      if test "x$has_space" != x; then
42407        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42408$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42409      fi
42410      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42411    fi
42412  fi
42413
42414  # Now new_path has a complete unix path to the binary
42415  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42416    # Keep paths in /bin as-is, but remove trailing .exe if any
42417    new_path="${new_path/%.exe/}"
42418    # Do not save /bin paths to all_fixpath_prefixes!
42419  else
42420    # Not in mixed or Windows style, start by that.
42421    new_path=`cmd //c echo $new_path`
42422
42423  input_path="$new_path"
42424  # Check if we need to convert this using DOS-style short mode. If the path
42425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42426  # take no chances and rewrite it.
42427  # Note: m4 eats our [], so we need to use [ and ] instead.
42428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42429  if test "x$has_forbidden_chars" != x; then
42430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42432  fi
42433
42434    # Output is in $new_path
42435
42436  windows_path="$new_path"
42437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42438    unix_path=`$CYGPATH -u "$windows_path"`
42439    new_path="$unix_path"
42440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42442    new_path="$unix_path"
42443  fi
42444
42445    # remove trailing .exe if any
42446    new_path="${new_path/%.exe/}"
42447
42448    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42449    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42450  fi
42451
42452    else
42453      # We're on a unix platform. Hooray! :)
42454      # First separate the path from the arguments. This will split at the first
42455      # space.
42456      complete="$NM"
42457      path="${complete%% *}"
42458      tmp="$complete EOL"
42459      arguments="${tmp#* }"
42460
42461      # Cannot rely on the command "which" here since it doesn't always work.
42462      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42463      if test -z "$is_absolute_path"; then
42464        # Path to executable is not absolute. Find it.
42465        IFS_save="$IFS"
42466        IFS=:
42467        for p in $PATH; do
42468          if test -f "$p/$path" && test -x "$p/$path"; then
42469            new_path="$p/$path"
42470            break
42471          fi
42472        done
42473        IFS="$IFS_save"
42474      else
42475        # This is an absolute path, we can use it without further modifications.
42476        new_path="$path"
42477      fi
42478
42479      if test "x$new_path" = x; then
42480        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42481$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42482        has_space=`$ECHO "$complete" | $GREP " "`
42483        if test "x$has_space" != x; then
42484          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42485$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42486        fi
42487        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42488      fi
42489    fi
42490
42491    # Now join together the path and the arguments once again
42492    if test "x$arguments" != xEOL; then
42493      new_complete="$new_path ${arguments% *}"
42494    else
42495      new_complete="$new_path"
42496    fi
42497
42498    if test "x$complete" != "x$new_complete"; then
42499      NM="$new_complete"
42500      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42501$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42502    fi
42503  fi
42504
42505    GNM="$NM"
42506
42507  fi
42508
42509  # objcopy is used for moving debug symbols to separate files when
42510  # full debug symbols are enabled.
42511  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42512
42513
42514  # Publish this variable in the help.
42515
42516
42517  if [ -z "${OBJCOPY+x}" ]; then
42518    # The variable is not set by user, try to locate tool using the code snippet
42519    if test -n "$ac_tool_prefix"; then
42520  for ac_prog in gobjcopy objcopy
42521  do
42522    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42523set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42525$as_echo_n "checking for $ac_word... " >&6; }
42526if ${ac_cv_prog_OBJCOPY+:} false; then :
42527  $as_echo_n "(cached) " >&6
42528else
42529  if test -n "$OBJCOPY"; then
42530  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42531else
42532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42533for as_dir in $PATH
42534do
42535  IFS=$as_save_IFS
42536  test -z "$as_dir" && as_dir=.
42537    for ac_exec_ext in '' $ac_executable_extensions; do
42538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42539    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42541    break 2
42542  fi
42543done
42544  done
42545IFS=$as_save_IFS
42546
42547fi
42548fi
42549OBJCOPY=$ac_cv_prog_OBJCOPY
42550if test -n "$OBJCOPY"; then
42551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42552$as_echo "$OBJCOPY" >&6; }
42553else
42554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42555$as_echo "no" >&6; }
42556fi
42557
42558
42559    test -n "$OBJCOPY" && break
42560  done
42561fi
42562if test -z "$OBJCOPY"; then
42563  ac_ct_OBJCOPY=$OBJCOPY
42564  for ac_prog in gobjcopy objcopy
42565do
42566  # Extract the first word of "$ac_prog", so it can be a program name with args.
42567set dummy $ac_prog; ac_word=$2
42568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42569$as_echo_n "checking for $ac_word... " >&6; }
42570if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42571  $as_echo_n "(cached) " >&6
42572else
42573  if test -n "$ac_ct_OBJCOPY"; then
42574  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42575else
42576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42577for as_dir in $PATH
42578do
42579  IFS=$as_save_IFS
42580  test -z "$as_dir" && as_dir=.
42581    for ac_exec_ext in '' $ac_executable_extensions; do
42582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42583    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42585    break 2
42586  fi
42587done
42588  done
42589IFS=$as_save_IFS
42590
42591fi
42592fi
42593ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42594if test -n "$ac_ct_OBJCOPY"; then
42595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42596$as_echo "$ac_ct_OBJCOPY" >&6; }
42597else
42598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42599$as_echo "no" >&6; }
42600fi
42601
42602
42603  test -n "$ac_ct_OBJCOPY" && break
42604done
42605
42606  if test "x$ac_ct_OBJCOPY" = x; then
42607    OBJCOPY=""
42608  else
42609    case $cross_compiling:$ac_tool_warned in
42610yes:)
42611{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42612$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42613ac_tool_warned=yes ;;
42614esac
42615    OBJCOPY=$ac_ct_OBJCOPY
42616  fi
42617fi
42618
42619  else
42620    # The variable is set, but is it from the command line or the environment?
42621
42622    # Try to remove the string !OBJCOPY! from our list.
42623    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42624    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42625      # If it failed, the variable was not from the command line. Ignore it,
42626      # but warn the user (except for BASH, which is always set by the calling BASH).
42627      if test "xOBJCOPY" != xBASH; then
42628        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42629$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42630      fi
42631      # Try to locate tool using the code snippet
42632      if test -n "$ac_tool_prefix"; then
42633  for ac_prog in gobjcopy objcopy
42634  do
42635    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42636set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42638$as_echo_n "checking for $ac_word... " >&6; }
42639if ${ac_cv_prog_OBJCOPY+:} false; then :
42640  $as_echo_n "(cached) " >&6
42641else
42642  if test -n "$OBJCOPY"; then
42643  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42644else
42645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42646for as_dir in $PATH
42647do
42648  IFS=$as_save_IFS
42649  test -z "$as_dir" && as_dir=.
42650    for ac_exec_ext in '' $ac_executable_extensions; do
42651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42652    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42654    break 2
42655  fi
42656done
42657  done
42658IFS=$as_save_IFS
42659
42660fi
42661fi
42662OBJCOPY=$ac_cv_prog_OBJCOPY
42663if test -n "$OBJCOPY"; then
42664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42665$as_echo "$OBJCOPY" >&6; }
42666else
42667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42668$as_echo "no" >&6; }
42669fi
42670
42671
42672    test -n "$OBJCOPY" && break
42673  done
42674fi
42675if test -z "$OBJCOPY"; then
42676  ac_ct_OBJCOPY=$OBJCOPY
42677  for ac_prog in gobjcopy objcopy
42678do
42679  # Extract the first word of "$ac_prog", so it can be a program name with args.
42680set dummy $ac_prog; ac_word=$2
42681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42682$as_echo_n "checking for $ac_word... " >&6; }
42683if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42684  $as_echo_n "(cached) " >&6
42685else
42686  if test -n "$ac_ct_OBJCOPY"; then
42687  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42688else
42689as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42690for as_dir in $PATH
42691do
42692  IFS=$as_save_IFS
42693  test -z "$as_dir" && as_dir=.
42694    for ac_exec_ext in '' $ac_executable_extensions; do
42695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42696    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42698    break 2
42699  fi
42700done
42701  done
42702IFS=$as_save_IFS
42703
42704fi
42705fi
42706ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42707if test -n "$ac_ct_OBJCOPY"; then
42708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42709$as_echo "$ac_ct_OBJCOPY" >&6; }
42710else
42711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42712$as_echo "no" >&6; }
42713fi
42714
42715
42716  test -n "$ac_ct_OBJCOPY" && break
42717done
42718
42719  if test "x$ac_ct_OBJCOPY" = x; then
42720    OBJCOPY=""
42721  else
42722    case $cross_compiling:$ac_tool_warned in
42723yes:)
42724{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42725$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42726ac_tool_warned=yes ;;
42727esac
42728    OBJCOPY=$ac_ct_OBJCOPY
42729  fi
42730fi
42731
42732    else
42733      # If it succeeded, then it was overridden by the user. We will use it
42734      # for the tool.
42735
42736      # First remove it from the list of overridden variables, so we can test
42737      # for unknown variables in the end.
42738      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42739
42740      # Check if we try to supply an empty value
42741      if test "x$OBJCOPY" = x; then
42742        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42743$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42744        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42745$as_echo_n "checking for OBJCOPY... " >&6; }
42746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42747$as_echo "disabled" >&6; }
42748      else
42749        # Check if the provided tool contains a complete path.
42750        tool_specified="$OBJCOPY"
42751        tool_basename="${tool_specified##*/}"
42752        if test "x$tool_basename" = "x$tool_specified"; then
42753          # A command without a complete path is provided, search $PATH.
42754          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42755$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42756          # Extract the first word of "$tool_basename", so it can be a program name with args.
42757set dummy $tool_basename; ac_word=$2
42758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42759$as_echo_n "checking for $ac_word... " >&6; }
42760if ${ac_cv_path_OBJCOPY+:} false; then :
42761  $as_echo_n "(cached) " >&6
42762else
42763  case $OBJCOPY in
42764  [\\/]* | ?:[\\/]*)
42765  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42766  ;;
42767  *)
42768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42769for as_dir in $PATH
42770do
42771  IFS=$as_save_IFS
42772  test -z "$as_dir" && as_dir=.
42773    for ac_exec_ext in '' $ac_executable_extensions; do
42774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42775    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42777    break 2
42778  fi
42779done
42780  done
42781IFS=$as_save_IFS
42782
42783  ;;
42784esac
42785fi
42786OBJCOPY=$ac_cv_path_OBJCOPY
42787if test -n "$OBJCOPY"; then
42788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42789$as_echo "$OBJCOPY" >&6; }
42790else
42791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42792$as_echo "no" >&6; }
42793fi
42794
42795
42796          if test "x$OBJCOPY" = x; then
42797            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42798          fi
42799        else
42800          # Otherwise we believe it is a complete path. Use it as it is.
42801          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42802$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42803          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42804$as_echo_n "checking for OBJCOPY... " >&6; }
42805          if test ! -x "$tool_specified"; then
42806            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42807$as_echo "not found" >&6; }
42808            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42809          fi
42810          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42811$as_echo "$tool_specified" >&6; }
42812        fi
42813      fi
42814    fi
42815
42816  fi
42817
42818
42819    # Only call fixup if objcopy was found.
42820    if test -n "$OBJCOPY"; then
42821
42822  # Only process if variable expands to non-empty
42823
42824  if test "x$OBJCOPY" != x; then
42825    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42826
42827  # First separate the path from the arguments. This will split at the first
42828  # space.
42829  complete="$OBJCOPY"
42830  path="${complete%% *}"
42831  tmp="$complete EOL"
42832  arguments="${tmp#* }"
42833
42834  # Input might be given as Windows format, start by converting to
42835  # unix format.
42836  new_path=`$CYGPATH -u "$path"`
42837
42838  # Now try to locate executable using which
42839  new_path=`$WHICH "$new_path" 2> /dev/null`
42840  # bat and cmd files are not always considered executable in cygwin causing which
42841  # to not find them
42842  if test "x$new_path" = x \
42843      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42844      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42845    new_path=`$CYGPATH -u "$path"`
42846  fi
42847  if test "x$new_path" = x; then
42848    # Oops. Which didn't find the executable.
42849    # The splitting of arguments from the executable at a space might have been incorrect,
42850    # since paths with space are more likely in Windows. Give it another try with the whole
42851    # argument.
42852    path="$complete"
42853    arguments="EOL"
42854    new_path=`$CYGPATH -u "$path"`
42855    new_path=`$WHICH "$new_path" 2> /dev/null`
42856    # bat and cmd files are not always considered executable in cygwin causing which
42857    # to not find them
42858    if test "x$new_path" = x \
42859        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42860        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42861      new_path=`$CYGPATH -u "$path"`
42862    fi
42863    if test "x$new_path" = x; then
42864      # It's still not found. Now this is an unrecoverable error.
42865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42866$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42867      has_space=`$ECHO "$complete" | $GREP " "`
42868      if test "x$has_space" != x; then
42869        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42870$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42871      fi
42872      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42873    fi
42874  fi
42875
42876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42879  # "foo.exe" is OK but "foo" is an error.
42880  #
42881  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42882  # It is also a way to make sure we got the proper file name for the real test later on.
42883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42884  if test "x$test_shortpath" = x; then
42885    # Short path failed, file does not exist as specified.
42886    # Try adding .exe or .cmd
42887    if test -f "${new_path}.exe"; then
42888      input_to_shortpath="${new_path}.exe"
42889    elif test -f "${new_path}.cmd"; then
42890      input_to_shortpath="${new_path}.cmd"
42891    else
42892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42893$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42894      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42895$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42896      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42897    fi
42898  else
42899    input_to_shortpath="$new_path"
42900  fi
42901
42902  # Call helper function which possibly converts this using DOS-style short mode.
42903  # If so, the updated path is stored in $new_path.
42904  new_path="$input_to_shortpath"
42905
42906  input_path="$input_to_shortpath"
42907  # Check if we need to convert this using DOS-style short mode. If the path
42908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42909  # take no chances and rewrite it.
42910  # Note: m4 eats our [], so we need to use [ and ] instead.
42911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42912  if test "x$has_forbidden_chars" != x; then
42913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42914    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42915    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42916    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42917      # Going to short mode and back again did indeed matter. Since short mode is
42918      # case insensitive, let's make it lowercase to improve readability.
42919      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42920      # Now convert it back to Unix-style (cygpath)
42921      input_path=`$CYGPATH -u "$shortmode_path"`
42922      new_path="$input_path"
42923    fi
42924  fi
42925
42926  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42927  if test "x$test_cygdrive_prefix" = x; then
42928    # As a simple fix, exclude /usr/bin since it's not a real path.
42929    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42930      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42931      # a path prefixed by /cygdrive for fixpath to work.
42932      new_path="$CYGWIN_ROOT_PATH$input_path"
42933    fi
42934  fi
42935
42936  # remove trailing .exe if any
42937  new_path="${new_path/%.exe/}"
42938
42939    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42940
42941  # First separate the path from the arguments. This will split at the first
42942  # space.
42943  complete="$OBJCOPY"
42944  path="${complete%% *}"
42945  tmp="$complete EOL"
42946  arguments="${tmp#* }"
42947
42948  # Input might be given as Windows format, start by converting to
42949  # unix format.
42950  new_path="$path"
42951
42952  windows_path="$new_path"
42953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42954    unix_path=`$CYGPATH -u "$windows_path"`
42955    new_path="$unix_path"
42956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42958    new_path="$unix_path"
42959  fi
42960
42961
42962  # Now try to locate executable using which
42963  new_path=`$WHICH "$new_path" 2> /dev/null`
42964
42965  if test "x$new_path" = x; then
42966    # Oops. Which didn't find the executable.
42967    # The splitting of arguments from the executable at a space might have been incorrect,
42968    # since paths with space are more likely in Windows. Give it another try with the whole
42969    # argument.
42970    path="$complete"
42971    arguments="EOL"
42972    new_path="$path"
42973
42974  windows_path="$new_path"
42975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42976    unix_path=`$CYGPATH -u "$windows_path"`
42977    new_path="$unix_path"
42978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42980    new_path="$unix_path"
42981  fi
42982
42983
42984    new_path=`$WHICH "$new_path" 2> /dev/null`
42985    # bat and cmd files are not always considered executable in MSYS causing which
42986    # to not find them
42987    if test "x$new_path" = x \
42988        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42989        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42990      new_path="$path"
42991
42992  windows_path="$new_path"
42993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42994    unix_path=`$CYGPATH -u "$windows_path"`
42995    new_path="$unix_path"
42996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42998    new_path="$unix_path"
42999  fi
43000
43001    fi
43002
43003    if test "x$new_path" = x; then
43004      # It's still not found. Now this is an unrecoverable error.
43005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43006$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43007      has_space=`$ECHO "$complete" | $GREP " "`
43008      if test "x$has_space" != x; then
43009        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43010$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43011      fi
43012      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43013    fi
43014  fi
43015
43016  # Now new_path has a complete unix path to the binary
43017  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43018    # Keep paths in /bin as-is, but remove trailing .exe if any
43019    new_path="${new_path/%.exe/}"
43020    # Do not save /bin paths to all_fixpath_prefixes!
43021  else
43022    # Not in mixed or Windows style, start by that.
43023    new_path=`cmd //c echo $new_path`
43024
43025  input_path="$new_path"
43026  # Check if we need to convert this using DOS-style short mode. If the path
43027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43028  # take no chances and rewrite it.
43029  # Note: m4 eats our [], so we need to use [ and ] instead.
43030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43031  if test "x$has_forbidden_chars" != x; then
43032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43033    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43034  fi
43035
43036    # Output is in $new_path
43037
43038  windows_path="$new_path"
43039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43040    unix_path=`$CYGPATH -u "$windows_path"`
43041    new_path="$unix_path"
43042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43044    new_path="$unix_path"
43045  fi
43046
43047    # remove trailing .exe if any
43048    new_path="${new_path/%.exe/}"
43049
43050    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43051    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43052  fi
43053
43054    else
43055      # We're on a unix platform. Hooray! :)
43056      # First separate the path from the arguments. This will split at the first
43057      # space.
43058      complete="$OBJCOPY"
43059      path="${complete%% *}"
43060      tmp="$complete EOL"
43061      arguments="${tmp#* }"
43062
43063      # Cannot rely on the command "which" here since it doesn't always work.
43064      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43065      if test -z "$is_absolute_path"; then
43066        # Path to executable is not absolute. Find it.
43067        IFS_save="$IFS"
43068        IFS=:
43069        for p in $PATH; do
43070          if test -f "$p/$path" && test -x "$p/$path"; then
43071            new_path="$p/$path"
43072            break
43073          fi
43074        done
43075        IFS="$IFS_save"
43076      else
43077        # This is an absolute path, we can use it without further modifications.
43078        new_path="$path"
43079      fi
43080
43081      if test "x$new_path" = x; then
43082        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43083$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43084        has_space=`$ECHO "$complete" | $GREP " "`
43085        if test "x$has_space" != x; then
43086          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43087$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43088        fi
43089        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43090      fi
43091    fi
43092
43093    # Now join together the path and the arguments once again
43094    if test "x$arguments" != xEOL; then
43095      new_complete="$new_path ${arguments% *}"
43096    else
43097      new_complete="$new_path"
43098    fi
43099
43100    if test "x$complete" != "x$new_complete"; then
43101      OBJCOPY="$new_complete"
43102      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43103$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43104    fi
43105  fi
43106
43107      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43108        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43109        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43110        # - version number is last blank separate word on first line
43111        # - version number formats that have been seen:
43112        #   - <major>.<minor>
43113        #   - <major>.<minor>.<micro>
43114        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43115        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43116         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43117              -e 's/.* //' \
43118              -e '/^[01]\./b bad' \
43119              -e '/^2\./{' \
43120              -e '  s/^2\.//' \
43121              -e '  /^[0-9]$/b bad' \
43122              -e '  /^[0-9]\./b bad' \
43123              -e '  /^1[0-9]$/b bad' \
43124              -e '  /^1[0-9]\./b bad' \
43125              -e '  /^20\./b bad' \
43126              -e '  /^21\.0$/b bad' \
43127              -e '  /^21\.0\./b bad' \
43128              -e '}' \
43129              -e ':good' \
43130              -e 's/.*/VALID_VERSION/p' \
43131              -e 'q' \
43132              -e ':bad' \
43133              -e 's/.*/BAD_VERSION/p' \
43134              -e 'q'`
43135        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43136          OBJCOPY=
43137          { $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
43138$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43139          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43140$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43141          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43142$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43143          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43144$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43145          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43146$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43147        fi
43148      fi
43149    fi
43150  fi
43151
43152
43153
43154  # Publish this variable in the help.
43155
43156
43157  if [ -z "${OBJDUMP+x}" ]; then
43158    # The variable is not set by user, try to locate tool using the code snippet
43159    if test -n "$ac_tool_prefix"; then
43160  for ac_prog in gobjdump objdump
43161  do
43162    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43163set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43165$as_echo_n "checking for $ac_word... " >&6; }
43166if ${ac_cv_prog_OBJDUMP+:} false; then :
43167  $as_echo_n "(cached) " >&6
43168else
43169  if test -n "$OBJDUMP"; then
43170  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43171else
43172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43173for as_dir in $PATH
43174do
43175  IFS=$as_save_IFS
43176  test -z "$as_dir" && as_dir=.
43177    for ac_exec_ext in '' $ac_executable_extensions; do
43178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43179    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43181    break 2
43182  fi
43183done
43184  done
43185IFS=$as_save_IFS
43186
43187fi
43188fi
43189OBJDUMP=$ac_cv_prog_OBJDUMP
43190if test -n "$OBJDUMP"; then
43191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43192$as_echo "$OBJDUMP" >&6; }
43193else
43194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43195$as_echo "no" >&6; }
43196fi
43197
43198
43199    test -n "$OBJDUMP" && break
43200  done
43201fi
43202if test -z "$OBJDUMP"; then
43203  ac_ct_OBJDUMP=$OBJDUMP
43204  for ac_prog in gobjdump objdump
43205do
43206  # Extract the first word of "$ac_prog", so it can be a program name with args.
43207set dummy $ac_prog; ac_word=$2
43208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43209$as_echo_n "checking for $ac_word... " >&6; }
43210if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43211  $as_echo_n "(cached) " >&6
43212else
43213  if test -n "$ac_ct_OBJDUMP"; then
43214  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43215else
43216as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43217for as_dir in $PATH
43218do
43219  IFS=$as_save_IFS
43220  test -z "$as_dir" && as_dir=.
43221    for ac_exec_ext in '' $ac_executable_extensions; do
43222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43223    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43225    break 2
43226  fi
43227done
43228  done
43229IFS=$as_save_IFS
43230
43231fi
43232fi
43233ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43234if test -n "$ac_ct_OBJDUMP"; then
43235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43236$as_echo "$ac_ct_OBJDUMP" >&6; }
43237else
43238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43239$as_echo "no" >&6; }
43240fi
43241
43242
43243  test -n "$ac_ct_OBJDUMP" && break
43244done
43245
43246  if test "x$ac_ct_OBJDUMP" = x; then
43247    OBJDUMP=""
43248  else
43249    case $cross_compiling:$ac_tool_warned in
43250yes:)
43251{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43252$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43253ac_tool_warned=yes ;;
43254esac
43255    OBJDUMP=$ac_ct_OBJDUMP
43256  fi
43257fi
43258
43259  else
43260    # The variable is set, but is it from the command line or the environment?
43261
43262    # Try to remove the string !OBJDUMP! from our list.
43263    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43264    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43265      # If it failed, the variable was not from the command line. Ignore it,
43266      # but warn the user (except for BASH, which is always set by the calling BASH).
43267      if test "xOBJDUMP" != xBASH; then
43268        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43269$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43270      fi
43271      # Try to locate tool using the code snippet
43272      if test -n "$ac_tool_prefix"; then
43273  for ac_prog in gobjdump objdump
43274  do
43275    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43276set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43278$as_echo_n "checking for $ac_word... " >&6; }
43279if ${ac_cv_prog_OBJDUMP+:} false; then :
43280  $as_echo_n "(cached) " >&6
43281else
43282  if test -n "$OBJDUMP"; then
43283  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43284else
43285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43286for as_dir in $PATH
43287do
43288  IFS=$as_save_IFS
43289  test -z "$as_dir" && as_dir=.
43290    for ac_exec_ext in '' $ac_executable_extensions; do
43291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43292    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43294    break 2
43295  fi
43296done
43297  done
43298IFS=$as_save_IFS
43299
43300fi
43301fi
43302OBJDUMP=$ac_cv_prog_OBJDUMP
43303if test -n "$OBJDUMP"; then
43304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43305$as_echo "$OBJDUMP" >&6; }
43306else
43307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43308$as_echo "no" >&6; }
43309fi
43310
43311
43312    test -n "$OBJDUMP" && break
43313  done
43314fi
43315if test -z "$OBJDUMP"; then
43316  ac_ct_OBJDUMP=$OBJDUMP
43317  for ac_prog in gobjdump objdump
43318do
43319  # Extract the first word of "$ac_prog", so it can be a program name with args.
43320set dummy $ac_prog; ac_word=$2
43321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43322$as_echo_n "checking for $ac_word... " >&6; }
43323if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43324  $as_echo_n "(cached) " >&6
43325else
43326  if test -n "$ac_ct_OBJDUMP"; then
43327  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43328else
43329as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43330for as_dir in $PATH
43331do
43332  IFS=$as_save_IFS
43333  test -z "$as_dir" && as_dir=.
43334    for ac_exec_ext in '' $ac_executable_extensions; do
43335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43336    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43338    break 2
43339  fi
43340done
43341  done
43342IFS=$as_save_IFS
43343
43344fi
43345fi
43346ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43347if test -n "$ac_ct_OBJDUMP"; then
43348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43349$as_echo "$ac_ct_OBJDUMP" >&6; }
43350else
43351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43352$as_echo "no" >&6; }
43353fi
43354
43355
43356  test -n "$ac_ct_OBJDUMP" && break
43357done
43358
43359  if test "x$ac_ct_OBJDUMP" = x; then
43360    OBJDUMP=""
43361  else
43362    case $cross_compiling:$ac_tool_warned in
43363yes:)
43364{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43365$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43366ac_tool_warned=yes ;;
43367esac
43368    OBJDUMP=$ac_ct_OBJDUMP
43369  fi
43370fi
43371
43372    else
43373      # If it succeeded, then it was overridden by the user. We will use it
43374      # for the tool.
43375
43376      # First remove it from the list of overridden variables, so we can test
43377      # for unknown variables in the end.
43378      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43379
43380      # Check if we try to supply an empty value
43381      if test "x$OBJDUMP" = x; then
43382        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43383$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43384        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43385$as_echo_n "checking for OBJDUMP... " >&6; }
43386        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43387$as_echo "disabled" >&6; }
43388      else
43389        # Check if the provided tool contains a complete path.
43390        tool_specified="$OBJDUMP"
43391        tool_basename="${tool_specified##*/}"
43392        if test "x$tool_basename" = "x$tool_specified"; then
43393          # A command without a complete path is provided, search $PATH.
43394          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43395$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43396          # Extract the first word of "$tool_basename", so it can be a program name with args.
43397set dummy $tool_basename; ac_word=$2
43398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43399$as_echo_n "checking for $ac_word... " >&6; }
43400if ${ac_cv_path_OBJDUMP+:} false; then :
43401  $as_echo_n "(cached) " >&6
43402else
43403  case $OBJDUMP in
43404  [\\/]* | ?:[\\/]*)
43405  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43406  ;;
43407  *)
43408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43409for as_dir in $PATH
43410do
43411  IFS=$as_save_IFS
43412  test -z "$as_dir" && as_dir=.
43413    for ac_exec_ext in '' $ac_executable_extensions; do
43414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43415    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43417    break 2
43418  fi
43419done
43420  done
43421IFS=$as_save_IFS
43422
43423  ;;
43424esac
43425fi
43426OBJDUMP=$ac_cv_path_OBJDUMP
43427if test -n "$OBJDUMP"; then
43428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43429$as_echo "$OBJDUMP" >&6; }
43430else
43431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43432$as_echo "no" >&6; }
43433fi
43434
43435
43436          if test "x$OBJDUMP" = x; then
43437            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43438          fi
43439        else
43440          # Otherwise we believe it is a complete path. Use it as it is.
43441          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43442$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43443          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43444$as_echo_n "checking for OBJDUMP... " >&6; }
43445          if test ! -x "$tool_specified"; then
43446            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43447$as_echo "not found" >&6; }
43448            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43449          fi
43450          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43451$as_echo "$tool_specified" >&6; }
43452        fi
43453      fi
43454    fi
43455
43456  fi
43457
43458
43459  if test "x$OBJDUMP" != x; then
43460    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43461    # bails if argument is missing.
43462
43463  # Only process if variable expands to non-empty
43464
43465  if test "x$OBJDUMP" != x; then
43466    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43467
43468  # First separate the path from the arguments. This will split at the first
43469  # space.
43470  complete="$OBJDUMP"
43471  path="${complete%% *}"
43472  tmp="$complete EOL"
43473  arguments="${tmp#* }"
43474
43475  # Input might be given as Windows format, start by converting to
43476  # unix format.
43477  new_path=`$CYGPATH -u "$path"`
43478
43479  # Now try to locate executable using which
43480  new_path=`$WHICH "$new_path" 2> /dev/null`
43481  # bat and cmd files are not always considered executable in cygwin causing which
43482  # to not find them
43483  if test "x$new_path" = x \
43484      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43485      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43486    new_path=`$CYGPATH -u "$path"`
43487  fi
43488  if test "x$new_path" = x; then
43489    # Oops. Which didn't find the executable.
43490    # The splitting of arguments from the executable at a space might have been incorrect,
43491    # since paths with space are more likely in Windows. Give it another try with the whole
43492    # argument.
43493    path="$complete"
43494    arguments="EOL"
43495    new_path=`$CYGPATH -u "$path"`
43496    new_path=`$WHICH "$new_path" 2> /dev/null`
43497    # bat and cmd files are not always considered executable in cygwin causing which
43498    # to not find them
43499    if test "x$new_path" = x \
43500        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43501        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43502      new_path=`$CYGPATH -u "$path"`
43503    fi
43504    if test "x$new_path" = x; then
43505      # It's still not found. Now this is an unrecoverable error.
43506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43507$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43508      has_space=`$ECHO "$complete" | $GREP " "`
43509      if test "x$has_space" != x; then
43510        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43511$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43512      fi
43513      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43514    fi
43515  fi
43516
43517  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43518  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43519  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43520  # "foo.exe" is OK but "foo" is an error.
43521  #
43522  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43523  # It is also a way to make sure we got the proper file name for the real test later on.
43524  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43525  if test "x$test_shortpath" = x; then
43526    # Short path failed, file does not exist as specified.
43527    # Try adding .exe or .cmd
43528    if test -f "${new_path}.exe"; then
43529      input_to_shortpath="${new_path}.exe"
43530    elif test -f "${new_path}.cmd"; then
43531      input_to_shortpath="${new_path}.cmd"
43532    else
43533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43534$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43535      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43536$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43537      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43538    fi
43539  else
43540    input_to_shortpath="$new_path"
43541  fi
43542
43543  # Call helper function which possibly converts this using DOS-style short mode.
43544  # If so, the updated path is stored in $new_path.
43545  new_path="$input_to_shortpath"
43546
43547  input_path="$input_to_shortpath"
43548  # Check if we need to convert this using DOS-style short mode. If the path
43549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43550  # take no chances and rewrite it.
43551  # Note: m4 eats our [], so we need to use [ and ] instead.
43552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43553  if test "x$has_forbidden_chars" != x; then
43554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43555    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43556    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43557    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43558      # Going to short mode and back again did indeed matter. Since short mode is
43559      # case insensitive, let's make it lowercase to improve readability.
43560      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43561      # Now convert it back to Unix-style (cygpath)
43562      input_path=`$CYGPATH -u "$shortmode_path"`
43563      new_path="$input_path"
43564    fi
43565  fi
43566
43567  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43568  if test "x$test_cygdrive_prefix" = x; then
43569    # As a simple fix, exclude /usr/bin since it's not a real path.
43570    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43571      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43572      # a path prefixed by /cygdrive for fixpath to work.
43573      new_path="$CYGWIN_ROOT_PATH$input_path"
43574    fi
43575  fi
43576
43577  # remove trailing .exe if any
43578  new_path="${new_path/%.exe/}"
43579
43580    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43581
43582  # First separate the path from the arguments. This will split at the first
43583  # space.
43584  complete="$OBJDUMP"
43585  path="${complete%% *}"
43586  tmp="$complete EOL"
43587  arguments="${tmp#* }"
43588
43589  # Input might be given as Windows format, start by converting to
43590  # unix format.
43591  new_path="$path"
43592
43593  windows_path="$new_path"
43594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43595    unix_path=`$CYGPATH -u "$windows_path"`
43596    new_path="$unix_path"
43597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43599    new_path="$unix_path"
43600  fi
43601
43602
43603  # Now try to locate executable using which
43604  new_path=`$WHICH "$new_path" 2> /dev/null`
43605
43606  if test "x$new_path" = x; then
43607    # Oops. Which didn't find the executable.
43608    # The splitting of arguments from the executable at a space might have been incorrect,
43609    # since paths with space are more likely in Windows. Give it another try with the whole
43610    # argument.
43611    path="$complete"
43612    arguments="EOL"
43613    new_path="$path"
43614
43615  windows_path="$new_path"
43616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43617    unix_path=`$CYGPATH -u "$windows_path"`
43618    new_path="$unix_path"
43619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43621    new_path="$unix_path"
43622  fi
43623
43624
43625    new_path=`$WHICH "$new_path" 2> /dev/null`
43626    # bat and cmd files are not always considered executable in MSYS causing which
43627    # to not find them
43628    if test "x$new_path" = x \
43629        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43630        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43631      new_path="$path"
43632
43633  windows_path="$new_path"
43634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43635    unix_path=`$CYGPATH -u "$windows_path"`
43636    new_path="$unix_path"
43637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43639    new_path="$unix_path"
43640  fi
43641
43642    fi
43643
43644    if test "x$new_path" = x; then
43645      # It's still not found. Now this is an unrecoverable error.
43646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43647$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43648      has_space=`$ECHO "$complete" | $GREP " "`
43649      if test "x$has_space" != x; then
43650        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43651$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43652      fi
43653      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43654    fi
43655  fi
43656
43657  # Now new_path has a complete unix path to the binary
43658  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43659    # Keep paths in /bin as-is, but remove trailing .exe if any
43660    new_path="${new_path/%.exe/}"
43661    # Do not save /bin paths to all_fixpath_prefixes!
43662  else
43663    # Not in mixed or Windows style, start by that.
43664    new_path=`cmd //c echo $new_path`
43665
43666  input_path="$new_path"
43667  # Check if we need to convert this using DOS-style short mode. If the path
43668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43669  # take no chances and rewrite it.
43670  # Note: m4 eats our [], so we need to use [ and ] instead.
43671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43672  if test "x$has_forbidden_chars" != x; then
43673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43674    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43675  fi
43676
43677    # Output is in $new_path
43678
43679  windows_path="$new_path"
43680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43681    unix_path=`$CYGPATH -u "$windows_path"`
43682    new_path="$unix_path"
43683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43685    new_path="$unix_path"
43686  fi
43687
43688    # remove trailing .exe if any
43689    new_path="${new_path/%.exe/}"
43690
43691    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43692    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43693  fi
43694
43695    else
43696      # We're on a unix platform. Hooray! :)
43697      # First separate the path from the arguments. This will split at the first
43698      # space.
43699      complete="$OBJDUMP"
43700      path="${complete%% *}"
43701      tmp="$complete EOL"
43702      arguments="${tmp#* }"
43703
43704      # Cannot rely on the command "which" here since it doesn't always work.
43705      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43706      if test -z "$is_absolute_path"; then
43707        # Path to executable is not absolute. Find it.
43708        IFS_save="$IFS"
43709        IFS=:
43710        for p in $PATH; do
43711          if test -f "$p/$path" && test -x "$p/$path"; then
43712            new_path="$p/$path"
43713            break
43714          fi
43715        done
43716        IFS="$IFS_save"
43717      else
43718        # This is an absolute path, we can use it without further modifications.
43719        new_path="$path"
43720      fi
43721
43722      if test "x$new_path" = x; then
43723        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43724$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43725        has_space=`$ECHO "$complete" | $GREP " "`
43726        if test "x$has_space" != x; then
43727          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43728$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43729        fi
43730        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43731      fi
43732    fi
43733
43734    # Now join together the path and the arguments once again
43735    if test "x$arguments" != xEOL; then
43736      new_complete="$new_path ${arguments% *}"
43737    else
43738      new_complete="$new_path"
43739    fi
43740
43741    if test "x$complete" != "x$new_complete"; then
43742      OBJDUMP="$new_complete"
43743      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43744$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43745    fi
43746  fi
43747
43748  fi
43749
43750
43751  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43752  # to remain in place. Otherwise the compiler will not work in some siutations
43753  # in later configure checks.
43754  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43755    PATH="$OLD_PATH"
43756  fi
43757
43758  # Restore the flags to the user specified values.
43759  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43760  CFLAGS="$ORG_CFLAGS"
43761  CXXFLAGS="$ORG_CXXFLAGS"
43762
43763
43764# Finally do some processing after the detection phase
43765
43766  if test "x$COMPILE_TYPE" = "xcross"; then
43767    # Now we need to find a C/C++ compiler that can build executables for the
43768    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43769    # used once. Also, we need to do this without adding a tools dir to the
43770    # path, otherwise we might pick up cross-compilers which don't use standard
43771    # naming.
43772
43773    OLDPATH="$PATH"
43774
43775
43776# Check whether --with-build-devkit was given.
43777if test "${with_build_devkit+set}" = set; then :
43778  withval=$with_build_devkit;
43779fi
43780
43781    if test "x$with_build_devkit" = "xyes"; then
43782      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43783    elif test -n "$with_build_devkit"; then
43784      if test ! -d "$with_build_devkit"; then
43785        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43786      else
43787
43788  # Only process if variable expands to non-empty
43789
43790  if test "x$with_build_devkit" != x; then
43791    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43792
43793  # Input might be given as Windows format, start by converting to
43794  # unix format.
43795  path="$with_build_devkit"
43796  new_path=`$CYGPATH -u "$path"`
43797
43798  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43799  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43800  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43801  # "foo.exe" is OK but "foo" is an error.
43802  #
43803  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43804  # It is also a way to make sure we got the proper file name for the real test later on.
43805  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43806  if test "x$test_shortpath" = x; then
43807    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43808$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43809    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43810  fi
43811
43812  # Call helper function which possibly converts this using DOS-style short mode.
43813  # If so, the updated path is stored in $new_path.
43814
43815  input_path="$new_path"
43816  # Check if we need to convert this using DOS-style short mode. If the path
43817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43818  # take no chances and rewrite it.
43819  # Note: m4 eats our [], so we need to use [ and ] instead.
43820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43821  if test "x$has_forbidden_chars" != x; then
43822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43826      # Going to short mode and back again did indeed matter. Since short mode is
43827      # case insensitive, let's make it lowercase to improve readability.
43828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43829      # Now convert it back to Unix-style (cygpath)
43830      input_path=`$CYGPATH -u "$shortmode_path"`
43831      new_path="$input_path"
43832    fi
43833  fi
43834
43835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43836  if test "x$test_cygdrive_prefix" = x; then
43837    # As a simple fix, exclude /usr/bin since it's not a real path.
43838    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43840      # a path prefixed by /cygdrive for fixpath to work.
43841      new_path="$CYGWIN_ROOT_PATH$input_path"
43842    fi
43843  fi
43844
43845
43846  if test "x$path" != "x$new_path"; then
43847    with_build_devkit="$new_path"
43848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43849$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43850  fi
43851
43852    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43853
43854  path="$with_build_devkit"
43855  has_colon=`$ECHO $path | $GREP ^.:`
43856  new_path="$path"
43857  if test "x$has_colon" = x; then
43858    # Not in mixed or Windows style, start by that.
43859    new_path=`cmd //c echo $path`
43860  fi
43861
43862
43863  input_path="$new_path"
43864  # Check if we need to convert this using DOS-style short mode. If the path
43865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43866  # take no chances and rewrite it.
43867  # Note: m4 eats our [], so we need to use [ and ] instead.
43868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43869  if test "x$has_forbidden_chars" != x; then
43870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43872  fi
43873
43874
43875  windows_path="$new_path"
43876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43877    unix_path=`$CYGPATH -u "$windows_path"`
43878    new_path="$unix_path"
43879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43881    new_path="$unix_path"
43882  fi
43883
43884  if test "x$path" != "x$new_path"; then
43885    with_build_devkit="$new_path"
43886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43887$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43888  fi
43889
43890  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43891  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43892
43893    else
43894      # We're on a unix platform. Hooray! :)
43895      path="$with_build_devkit"
43896      has_space=`$ECHO "$path" | $GREP " "`
43897      if test "x$has_space" != x; then
43898        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43899$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43900        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43901      fi
43902
43903      # Use eval to expand a potential ~
43904      eval path="$path"
43905      if test ! -f "$path" && test ! -d "$path"; then
43906        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43907      fi
43908
43909      if test -d "$path"; then
43910        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43911      else
43912        dir="`$DIRNAME "$path"`"
43913        base="`$BASENAME "$path"`"
43914        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43915      fi
43916    fi
43917  fi
43918
43919        BUILD_DEVKIT_ROOT="$with_build_devkit"
43920        # Check for a meta data info file in the root of the devkit
43921        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43922          # Process devkit.info so that existing devkit variables are not
43923          # modified by this
43924          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43925              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43926              -e "s/\$host/\$build/g" \
43927              $BUILD_DEVKIT_ROOT/devkit.info \
43928              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43929          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43930          # This potentially sets the following:
43931          # A descriptive name of the devkit
43932
43933  if test "x$BUILD_DEVKIT_NAME" = x; then
43934    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43935  fi
43936
43937          # Corresponds to --with-extra-path
43938
43939  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43940    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43941  fi
43942
43943          # Corresponds to --with-toolchain-path
43944
43945  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43946    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43947  fi
43948
43949          # Corresponds to --with-sysroot
43950
43951  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43952    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43953  fi
43954
43955          # Skip the Window specific parts
43956        fi
43957
43958        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43959$as_echo_n "checking for build platform devkit... " >&6; }
43960        if test "x$BUILD_DEVKIT_NAME" != x; then
43961          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43962$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43963        else
43964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43965$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43966        fi
43967
43968        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43969
43970  if test "x$BUILD_SYSROOT" != "x"; then
43971    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43972      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43973        # Solaris Studio does not have a concept of sysroot. Instead we must
43974        # make sure the default include and lib dirs are appended to each
43975        # compile and link command line. Must also add -I-xbuiltin to enable
43976        # inlining of system functions and intrinsics.
43977        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43978        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43979            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
43980      fi
43981    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43982      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43983      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43984    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43985      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43986      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43987    fi
43988    # Propagate the sysroot args to hotspot
43989    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43990    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43991    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43992    # The global CFLAGS and LDFLAGS variables need these for configure to function
43993    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43994    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43995    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43996    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43997  fi
43998
43999  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44000    # We also need -iframework<path>/System/Library/Frameworks
44001    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44002    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44003    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44004    # set this here so it doesn't have to be peppered throughout the forest
44005    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44006    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44007  fi
44008
44009
44010
44011
44012
44013         # Fallback default of just /bin if DEVKIT_PATH is not defined
44014        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44015          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44016        fi
44017        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44018      fi
44019    fi
44020
44021    # FIXME: we should list the discovered compilers as an exclude pattern!
44022    # If we do that, we can do this detection before POST_DETECTION, and still
44023    # find the build compilers in the tools dir, if needed.
44024
44025
44026
44027  # Publish this variable in the help.
44028
44029
44030  if [ -z "${BUILD_CC+x}" ]; then
44031    # The variable is not set by user, try to locate tool using the code snippet
44032    for ac_prog in cl cc gcc
44033do
44034  # Extract the first word of "$ac_prog", so it can be a program name with args.
44035set dummy $ac_prog; ac_word=$2
44036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44037$as_echo_n "checking for $ac_word... " >&6; }
44038if ${ac_cv_path_BUILD_CC+:} false; then :
44039  $as_echo_n "(cached) " >&6
44040else
44041  case $BUILD_CC in
44042  [\\/]* | ?:[\\/]*)
44043  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44044  ;;
44045  *)
44046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44047for as_dir in $PATH
44048do
44049  IFS=$as_save_IFS
44050  test -z "$as_dir" && as_dir=.
44051    for ac_exec_ext in '' $ac_executable_extensions; do
44052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44053    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44055    break 2
44056  fi
44057done
44058  done
44059IFS=$as_save_IFS
44060
44061  ;;
44062esac
44063fi
44064BUILD_CC=$ac_cv_path_BUILD_CC
44065if test -n "$BUILD_CC"; then
44066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44067$as_echo "$BUILD_CC" >&6; }
44068else
44069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44070$as_echo "no" >&6; }
44071fi
44072
44073
44074  test -n "$BUILD_CC" && break
44075done
44076
44077  else
44078    # The variable is set, but is it from the command line or the environment?
44079
44080    # Try to remove the string !BUILD_CC! from our list.
44081    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44082    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44083      # If it failed, the variable was not from the command line. Ignore it,
44084      # but warn the user (except for BASH, which is always set by the calling BASH).
44085      if test "xBUILD_CC" != xBASH; then
44086        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44087$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44088      fi
44089      # Try to locate tool using the code snippet
44090      for ac_prog in cl cc gcc
44091do
44092  # Extract the first word of "$ac_prog", so it can be a program name with args.
44093set dummy $ac_prog; ac_word=$2
44094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44095$as_echo_n "checking for $ac_word... " >&6; }
44096if ${ac_cv_path_BUILD_CC+:} false; then :
44097  $as_echo_n "(cached) " >&6
44098else
44099  case $BUILD_CC in
44100  [\\/]* | ?:[\\/]*)
44101  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44102  ;;
44103  *)
44104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44105for as_dir in $PATH
44106do
44107  IFS=$as_save_IFS
44108  test -z "$as_dir" && as_dir=.
44109    for ac_exec_ext in '' $ac_executable_extensions; do
44110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44111    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44113    break 2
44114  fi
44115done
44116  done
44117IFS=$as_save_IFS
44118
44119  ;;
44120esac
44121fi
44122BUILD_CC=$ac_cv_path_BUILD_CC
44123if test -n "$BUILD_CC"; then
44124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44125$as_echo "$BUILD_CC" >&6; }
44126else
44127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44128$as_echo "no" >&6; }
44129fi
44130
44131
44132  test -n "$BUILD_CC" && break
44133done
44134
44135    else
44136      # If it succeeded, then it was overridden by the user. We will use it
44137      # for the tool.
44138
44139      # First remove it from the list of overridden variables, so we can test
44140      # for unknown variables in the end.
44141      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44142
44143      # Check if we try to supply an empty value
44144      if test "x$BUILD_CC" = x; then
44145        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44146$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44147        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44148$as_echo_n "checking for BUILD_CC... " >&6; }
44149        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44150$as_echo "disabled" >&6; }
44151      else
44152        # Check if the provided tool contains a complete path.
44153        tool_specified="$BUILD_CC"
44154        tool_basename="${tool_specified##*/}"
44155        if test "x$tool_basename" = "x$tool_specified"; then
44156          # A command without a complete path is provided, search $PATH.
44157          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44158$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44159          # Extract the first word of "$tool_basename", so it can be a program name with args.
44160set dummy $tool_basename; ac_word=$2
44161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44162$as_echo_n "checking for $ac_word... " >&6; }
44163if ${ac_cv_path_BUILD_CC+:} false; then :
44164  $as_echo_n "(cached) " >&6
44165else
44166  case $BUILD_CC in
44167  [\\/]* | ?:[\\/]*)
44168  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44169  ;;
44170  *)
44171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44172for as_dir in $PATH
44173do
44174  IFS=$as_save_IFS
44175  test -z "$as_dir" && as_dir=.
44176    for ac_exec_ext in '' $ac_executable_extensions; do
44177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44178    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44180    break 2
44181  fi
44182done
44183  done
44184IFS=$as_save_IFS
44185
44186  ;;
44187esac
44188fi
44189BUILD_CC=$ac_cv_path_BUILD_CC
44190if test -n "$BUILD_CC"; then
44191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44192$as_echo "$BUILD_CC" >&6; }
44193else
44194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44195$as_echo "no" >&6; }
44196fi
44197
44198
44199          if test "x$BUILD_CC" = x; then
44200            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44201          fi
44202        else
44203          # Otherwise we believe it is a complete path. Use it as it is.
44204          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44205$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44206          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44207$as_echo_n "checking for BUILD_CC... " >&6; }
44208          if test ! -x "$tool_specified"; then
44209            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44210$as_echo "not found" >&6; }
44211            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44212          fi
44213          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44214$as_echo "$tool_specified" >&6; }
44215        fi
44216      fi
44217    fi
44218
44219  fi
44220
44221
44222
44223  if test "x$BUILD_CC" = x; then
44224    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44225  fi
44226
44227
44228
44229  # Only process if variable expands to non-empty
44230
44231  if test "x$BUILD_CC" != x; then
44232    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44233
44234  # First separate the path from the arguments. This will split at the first
44235  # space.
44236  complete="$BUILD_CC"
44237  path="${complete%% *}"
44238  tmp="$complete EOL"
44239  arguments="${tmp#* }"
44240
44241  # Input might be given as Windows format, start by converting to
44242  # unix format.
44243  new_path=`$CYGPATH -u "$path"`
44244
44245  # Now try to locate executable using which
44246  new_path=`$WHICH "$new_path" 2> /dev/null`
44247  # bat and cmd files are not always considered executable in cygwin causing which
44248  # to not find them
44249  if test "x$new_path" = x \
44250      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44251      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44252    new_path=`$CYGPATH -u "$path"`
44253  fi
44254  if test "x$new_path" = x; then
44255    # Oops. Which didn't find the executable.
44256    # The splitting of arguments from the executable at a space might have been incorrect,
44257    # since paths with space are more likely in Windows. Give it another try with the whole
44258    # argument.
44259    path="$complete"
44260    arguments="EOL"
44261    new_path=`$CYGPATH -u "$path"`
44262    new_path=`$WHICH "$new_path" 2> /dev/null`
44263    # bat and cmd files are not always considered executable in cygwin causing which
44264    # to not find them
44265    if test "x$new_path" = x \
44266        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44267        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44268      new_path=`$CYGPATH -u "$path"`
44269    fi
44270    if test "x$new_path" = x; then
44271      # It's still not found. Now this is an unrecoverable error.
44272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44273$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44274      has_space=`$ECHO "$complete" | $GREP " "`
44275      if test "x$has_space" != x; then
44276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44278      fi
44279      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44280    fi
44281  fi
44282
44283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44286  # "foo.exe" is OK but "foo" is an error.
44287  #
44288  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44289  # It is also a way to make sure we got the proper file name for the real test later on.
44290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44291  if test "x$test_shortpath" = x; then
44292    # Short path failed, file does not exist as specified.
44293    # Try adding .exe or .cmd
44294    if test -f "${new_path}.exe"; then
44295      input_to_shortpath="${new_path}.exe"
44296    elif test -f "${new_path}.cmd"; then
44297      input_to_shortpath="${new_path}.cmd"
44298    else
44299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44300$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44301      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44302$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44303      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44304    fi
44305  else
44306    input_to_shortpath="$new_path"
44307  fi
44308
44309  # Call helper function which possibly converts this using DOS-style short mode.
44310  # If so, the updated path is stored in $new_path.
44311  new_path="$input_to_shortpath"
44312
44313  input_path="$input_to_shortpath"
44314  # Check if we need to convert this using DOS-style short mode. If the path
44315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44316  # take no chances and rewrite it.
44317  # Note: m4 eats our [], so we need to use [ and ] instead.
44318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44319  if test "x$has_forbidden_chars" != x; then
44320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44324      # Going to short mode and back again did indeed matter. Since short mode is
44325      # case insensitive, let's make it lowercase to improve readability.
44326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44327      # Now convert it back to Unix-style (cygpath)
44328      input_path=`$CYGPATH -u "$shortmode_path"`
44329      new_path="$input_path"
44330    fi
44331  fi
44332
44333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44334  if test "x$test_cygdrive_prefix" = x; then
44335    # As a simple fix, exclude /usr/bin since it's not a real path.
44336    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44338      # a path prefixed by /cygdrive for fixpath to work.
44339      new_path="$CYGWIN_ROOT_PATH$input_path"
44340    fi
44341  fi
44342
44343  # remove trailing .exe if any
44344  new_path="${new_path/%.exe/}"
44345
44346    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44347
44348  # First separate the path from the arguments. This will split at the first
44349  # space.
44350  complete="$BUILD_CC"
44351  path="${complete%% *}"
44352  tmp="$complete EOL"
44353  arguments="${tmp#* }"
44354
44355  # Input might be given as Windows format, start by converting to
44356  # unix format.
44357  new_path="$path"
44358
44359  windows_path="$new_path"
44360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44361    unix_path=`$CYGPATH -u "$windows_path"`
44362    new_path="$unix_path"
44363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44365    new_path="$unix_path"
44366  fi
44367
44368
44369  # Now try to locate executable using which
44370  new_path=`$WHICH "$new_path" 2> /dev/null`
44371
44372  if test "x$new_path" = x; then
44373    # Oops. Which didn't find the executable.
44374    # The splitting of arguments from the executable at a space might have been incorrect,
44375    # since paths with space are more likely in Windows. Give it another try with the whole
44376    # argument.
44377    path="$complete"
44378    arguments="EOL"
44379    new_path="$path"
44380
44381  windows_path="$new_path"
44382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44383    unix_path=`$CYGPATH -u "$windows_path"`
44384    new_path="$unix_path"
44385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44387    new_path="$unix_path"
44388  fi
44389
44390
44391    new_path=`$WHICH "$new_path" 2> /dev/null`
44392    # bat and cmd files are not always considered executable in MSYS causing which
44393    # to not find them
44394    if test "x$new_path" = x \
44395        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44396        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44397      new_path="$path"
44398
44399  windows_path="$new_path"
44400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44401    unix_path=`$CYGPATH -u "$windows_path"`
44402    new_path="$unix_path"
44403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44405    new_path="$unix_path"
44406  fi
44407
44408    fi
44409
44410    if test "x$new_path" = x; then
44411      # It's still not found. Now this is an unrecoverable error.
44412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44413$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44414      has_space=`$ECHO "$complete" | $GREP " "`
44415      if test "x$has_space" != x; then
44416        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44417$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44418      fi
44419      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44420    fi
44421  fi
44422
44423  # Now new_path has a complete unix path to the binary
44424  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44425    # Keep paths in /bin as-is, but remove trailing .exe if any
44426    new_path="${new_path/%.exe/}"
44427    # Do not save /bin paths to all_fixpath_prefixes!
44428  else
44429    # Not in mixed or Windows style, start by that.
44430    new_path=`cmd //c echo $new_path`
44431
44432  input_path="$new_path"
44433  # Check if we need to convert this using DOS-style short mode. If the path
44434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44435  # take no chances and rewrite it.
44436  # Note: m4 eats our [], so we need to use [ and ] instead.
44437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44438  if test "x$has_forbidden_chars" != x; then
44439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44441  fi
44442
44443    # Output is in $new_path
44444
44445  windows_path="$new_path"
44446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44447    unix_path=`$CYGPATH -u "$windows_path"`
44448    new_path="$unix_path"
44449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44451    new_path="$unix_path"
44452  fi
44453
44454    # remove trailing .exe if any
44455    new_path="${new_path/%.exe/}"
44456
44457    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44458    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44459  fi
44460
44461    else
44462      # We're on a unix platform. Hooray! :)
44463      # First separate the path from the arguments. This will split at the first
44464      # space.
44465      complete="$BUILD_CC"
44466      path="${complete%% *}"
44467      tmp="$complete EOL"
44468      arguments="${tmp#* }"
44469
44470      # Cannot rely on the command "which" here since it doesn't always work.
44471      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44472      if test -z "$is_absolute_path"; then
44473        # Path to executable is not absolute. Find it.
44474        IFS_save="$IFS"
44475        IFS=:
44476        for p in $PATH; do
44477          if test -f "$p/$path" && test -x "$p/$path"; then
44478            new_path="$p/$path"
44479            break
44480          fi
44481        done
44482        IFS="$IFS_save"
44483      else
44484        # This is an absolute path, we can use it without further modifications.
44485        new_path="$path"
44486      fi
44487
44488      if test "x$new_path" = x; then
44489        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44490$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44491        has_space=`$ECHO "$complete" | $GREP " "`
44492        if test "x$has_space" != x; then
44493          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44494$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44495        fi
44496        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44497      fi
44498    fi
44499
44500    # Now join together the path and the arguments once again
44501    if test "x$arguments" != xEOL; then
44502      new_complete="$new_path ${arguments% *}"
44503    else
44504      new_complete="$new_path"
44505    fi
44506
44507    if test "x$complete" != "x$new_complete"; then
44508      BUILD_CC="$new_complete"
44509      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44510$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44511    fi
44512  fi
44513
44514
44515
44516
44517  # Publish this variable in the help.
44518
44519
44520  if [ -z "${BUILD_CXX+x}" ]; then
44521    # The variable is not set by user, try to locate tool using the code snippet
44522    for ac_prog in cl CC g++
44523do
44524  # Extract the first word of "$ac_prog", so it can be a program name with args.
44525set dummy $ac_prog; ac_word=$2
44526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44527$as_echo_n "checking for $ac_word... " >&6; }
44528if ${ac_cv_path_BUILD_CXX+:} false; then :
44529  $as_echo_n "(cached) " >&6
44530else
44531  case $BUILD_CXX in
44532  [\\/]* | ?:[\\/]*)
44533  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44534  ;;
44535  *)
44536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44537for as_dir in $PATH
44538do
44539  IFS=$as_save_IFS
44540  test -z "$as_dir" && as_dir=.
44541    for ac_exec_ext in '' $ac_executable_extensions; do
44542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44543    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44545    break 2
44546  fi
44547done
44548  done
44549IFS=$as_save_IFS
44550
44551  ;;
44552esac
44553fi
44554BUILD_CXX=$ac_cv_path_BUILD_CXX
44555if test -n "$BUILD_CXX"; then
44556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44557$as_echo "$BUILD_CXX" >&6; }
44558else
44559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44560$as_echo "no" >&6; }
44561fi
44562
44563
44564  test -n "$BUILD_CXX" && break
44565done
44566
44567  else
44568    # The variable is set, but is it from the command line or the environment?
44569
44570    # Try to remove the string !BUILD_CXX! from our list.
44571    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44572    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44573      # If it failed, the variable was not from the command line. Ignore it,
44574      # but warn the user (except for BASH, which is always set by the calling BASH).
44575      if test "xBUILD_CXX" != xBASH; then
44576        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44577$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44578      fi
44579      # Try to locate tool using the code snippet
44580      for ac_prog in cl CC g++
44581do
44582  # Extract the first word of "$ac_prog", so it can be a program name with args.
44583set dummy $ac_prog; ac_word=$2
44584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44585$as_echo_n "checking for $ac_word... " >&6; }
44586if ${ac_cv_path_BUILD_CXX+:} false; then :
44587  $as_echo_n "(cached) " >&6
44588else
44589  case $BUILD_CXX in
44590  [\\/]* | ?:[\\/]*)
44591  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44592  ;;
44593  *)
44594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44595for as_dir in $PATH
44596do
44597  IFS=$as_save_IFS
44598  test -z "$as_dir" && as_dir=.
44599    for ac_exec_ext in '' $ac_executable_extensions; do
44600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44601    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44603    break 2
44604  fi
44605done
44606  done
44607IFS=$as_save_IFS
44608
44609  ;;
44610esac
44611fi
44612BUILD_CXX=$ac_cv_path_BUILD_CXX
44613if test -n "$BUILD_CXX"; then
44614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44615$as_echo "$BUILD_CXX" >&6; }
44616else
44617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44618$as_echo "no" >&6; }
44619fi
44620
44621
44622  test -n "$BUILD_CXX" && break
44623done
44624
44625    else
44626      # If it succeeded, then it was overridden by the user. We will use it
44627      # for the tool.
44628
44629      # First remove it from the list of overridden variables, so we can test
44630      # for unknown variables in the end.
44631      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44632
44633      # Check if we try to supply an empty value
44634      if test "x$BUILD_CXX" = x; then
44635        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44636$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44637        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44638$as_echo_n "checking for BUILD_CXX... " >&6; }
44639        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44640$as_echo "disabled" >&6; }
44641      else
44642        # Check if the provided tool contains a complete path.
44643        tool_specified="$BUILD_CXX"
44644        tool_basename="${tool_specified##*/}"
44645        if test "x$tool_basename" = "x$tool_specified"; then
44646          # A command without a complete path is provided, search $PATH.
44647          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44648$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44649          # Extract the first word of "$tool_basename", so it can be a program name with args.
44650set dummy $tool_basename; ac_word=$2
44651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44652$as_echo_n "checking for $ac_word... " >&6; }
44653if ${ac_cv_path_BUILD_CXX+:} false; then :
44654  $as_echo_n "(cached) " >&6
44655else
44656  case $BUILD_CXX in
44657  [\\/]* | ?:[\\/]*)
44658  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44659  ;;
44660  *)
44661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44662for as_dir in $PATH
44663do
44664  IFS=$as_save_IFS
44665  test -z "$as_dir" && as_dir=.
44666    for ac_exec_ext in '' $ac_executable_extensions; do
44667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44668    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44670    break 2
44671  fi
44672done
44673  done
44674IFS=$as_save_IFS
44675
44676  ;;
44677esac
44678fi
44679BUILD_CXX=$ac_cv_path_BUILD_CXX
44680if test -n "$BUILD_CXX"; then
44681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44682$as_echo "$BUILD_CXX" >&6; }
44683else
44684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44685$as_echo "no" >&6; }
44686fi
44687
44688
44689          if test "x$BUILD_CXX" = x; then
44690            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44691          fi
44692        else
44693          # Otherwise we believe it is a complete path. Use it as it is.
44694          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44695$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44696          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44697$as_echo_n "checking for BUILD_CXX... " >&6; }
44698          if test ! -x "$tool_specified"; then
44699            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44700$as_echo "not found" >&6; }
44701            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44702          fi
44703          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44704$as_echo "$tool_specified" >&6; }
44705        fi
44706      fi
44707    fi
44708
44709  fi
44710
44711
44712
44713  if test "x$BUILD_CXX" = x; then
44714    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44715  fi
44716
44717
44718
44719  # Only process if variable expands to non-empty
44720
44721  if test "x$BUILD_CXX" != x; then
44722    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44723
44724  # First separate the path from the arguments. This will split at the first
44725  # space.
44726  complete="$BUILD_CXX"
44727  path="${complete%% *}"
44728  tmp="$complete EOL"
44729  arguments="${tmp#* }"
44730
44731  # Input might be given as Windows format, start by converting to
44732  # unix format.
44733  new_path=`$CYGPATH -u "$path"`
44734
44735  # Now try to locate executable using which
44736  new_path=`$WHICH "$new_path" 2> /dev/null`
44737  # bat and cmd files are not always considered executable in cygwin causing which
44738  # to not find them
44739  if test "x$new_path" = x \
44740      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44741      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44742    new_path=`$CYGPATH -u "$path"`
44743  fi
44744  if test "x$new_path" = x; then
44745    # Oops. Which didn't find the executable.
44746    # The splitting of arguments from the executable at a space might have been incorrect,
44747    # since paths with space are more likely in Windows. Give it another try with the whole
44748    # argument.
44749    path="$complete"
44750    arguments="EOL"
44751    new_path=`$CYGPATH -u "$path"`
44752    new_path=`$WHICH "$new_path" 2> /dev/null`
44753    # bat and cmd files are not always considered executable in cygwin causing which
44754    # to not find them
44755    if test "x$new_path" = x \
44756        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44757        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44758      new_path=`$CYGPATH -u "$path"`
44759    fi
44760    if test "x$new_path" = x; then
44761      # It's still not found. Now this is an unrecoverable error.
44762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44763$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44764      has_space=`$ECHO "$complete" | $GREP " "`
44765      if test "x$has_space" != x; then
44766        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44767$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44768      fi
44769      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44770    fi
44771  fi
44772
44773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44776  # "foo.exe" is OK but "foo" is an error.
44777  #
44778  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44779  # It is also a way to make sure we got the proper file name for the real test later on.
44780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44781  if test "x$test_shortpath" = x; then
44782    # Short path failed, file does not exist as specified.
44783    # Try adding .exe or .cmd
44784    if test -f "${new_path}.exe"; then
44785      input_to_shortpath="${new_path}.exe"
44786    elif test -f "${new_path}.cmd"; then
44787      input_to_shortpath="${new_path}.cmd"
44788    else
44789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44790$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44791      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44792$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44793      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44794    fi
44795  else
44796    input_to_shortpath="$new_path"
44797  fi
44798
44799  # Call helper function which possibly converts this using DOS-style short mode.
44800  # If so, the updated path is stored in $new_path.
44801  new_path="$input_to_shortpath"
44802
44803  input_path="$input_to_shortpath"
44804  # Check if we need to convert this using DOS-style short mode. If the path
44805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44806  # take no chances and rewrite it.
44807  # Note: m4 eats our [], so we need to use [ and ] instead.
44808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44809  if test "x$has_forbidden_chars" != x; then
44810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44814      # Going to short mode and back again did indeed matter. Since short mode is
44815      # case insensitive, let's make it lowercase to improve readability.
44816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44817      # Now convert it back to Unix-style (cygpath)
44818      input_path=`$CYGPATH -u "$shortmode_path"`
44819      new_path="$input_path"
44820    fi
44821  fi
44822
44823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44824  if test "x$test_cygdrive_prefix" = x; then
44825    # As a simple fix, exclude /usr/bin since it's not a real path.
44826    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44828      # a path prefixed by /cygdrive for fixpath to work.
44829      new_path="$CYGWIN_ROOT_PATH$input_path"
44830    fi
44831  fi
44832
44833  # remove trailing .exe if any
44834  new_path="${new_path/%.exe/}"
44835
44836    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44837
44838  # First separate the path from the arguments. This will split at the first
44839  # space.
44840  complete="$BUILD_CXX"
44841  path="${complete%% *}"
44842  tmp="$complete EOL"
44843  arguments="${tmp#* }"
44844
44845  # Input might be given as Windows format, start by converting to
44846  # unix format.
44847  new_path="$path"
44848
44849  windows_path="$new_path"
44850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44851    unix_path=`$CYGPATH -u "$windows_path"`
44852    new_path="$unix_path"
44853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44855    new_path="$unix_path"
44856  fi
44857
44858
44859  # Now try to locate executable using which
44860  new_path=`$WHICH "$new_path" 2> /dev/null`
44861
44862  if test "x$new_path" = x; then
44863    # Oops. Which didn't find the executable.
44864    # The splitting of arguments from the executable at a space might have been incorrect,
44865    # since paths with space are more likely in Windows. Give it another try with the whole
44866    # argument.
44867    path="$complete"
44868    arguments="EOL"
44869    new_path="$path"
44870
44871  windows_path="$new_path"
44872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44873    unix_path=`$CYGPATH -u "$windows_path"`
44874    new_path="$unix_path"
44875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44877    new_path="$unix_path"
44878  fi
44879
44880
44881    new_path=`$WHICH "$new_path" 2> /dev/null`
44882    # bat and cmd files are not always considered executable in MSYS causing which
44883    # to not find them
44884    if test "x$new_path" = x \
44885        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44886        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44887      new_path="$path"
44888
44889  windows_path="$new_path"
44890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44891    unix_path=`$CYGPATH -u "$windows_path"`
44892    new_path="$unix_path"
44893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44895    new_path="$unix_path"
44896  fi
44897
44898    fi
44899
44900    if test "x$new_path" = x; then
44901      # It's still not found. Now this is an unrecoverable error.
44902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44903$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44904      has_space=`$ECHO "$complete" | $GREP " "`
44905      if test "x$has_space" != x; then
44906        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44907$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44908      fi
44909      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44910    fi
44911  fi
44912
44913  # Now new_path has a complete unix path to the binary
44914  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44915    # Keep paths in /bin as-is, but remove trailing .exe if any
44916    new_path="${new_path/%.exe/}"
44917    # Do not save /bin paths to all_fixpath_prefixes!
44918  else
44919    # Not in mixed or Windows style, start by that.
44920    new_path=`cmd //c echo $new_path`
44921
44922  input_path="$new_path"
44923  # Check if we need to convert this using DOS-style short mode. If the path
44924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44925  # take no chances and rewrite it.
44926  # Note: m4 eats our [], so we need to use [ and ] instead.
44927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44928  if test "x$has_forbidden_chars" != x; then
44929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44931  fi
44932
44933    # Output is in $new_path
44934
44935  windows_path="$new_path"
44936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44937    unix_path=`$CYGPATH -u "$windows_path"`
44938    new_path="$unix_path"
44939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44941    new_path="$unix_path"
44942  fi
44943
44944    # remove trailing .exe if any
44945    new_path="${new_path/%.exe/}"
44946
44947    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44948    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44949  fi
44950
44951    else
44952      # We're on a unix platform. Hooray! :)
44953      # First separate the path from the arguments. This will split at the first
44954      # space.
44955      complete="$BUILD_CXX"
44956      path="${complete%% *}"
44957      tmp="$complete EOL"
44958      arguments="${tmp#* }"
44959
44960      # Cannot rely on the command "which" here since it doesn't always work.
44961      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44962      if test -z "$is_absolute_path"; then
44963        # Path to executable is not absolute. Find it.
44964        IFS_save="$IFS"
44965        IFS=:
44966        for p in $PATH; do
44967          if test -f "$p/$path" && test -x "$p/$path"; then
44968            new_path="$p/$path"
44969            break
44970          fi
44971        done
44972        IFS="$IFS_save"
44973      else
44974        # This is an absolute path, we can use it without further modifications.
44975        new_path="$path"
44976      fi
44977
44978      if test "x$new_path" = x; then
44979        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44980$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44981        has_space=`$ECHO "$complete" | $GREP " "`
44982        if test "x$has_space" != x; then
44983          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44984$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44985        fi
44986        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44987      fi
44988    fi
44989
44990    # Now join together the path and the arguments once again
44991    if test "x$arguments" != xEOL; then
44992      new_complete="$new_path ${arguments% *}"
44993    else
44994      new_complete="$new_path"
44995    fi
44996
44997    if test "x$complete" != "x$new_complete"; then
44998      BUILD_CXX="$new_complete"
44999      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45000$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45001    fi
45002  fi
45003
45004
45005
45006  # Publish this variable in the help.
45007
45008
45009  if [ -z "${BUILD_NM+x}" ]; then
45010    # The variable is not set by user, try to locate tool using the code snippet
45011    for ac_prog in nm gcc-nm
45012do
45013  # Extract the first word of "$ac_prog", so it can be a program name with args.
45014set dummy $ac_prog; ac_word=$2
45015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45016$as_echo_n "checking for $ac_word... " >&6; }
45017if ${ac_cv_path_BUILD_NM+:} false; then :
45018  $as_echo_n "(cached) " >&6
45019else
45020  case $BUILD_NM in
45021  [\\/]* | ?:[\\/]*)
45022  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45023  ;;
45024  *)
45025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45026for as_dir in $PATH
45027do
45028  IFS=$as_save_IFS
45029  test -z "$as_dir" && as_dir=.
45030    for ac_exec_ext in '' $ac_executable_extensions; do
45031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45032    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45034    break 2
45035  fi
45036done
45037  done
45038IFS=$as_save_IFS
45039
45040  ;;
45041esac
45042fi
45043BUILD_NM=$ac_cv_path_BUILD_NM
45044if test -n "$BUILD_NM"; then
45045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45046$as_echo "$BUILD_NM" >&6; }
45047else
45048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45049$as_echo "no" >&6; }
45050fi
45051
45052
45053  test -n "$BUILD_NM" && break
45054done
45055
45056  else
45057    # The variable is set, but is it from the command line or the environment?
45058
45059    # Try to remove the string !BUILD_NM! from our list.
45060    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45061    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45062      # If it failed, the variable was not from the command line. Ignore it,
45063      # but warn the user (except for BASH, which is always set by the calling BASH).
45064      if test "xBUILD_NM" != xBASH; then
45065        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45066$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45067      fi
45068      # Try to locate tool using the code snippet
45069      for ac_prog in nm gcc-nm
45070do
45071  # Extract the first word of "$ac_prog", so it can be a program name with args.
45072set dummy $ac_prog; ac_word=$2
45073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45074$as_echo_n "checking for $ac_word... " >&6; }
45075if ${ac_cv_path_BUILD_NM+:} false; then :
45076  $as_echo_n "(cached) " >&6
45077else
45078  case $BUILD_NM in
45079  [\\/]* | ?:[\\/]*)
45080  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45081  ;;
45082  *)
45083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45084for as_dir in $PATH
45085do
45086  IFS=$as_save_IFS
45087  test -z "$as_dir" && as_dir=.
45088    for ac_exec_ext in '' $ac_executable_extensions; do
45089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45090    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45092    break 2
45093  fi
45094done
45095  done
45096IFS=$as_save_IFS
45097
45098  ;;
45099esac
45100fi
45101BUILD_NM=$ac_cv_path_BUILD_NM
45102if test -n "$BUILD_NM"; then
45103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45104$as_echo "$BUILD_NM" >&6; }
45105else
45106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45107$as_echo "no" >&6; }
45108fi
45109
45110
45111  test -n "$BUILD_NM" && break
45112done
45113
45114    else
45115      # If it succeeded, then it was overridden by the user. We will use it
45116      # for the tool.
45117
45118      # First remove it from the list of overridden variables, so we can test
45119      # for unknown variables in the end.
45120      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45121
45122      # Check if we try to supply an empty value
45123      if test "x$BUILD_NM" = x; then
45124        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45125$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45126        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45127$as_echo_n "checking for BUILD_NM... " >&6; }
45128        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45129$as_echo "disabled" >&6; }
45130      else
45131        # Check if the provided tool contains a complete path.
45132        tool_specified="$BUILD_NM"
45133        tool_basename="${tool_specified##*/}"
45134        if test "x$tool_basename" = "x$tool_specified"; then
45135          # A command without a complete path is provided, search $PATH.
45136          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45137$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45138          # Extract the first word of "$tool_basename", so it can be a program name with args.
45139set dummy $tool_basename; ac_word=$2
45140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45141$as_echo_n "checking for $ac_word... " >&6; }
45142if ${ac_cv_path_BUILD_NM+:} false; then :
45143  $as_echo_n "(cached) " >&6
45144else
45145  case $BUILD_NM in
45146  [\\/]* | ?:[\\/]*)
45147  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45148  ;;
45149  *)
45150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45151for as_dir in $PATH
45152do
45153  IFS=$as_save_IFS
45154  test -z "$as_dir" && as_dir=.
45155    for ac_exec_ext in '' $ac_executable_extensions; do
45156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45157    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45159    break 2
45160  fi
45161done
45162  done
45163IFS=$as_save_IFS
45164
45165  ;;
45166esac
45167fi
45168BUILD_NM=$ac_cv_path_BUILD_NM
45169if test -n "$BUILD_NM"; then
45170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45171$as_echo "$BUILD_NM" >&6; }
45172else
45173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45174$as_echo "no" >&6; }
45175fi
45176
45177
45178          if test "x$BUILD_NM" = x; then
45179            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45180          fi
45181        else
45182          # Otherwise we believe it is a complete path. Use it as it is.
45183          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45184$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45185          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45186$as_echo_n "checking for BUILD_NM... " >&6; }
45187          if test ! -x "$tool_specified"; then
45188            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45189$as_echo "not found" >&6; }
45190            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45191          fi
45192          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45193$as_echo "$tool_specified" >&6; }
45194        fi
45195      fi
45196    fi
45197
45198  fi
45199
45200
45201
45202  # Only process if variable expands to non-empty
45203
45204  if test "x$BUILD_NM" != x; then
45205    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45206
45207  # First separate the path from the arguments. This will split at the first
45208  # space.
45209  complete="$BUILD_NM"
45210  path="${complete%% *}"
45211  tmp="$complete EOL"
45212  arguments="${tmp#* }"
45213
45214  # Input might be given as Windows format, start by converting to
45215  # unix format.
45216  new_path=`$CYGPATH -u "$path"`
45217
45218  # Now try to locate executable using which
45219  new_path=`$WHICH "$new_path" 2> /dev/null`
45220  # bat and cmd files are not always considered executable in cygwin causing which
45221  # to not find them
45222  if test "x$new_path" = x \
45223      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45224      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45225    new_path=`$CYGPATH -u "$path"`
45226  fi
45227  if test "x$new_path" = x; then
45228    # Oops. Which didn't find the executable.
45229    # The splitting of arguments from the executable at a space might have been incorrect,
45230    # since paths with space are more likely in Windows. Give it another try with the whole
45231    # argument.
45232    path="$complete"
45233    arguments="EOL"
45234    new_path=`$CYGPATH -u "$path"`
45235    new_path=`$WHICH "$new_path" 2> /dev/null`
45236    # bat and cmd files are not always considered executable in cygwin causing which
45237    # to not find them
45238    if test "x$new_path" = x \
45239        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45240        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45241      new_path=`$CYGPATH -u "$path"`
45242    fi
45243    if test "x$new_path" = x; then
45244      # It's still not found. Now this is an unrecoverable error.
45245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45246$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45247      has_space=`$ECHO "$complete" | $GREP " "`
45248      if test "x$has_space" != x; then
45249        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45250$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45251      fi
45252      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45253    fi
45254  fi
45255
45256  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45257  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45258  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45259  # "foo.exe" is OK but "foo" is an error.
45260  #
45261  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45262  # It is also a way to make sure we got the proper file name for the real test later on.
45263  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45264  if test "x$test_shortpath" = x; then
45265    # Short path failed, file does not exist as specified.
45266    # Try adding .exe or .cmd
45267    if test -f "${new_path}.exe"; then
45268      input_to_shortpath="${new_path}.exe"
45269    elif test -f "${new_path}.cmd"; then
45270      input_to_shortpath="${new_path}.cmd"
45271    else
45272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45273$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45274      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45275$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45276      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45277    fi
45278  else
45279    input_to_shortpath="$new_path"
45280  fi
45281
45282  # Call helper function which possibly converts this using DOS-style short mode.
45283  # If so, the updated path is stored in $new_path.
45284  new_path="$input_to_shortpath"
45285
45286  input_path="$input_to_shortpath"
45287  # Check if we need to convert this using DOS-style short mode. If the path
45288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45289  # take no chances and rewrite it.
45290  # Note: m4 eats our [], so we need to use [ and ] instead.
45291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45292  if test "x$has_forbidden_chars" != x; then
45293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45294    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45295    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45296    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45297      # Going to short mode and back again did indeed matter. Since short mode is
45298      # case insensitive, let's make it lowercase to improve readability.
45299      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45300      # Now convert it back to Unix-style (cygpath)
45301      input_path=`$CYGPATH -u "$shortmode_path"`
45302      new_path="$input_path"
45303    fi
45304  fi
45305
45306  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45307  if test "x$test_cygdrive_prefix" = x; then
45308    # As a simple fix, exclude /usr/bin since it's not a real path.
45309    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45310      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45311      # a path prefixed by /cygdrive for fixpath to work.
45312      new_path="$CYGWIN_ROOT_PATH$input_path"
45313    fi
45314  fi
45315
45316  # remove trailing .exe if any
45317  new_path="${new_path/%.exe/}"
45318
45319    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45320
45321  # First separate the path from the arguments. This will split at the first
45322  # space.
45323  complete="$BUILD_NM"
45324  path="${complete%% *}"
45325  tmp="$complete EOL"
45326  arguments="${tmp#* }"
45327
45328  # Input might be given as Windows format, start by converting to
45329  # unix format.
45330  new_path="$path"
45331
45332  windows_path="$new_path"
45333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45334    unix_path=`$CYGPATH -u "$windows_path"`
45335    new_path="$unix_path"
45336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45338    new_path="$unix_path"
45339  fi
45340
45341
45342  # Now try to locate executable using which
45343  new_path=`$WHICH "$new_path" 2> /dev/null`
45344
45345  if test "x$new_path" = x; then
45346    # Oops. Which didn't find the executable.
45347    # The splitting of arguments from the executable at a space might have been incorrect,
45348    # since paths with space are more likely in Windows. Give it another try with the whole
45349    # argument.
45350    path="$complete"
45351    arguments="EOL"
45352    new_path="$path"
45353
45354  windows_path="$new_path"
45355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45356    unix_path=`$CYGPATH -u "$windows_path"`
45357    new_path="$unix_path"
45358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45360    new_path="$unix_path"
45361  fi
45362
45363
45364    new_path=`$WHICH "$new_path" 2> /dev/null`
45365    # bat and cmd files are not always considered executable in MSYS causing which
45366    # to not find them
45367    if test "x$new_path" = x \
45368        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45369        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45370      new_path="$path"
45371
45372  windows_path="$new_path"
45373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45374    unix_path=`$CYGPATH -u "$windows_path"`
45375    new_path="$unix_path"
45376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45378    new_path="$unix_path"
45379  fi
45380
45381    fi
45382
45383    if test "x$new_path" = x; then
45384      # It's still not found. Now this is an unrecoverable error.
45385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45386$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45387      has_space=`$ECHO "$complete" | $GREP " "`
45388      if test "x$has_space" != x; then
45389        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45390$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45391      fi
45392      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45393    fi
45394  fi
45395
45396  # Now new_path has a complete unix path to the binary
45397  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45398    # Keep paths in /bin as-is, but remove trailing .exe if any
45399    new_path="${new_path/%.exe/}"
45400    # Do not save /bin paths to all_fixpath_prefixes!
45401  else
45402    # Not in mixed or Windows style, start by that.
45403    new_path=`cmd //c echo $new_path`
45404
45405  input_path="$new_path"
45406  # Check if we need to convert this using DOS-style short mode. If the path
45407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45408  # take no chances and rewrite it.
45409  # Note: m4 eats our [], so we need to use [ and ] instead.
45410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45411  if test "x$has_forbidden_chars" != x; then
45412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45413    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45414  fi
45415
45416    # Output is in $new_path
45417
45418  windows_path="$new_path"
45419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45420    unix_path=`$CYGPATH -u "$windows_path"`
45421    new_path="$unix_path"
45422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45424    new_path="$unix_path"
45425  fi
45426
45427    # remove trailing .exe if any
45428    new_path="${new_path/%.exe/}"
45429
45430    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45431    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45432  fi
45433
45434    else
45435      # We're on a unix platform. Hooray! :)
45436      # First separate the path from the arguments. This will split at the first
45437      # space.
45438      complete="$BUILD_NM"
45439      path="${complete%% *}"
45440      tmp="$complete EOL"
45441      arguments="${tmp#* }"
45442
45443      # Cannot rely on the command "which" here since it doesn't always work.
45444      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45445      if test -z "$is_absolute_path"; then
45446        # Path to executable is not absolute. Find it.
45447        IFS_save="$IFS"
45448        IFS=:
45449        for p in $PATH; do
45450          if test -f "$p/$path" && test -x "$p/$path"; then
45451            new_path="$p/$path"
45452            break
45453          fi
45454        done
45455        IFS="$IFS_save"
45456      else
45457        # This is an absolute path, we can use it without further modifications.
45458        new_path="$path"
45459      fi
45460
45461      if test "x$new_path" = x; then
45462        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45463$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45464        has_space=`$ECHO "$complete" | $GREP " "`
45465        if test "x$has_space" != x; then
45466          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45467$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45468        fi
45469        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45470      fi
45471    fi
45472
45473    # Now join together the path and the arguments once again
45474    if test "x$arguments" != xEOL; then
45475      new_complete="$new_path ${arguments% *}"
45476    else
45477      new_complete="$new_path"
45478    fi
45479
45480    if test "x$complete" != "x$new_complete"; then
45481      BUILD_NM="$new_complete"
45482      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45483$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45484    fi
45485  fi
45486
45487
45488
45489  # Publish this variable in the help.
45490
45491
45492  if [ -z "${BUILD_AR+x}" ]; then
45493    # The variable is not set by user, try to locate tool using the code snippet
45494    for ac_prog in ar gcc-ar
45495do
45496  # Extract the first word of "$ac_prog", so it can be a program name with args.
45497set dummy $ac_prog; ac_word=$2
45498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45499$as_echo_n "checking for $ac_word... " >&6; }
45500if ${ac_cv_path_BUILD_AR+:} false; then :
45501  $as_echo_n "(cached) " >&6
45502else
45503  case $BUILD_AR in
45504  [\\/]* | ?:[\\/]*)
45505  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45506  ;;
45507  *)
45508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45509for as_dir in $PATH
45510do
45511  IFS=$as_save_IFS
45512  test -z "$as_dir" && as_dir=.
45513    for ac_exec_ext in '' $ac_executable_extensions; do
45514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45515    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45517    break 2
45518  fi
45519done
45520  done
45521IFS=$as_save_IFS
45522
45523  ;;
45524esac
45525fi
45526BUILD_AR=$ac_cv_path_BUILD_AR
45527if test -n "$BUILD_AR"; then
45528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45529$as_echo "$BUILD_AR" >&6; }
45530else
45531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45532$as_echo "no" >&6; }
45533fi
45534
45535
45536  test -n "$BUILD_AR" && break
45537done
45538
45539  else
45540    # The variable is set, but is it from the command line or the environment?
45541
45542    # Try to remove the string !BUILD_AR! from our list.
45543    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45544    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45545      # If it failed, the variable was not from the command line. Ignore it,
45546      # but warn the user (except for BASH, which is always set by the calling BASH).
45547      if test "xBUILD_AR" != xBASH; then
45548        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45549$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45550      fi
45551      # Try to locate tool using the code snippet
45552      for ac_prog in ar gcc-ar
45553do
45554  # Extract the first word of "$ac_prog", so it can be a program name with args.
45555set dummy $ac_prog; ac_word=$2
45556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45557$as_echo_n "checking for $ac_word... " >&6; }
45558if ${ac_cv_path_BUILD_AR+:} false; then :
45559  $as_echo_n "(cached) " >&6
45560else
45561  case $BUILD_AR in
45562  [\\/]* | ?:[\\/]*)
45563  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45564  ;;
45565  *)
45566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45567for as_dir in $PATH
45568do
45569  IFS=$as_save_IFS
45570  test -z "$as_dir" && as_dir=.
45571    for ac_exec_ext in '' $ac_executable_extensions; do
45572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45573    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45575    break 2
45576  fi
45577done
45578  done
45579IFS=$as_save_IFS
45580
45581  ;;
45582esac
45583fi
45584BUILD_AR=$ac_cv_path_BUILD_AR
45585if test -n "$BUILD_AR"; then
45586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45587$as_echo "$BUILD_AR" >&6; }
45588else
45589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45590$as_echo "no" >&6; }
45591fi
45592
45593
45594  test -n "$BUILD_AR" && break
45595done
45596
45597    else
45598      # If it succeeded, then it was overridden by the user. We will use it
45599      # for the tool.
45600
45601      # First remove it from the list of overridden variables, so we can test
45602      # for unknown variables in the end.
45603      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45604
45605      # Check if we try to supply an empty value
45606      if test "x$BUILD_AR" = x; then
45607        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45608$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45609        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45610$as_echo_n "checking for BUILD_AR... " >&6; }
45611        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45612$as_echo "disabled" >&6; }
45613      else
45614        # Check if the provided tool contains a complete path.
45615        tool_specified="$BUILD_AR"
45616        tool_basename="${tool_specified##*/}"
45617        if test "x$tool_basename" = "x$tool_specified"; then
45618          # A command without a complete path is provided, search $PATH.
45619          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45620$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45621          # Extract the first word of "$tool_basename", so it can be a program name with args.
45622set dummy $tool_basename; ac_word=$2
45623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45624$as_echo_n "checking for $ac_word... " >&6; }
45625if ${ac_cv_path_BUILD_AR+:} false; then :
45626  $as_echo_n "(cached) " >&6
45627else
45628  case $BUILD_AR in
45629  [\\/]* | ?:[\\/]*)
45630  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45631  ;;
45632  *)
45633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45634for as_dir in $PATH
45635do
45636  IFS=$as_save_IFS
45637  test -z "$as_dir" && as_dir=.
45638    for ac_exec_ext in '' $ac_executable_extensions; do
45639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45640    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45642    break 2
45643  fi
45644done
45645  done
45646IFS=$as_save_IFS
45647
45648  ;;
45649esac
45650fi
45651BUILD_AR=$ac_cv_path_BUILD_AR
45652if test -n "$BUILD_AR"; then
45653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45654$as_echo "$BUILD_AR" >&6; }
45655else
45656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45657$as_echo "no" >&6; }
45658fi
45659
45660
45661          if test "x$BUILD_AR" = x; then
45662            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45663          fi
45664        else
45665          # Otherwise we believe it is a complete path. Use it as it is.
45666          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45667$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45668          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45669$as_echo_n "checking for BUILD_AR... " >&6; }
45670          if test ! -x "$tool_specified"; then
45671            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45672$as_echo "not found" >&6; }
45673            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45674          fi
45675          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45676$as_echo "$tool_specified" >&6; }
45677        fi
45678      fi
45679    fi
45680
45681  fi
45682
45683
45684
45685  # Only process if variable expands to non-empty
45686
45687  if test "x$BUILD_AR" != x; then
45688    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45689
45690  # First separate the path from the arguments. This will split at the first
45691  # space.
45692  complete="$BUILD_AR"
45693  path="${complete%% *}"
45694  tmp="$complete EOL"
45695  arguments="${tmp#* }"
45696
45697  # Input might be given as Windows format, start by converting to
45698  # unix format.
45699  new_path=`$CYGPATH -u "$path"`
45700
45701  # Now try to locate executable using which
45702  new_path=`$WHICH "$new_path" 2> /dev/null`
45703  # bat and cmd files are not always considered executable in cygwin causing which
45704  # to not find them
45705  if test "x$new_path" = x \
45706      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45707      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45708    new_path=`$CYGPATH -u "$path"`
45709  fi
45710  if test "x$new_path" = x; then
45711    # Oops. Which didn't find the executable.
45712    # The splitting of arguments from the executable at a space might have been incorrect,
45713    # since paths with space are more likely in Windows. Give it another try with the whole
45714    # argument.
45715    path="$complete"
45716    arguments="EOL"
45717    new_path=`$CYGPATH -u "$path"`
45718    new_path=`$WHICH "$new_path" 2> /dev/null`
45719    # bat and cmd files are not always considered executable in cygwin causing which
45720    # to not find them
45721    if test "x$new_path" = x \
45722        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45723        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45724      new_path=`$CYGPATH -u "$path"`
45725    fi
45726    if test "x$new_path" = x; then
45727      # It's still not found. Now this is an unrecoverable error.
45728      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45729$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45730      has_space=`$ECHO "$complete" | $GREP " "`
45731      if test "x$has_space" != x; then
45732        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45733$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45734      fi
45735      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45736    fi
45737  fi
45738
45739  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45740  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45741  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45742  # "foo.exe" is OK but "foo" is an error.
45743  #
45744  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45745  # It is also a way to make sure we got the proper file name for the real test later on.
45746  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45747  if test "x$test_shortpath" = x; then
45748    # Short path failed, file does not exist as specified.
45749    # Try adding .exe or .cmd
45750    if test -f "${new_path}.exe"; then
45751      input_to_shortpath="${new_path}.exe"
45752    elif test -f "${new_path}.cmd"; then
45753      input_to_shortpath="${new_path}.cmd"
45754    else
45755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45756$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45757      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45758$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45759      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45760    fi
45761  else
45762    input_to_shortpath="$new_path"
45763  fi
45764
45765  # Call helper function which possibly converts this using DOS-style short mode.
45766  # If so, the updated path is stored in $new_path.
45767  new_path="$input_to_shortpath"
45768
45769  input_path="$input_to_shortpath"
45770  # Check if we need to convert this using DOS-style short mode. If the path
45771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45772  # take no chances and rewrite it.
45773  # Note: m4 eats our [], so we need to use [ and ] instead.
45774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45775  if test "x$has_forbidden_chars" != x; then
45776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45777    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45778    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45779    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45780      # Going to short mode and back again did indeed matter. Since short mode is
45781      # case insensitive, let's make it lowercase to improve readability.
45782      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45783      # Now convert it back to Unix-style (cygpath)
45784      input_path=`$CYGPATH -u "$shortmode_path"`
45785      new_path="$input_path"
45786    fi
45787  fi
45788
45789  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45790  if test "x$test_cygdrive_prefix" = x; then
45791    # As a simple fix, exclude /usr/bin since it's not a real path.
45792    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45793      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45794      # a path prefixed by /cygdrive for fixpath to work.
45795      new_path="$CYGWIN_ROOT_PATH$input_path"
45796    fi
45797  fi
45798
45799  # remove trailing .exe if any
45800  new_path="${new_path/%.exe/}"
45801
45802    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45803
45804  # First separate the path from the arguments. This will split at the first
45805  # space.
45806  complete="$BUILD_AR"
45807  path="${complete%% *}"
45808  tmp="$complete EOL"
45809  arguments="${tmp#* }"
45810
45811  # Input might be given as Windows format, start by converting to
45812  # unix format.
45813  new_path="$path"
45814
45815  windows_path="$new_path"
45816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45817    unix_path=`$CYGPATH -u "$windows_path"`
45818    new_path="$unix_path"
45819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45821    new_path="$unix_path"
45822  fi
45823
45824
45825  # Now try to locate executable using which
45826  new_path=`$WHICH "$new_path" 2> /dev/null`
45827
45828  if test "x$new_path" = x; then
45829    # Oops. Which didn't find the executable.
45830    # The splitting of arguments from the executable at a space might have been incorrect,
45831    # since paths with space are more likely in Windows. Give it another try with the whole
45832    # argument.
45833    path="$complete"
45834    arguments="EOL"
45835    new_path="$path"
45836
45837  windows_path="$new_path"
45838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45839    unix_path=`$CYGPATH -u "$windows_path"`
45840    new_path="$unix_path"
45841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45843    new_path="$unix_path"
45844  fi
45845
45846
45847    new_path=`$WHICH "$new_path" 2> /dev/null`
45848    # bat and cmd files are not always considered executable in MSYS causing which
45849    # to not find them
45850    if test "x$new_path" = x \
45851        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45852        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45853      new_path="$path"
45854
45855  windows_path="$new_path"
45856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45857    unix_path=`$CYGPATH -u "$windows_path"`
45858    new_path="$unix_path"
45859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45861    new_path="$unix_path"
45862  fi
45863
45864    fi
45865
45866    if test "x$new_path" = x; then
45867      # It's still not found. Now this is an unrecoverable error.
45868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45869$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45870      has_space=`$ECHO "$complete" | $GREP " "`
45871      if test "x$has_space" != x; then
45872        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45873$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45874      fi
45875      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45876    fi
45877  fi
45878
45879  # Now new_path has a complete unix path to the binary
45880  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45881    # Keep paths in /bin as-is, but remove trailing .exe if any
45882    new_path="${new_path/%.exe/}"
45883    # Do not save /bin paths to all_fixpath_prefixes!
45884  else
45885    # Not in mixed or Windows style, start by that.
45886    new_path=`cmd //c echo $new_path`
45887
45888  input_path="$new_path"
45889  # Check if we need to convert this using DOS-style short mode. If the path
45890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45891  # take no chances and rewrite it.
45892  # Note: m4 eats our [], so we need to use [ and ] instead.
45893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45894  if test "x$has_forbidden_chars" != x; then
45895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45896    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45897  fi
45898
45899    # Output is in $new_path
45900
45901  windows_path="$new_path"
45902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45903    unix_path=`$CYGPATH -u "$windows_path"`
45904    new_path="$unix_path"
45905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45907    new_path="$unix_path"
45908  fi
45909
45910    # remove trailing .exe if any
45911    new_path="${new_path/%.exe/}"
45912
45913    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45914    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45915  fi
45916
45917    else
45918      # We're on a unix platform. Hooray! :)
45919      # First separate the path from the arguments. This will split at the first
45920      # space.
45921      complete="$BUILD_AR"
45922      path="${complete%% *}"
45923      tmp="$complete EOL"
45924      arguments="${tmp#* }"
45925
45926      # Cannot rely on the command "which" here since it doesn't always work.
45927      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45928      if test -z "$is_absolute_path"; then
45929        # Path to executable is not absolute. Find it.
45930        IFS_save="$IFS"
45931        IFS=:
45932        for p in $PATH; do
45933          if test -f "$p/$path" && test -x "$p/$path"; then
45934            new_path="$p/$path"
45935            break
45936          fi
45937        done
45938        IFS="$IFS_save"
45939      else
45940        # This is an absolute path, we can use it without further modifications.
45941        new_path="$path"
45942      fi
45943
45944      if test "x$new_path" = x; then
45945        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45946$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45947        has_space=`$ECHO "$complete" | $GREP " "`
45948        if test "x$has_space" != x; then
45949          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45950$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45951        fi
45952        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45953      fi
45954    fi
45955
45956    # Now join together the path and the arguments once again
45957    if test "x$arguments" != xEOL; then
45958      new_complete="$new_path ${arguments% *}"
45959    else
45960      new_complete="$new_path"
45961    fi
45962
45963    if test "x$complete" != "x$new_complete"; then
45964      BUILD_AR="$new_complete"
45965      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45966$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45967    fi
45968  fi
45969
45970
45971
45972  # Publish this variable in the help.
45973
45974
45975  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45976    # The variable is not set by user, try to locate tool using the code snippet
45977    for ac_prog in objcopy
45978do
45979  # Extract the first word of "$ac_prog", so it can be a program name with args.
45980set dummy $ac_prog; ac_word=$2
45981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45982$as_echo_n "checking for $ac_word... " >&6; }
45983if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45984  $as_echo_n "(cached) " >&6
45985else
45986  case $BUILD_OBJCOPY in
45987  [\\/]* | ?:[\\/]*)
45988  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45989  ;;
45990  *)
45991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45992for as_dir in $PATH
45993do
45994  IFS=$as_save_IFS
45995  test -z "$as_dir" && as_dir=.
45996    for ac_exec_ext in '' $ac_executable_extensions; do
45997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45998    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46000    break 2
46001  fi
46002done
46003  done
46004IFS=$as_save_IFS
46005
46006  ;;
46007esac
46008fi
46009BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46010if test -n "$BUILD_OBJCOPY"; then
46011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46012$as_echo "$BUILD_OBJCOPY" >&6; }
46013else
46014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46015$as_echo "no" >&6; }
46016fi
46017
46018
46019  test -n "$BUILD_OBJCOPY" && break
46020done
46021
46022  else
46023    # The variable is set, but is it from the command line or the environment?
46024
46025    # Try to remove the string !BUILD_OBJCOPY! from our list.
46026    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46027    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46028      # If it failed, the variable was not from the command line. Ignore it,
46029      # but warn the user (except for BASH, which is always set by the calling BASH).
46030      if test "xBUILD_OBJCOPY" != xBASH; then
46031        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46032$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46033      fi
46034      # Try to locate tool using the code snippet
46035      for ac_prog in objcopy
46036do
46037  # Extract the first word of "$ac_prog", so it can be a program name with args.
46038set dummy $ac_prog; ac_word=$2
46039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46040$as_echo_n "checking for $ac_word... " >&6; }
46041if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46042  $as_echo_n "(cached) " >&6
46043else
46044  case $BUILD_OBJCOPY in
46045  [\\/]* | ?:[\\/]*)
46046  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46047  ;;
46048  *)
46049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46050for as_dir in $PATH
46051do
46052  IFS=$as_save_IFS
46053  test -z "$as_dir" && as_dir=.
46054    for ac_exec_ext in '' $ac_executable_extensions; do
46055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46056    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46058    break 2
46059  fi
46060done
46061  done
46062IFS=$as_save_IFS
46063
46064  ;;
46065esac
46066fi
46067BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46068if test -n "$BUILD_OBJCOPY"; then
46069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46070$as_echo "$BUILD_OBJCOPY" >&6; }
46071else
46072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46073$as_echo "no" >&6; }
46074fi
46075
46076
46077  test -n "$BUILD_OBJCOPY" && break
46078done
46079
46080    else
46081      # If it succeeded, then it was overridden by the user. We will use it
46082      # for the tool.
46083
46084      # First remove it from the list of overridden variables, so we can test
46085      # for unknown variables in the end.
46086      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46087
46088      # Check if we try to supply an empty value
46089      if test "x$BUILD_OBJCOPY" = x; then
46090        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46091$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46092        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46093$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46094        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46095$as_echo "disabled" >&6; }
46096      else
46097        # Check if the provided tool contains a complete path.
46098        tool_specified="$BUILD_OBJCOPY"
46099        tool_basename="${tool_specified##*/}"
46100        if test "x$tool_basename" = "x$tool_specified"; then
46101          # A command without a complete path is provided, search $PATH.
46102          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46103$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46104          # Extract the first word of "$tool_basename", so it can be a program name with args.
46105set dummy $tool_basename; ac_word=$2
46106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46107$as_echo_n "checking for $ac_word... " >&6; }
46108if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46109  $as_echo_n "(cached) " >&6
46110else
46111  case $BUILD_OBJCOPY in
46112  [\\/]* | ?:[\\/]*)
46113  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46114  ;;
46115  *)
46116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46117for as_dir in $PATH
46118do
46119  IFS=$as_save_IFS
46120  test -z "$as_dir" && as_dir=.
46121    for ac_exec_ext in '' $ac_executable_extensions; do
46122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46123    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46125    break 2
46126  fi
46127done
46128  done
46129IFS=$as_save_IFS
46130
46131  ;;
46132esac
46133fi
46134BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46135if test -n "$BUILD_OBJCOPY"; then
46136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46137$as_echo "$BUILD_OBJCOPY" >&6; }
46138else
46139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46140$as_echo "no" >&6; }
46141fi
46142
46143
46144          if test "x$BUILD_OBJCOPY" = x; then
46145            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46146          fi
46147        else
46148          # Otherwise we believe it is a complete path. Use it as it is.
46149          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46150$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46151          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46152$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46153          if test ! -x "$tool_specified"; then
46154            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46155$as_echo "not found" >&6; }
46156            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46157          fi
46158          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46159$as_echo "$tool_specified" >&6; }
46160        fi
46161      fi
46162    fi
46163
46164  fi
46165
46166
46167
46168  # Only process if variable expands to non-empty
46169
46170  if test "x$BUILD_OBJCOPY" != x; then
46171    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46172
46173  # First separate the path from the arguments. This will split at the first
46174  # space.
46175  complete="$BUILD_OBJCOPY"
46176  path="${complete%% *}"
46177  tmp="$complete EOL"
46178  arguments="${tmp#* }"
46179
46180  # Input might be given as Windows format, start by converting to
46181  # unix format.
46182  new_path=`$CYGPATH -u "$path"`
46183
46184  # Now try to locate executable using which
46185  new_path=`$WHICH "$new_path" 2> /dev/null`
46186  # bat and cmd files are not always considered executable in cygwin causing which
46187  # to not find them
46188  if test "x$new_path" = x \
46189      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46190      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46191    new_path=`$CYGPATH -u "$path"`
46192  fi
46193  if test "x$new_path" = x; then
46194    # Oops. Which didn't find the executable.
46195    # The splitting of arguments from the executable at a space might have been incorrect,
46196    # since paths with space are more likely in Windows. Give it another try with the whole
46197    # argument.
46198    path="$complete"
46199    arguments="EOL"
46200    new_path=`$CYGPATH -u "$path"`
46201    new_path=`$WHICH "$new_path" 2> /dev/null`
46202    # bat and cmd files are not always considered executable in cygwin causing which
46203    # to not find them
46204    if test "x$new_path" = x \
46205        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46206        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46207      new_path=`$CYGPATH -u "$path"`
46208    fi
46209    if test "x$new_path" = x; then
46210      # It's still not found. Now this is an unrecoverable error.
46211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46212$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46213      has_space=`$ECHO "$complete" | $GREP " "`
46214      if test "x$has_space" != x; then
46215        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46216$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46217      fi
46218      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46219    fi
46220  fi
46221
46222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46225  # "foo.exe" is OK but "foo" is an error.
46226  #
46227  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46228  # It is also a way to make sure we got the proper file name for the real test later on.
46229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46230  if test "x$test_shortpath" = x; then
46231    # Short path failed, file does not exist as specified.
46232    # Try adding .exe or .cmd
46233    if test -f "${new_path}.exe"; then
46234      input_to_shortpath="${new_path}.exe"
46235    elif test -f "${new_path}.cmd"; then
46236      input_to_shortpath="${new_path}.cmd"
46237    else
46238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46239$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46240      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46241$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46242      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46243    fi
46244  else
46245    input_to_shortpath="$new_path"
46246  fi
46247
46248  # Call helper function which possibly converts this using DOS-style short mode.
46249  # If so, the updated path is stored in $new_path.
46250  new_path="$input_to_shortpath"
46251
46252  input_path="$input_to_shortpath"
46253  # Check if we need to convert this using DOS-style short mode. If the path
46254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46255  # take no chances and rewrite it.
46256  # Note: m4 eats our [], so we need to use [ and ] instead.
46257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46258  if test "x$has_forbidden_chars" != x; then
46259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46263      # Going to short mode and back again did indeed matter. Since short mode is
46264      # case insensitive, let's make it lowercase to improve readability.
46265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46266      # Now convert it back to Unix-style (cygpath)
46267      input_path=`$CYGPATH -u "$shortmode_path"`
46268      new_path="$input_path"
46269    fi
46270  fi
46271
46272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46273  if test "x$test_cygdrive_prefix" = x; then
46274    # As a simple fix, exclude /usr/bin since it's not a real path.
46275    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46277      # a path prefixed by /cygdrive for fixpath to work.
46278      new_path="$CYGWIN_ROOT_PATH$input_path"
46279    fi
46280  fi
46281
46282  # remove trailing .exe if any
46283  new_path="${new_path/%.exe/}"
46284
46285    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46286
46287  # First separate the path from the arguments. This will split at the first
46288  # space.
46289  complete="$BUILD_OBJCOPY"
46290  path="${complete%% *}"
46291  tmp="$complete EOL"
46292  arguments="${tmp#* }"
46293
46294  # Input might be given as Windows format, start by converting to
46295  # unix format.
46296  new_path="$path"
46297
46298  windows_path="$new_path"
46299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46300    unix_path=`$CYGPATH -u "$windows_path"`
46301    new_path="$unix_path"
46302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46304    new_path="$unix_path"
46305  fi
46306
46307
46308  # Now try to locate executable using which
46309  new_path=`$WHICH "$new_path" 2> /dev/null`
46310
46311  if test "x$new_path" = x; then
46312    # Oops. Which didn't find the executable.
46313    # The splitting of arguments from the executable at a space might have been incorrect,
46314    # since paths with space are more likely in Windows. Give it another try with the whole
46315    # argument.
46316    path="$complete"
46317    arguments="EOL"
46318    new_path="$path"
46319
46320  windows_path="$new_path"
46321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46322    unix_path=`$CYGPATH -u "$windows_path"`
46323    new_path="$unix_path"
46324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46326    new_path="$unix_path"
46327  fi
46328
46329
46330    new_path=`$WHICH "$new_path" 2> /dev/null`
46331    # bat and cmd files are not always considered executable in MSYS causing which
46332    # to not find them
46333    if test "x$new_path" = x \
46334        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46335        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46336      new_path="$path"
46337
46338  windows_path="$new_path"
46339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46340    unix_path=`$CYGPATH -u "$windows_path"`
46341    new_path="$unix_path"
46342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46344    new_path="$unix_path"
46345  fi
46346
46347    fi
46348
46349    if test "x$new_path" = x; then
46350      # It's still not found. Now this is an unrecoverable error.
46351      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46352$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46353      has_space=`$ECHO "$complete" | $GREP " "`
46354      if test "x$has_space" != x; then
46355        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46356$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46357      fi
46358      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46359    fi
46360  fi
46361
46362  # Now new_path has a complete unix path to the binary
46363  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46364    # Keep paths in /bin as-is, but remove trailing .exe if any
46365    new_path="${new_path/%.exe/}"
46366    # Do not save /bin paths to all_fixpath_prefixes!
46367  else
46368    # Not in mixed or Windows style, start by that.
46369    new_path=`cmd //c echo $new_path`
46370
46371  input_path="$new_path"
46372  # Check if we need to convert this using DOS-style short mode. If the path
46373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46374  # take no chances and rewrite it.
46375  # Note: m4 eats our [], so we need to use [ and ] instead.
46376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46377  if test "x$has_forbidden_chars" != x; then
46378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46379    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46380  fi
46381
46382    # Output is in $new_path
46383
46384  windows_path="$new_path"
46385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46386    unix_path=`$CYGPATH -u "$windows_path"`
46387    new_path="$unix_path"
46388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46390    new_path="$unix_path"
46391  fi
46392
46393    # remove trailing .exe if any
46394    new_path="${new_path/%.exe/}"
46395
46396    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46397    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46398  fi
46399
46400    else
46401      # We're on a unix platform. Hooray! :)
46402      # First separate the path from the arguments. This will split at the first
46403      # space.
46404      complete="$BUILD_OBJCOPY"
46405      path="${complete%% *}"
46406      tmp="$complete EOL"
46407      arguments="${tmp#* }"
46408
46409      # Cannot rely on the command "which" here since it doesn't always work.
46410      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46411      if test -z "$is_absolute_path"; then
46412        # Path to executable is not absolute. Find it.
46413        IFS_save="$IFS"
46414        IFS=:
46415        for p in $PATH; do
46416          if test -f "$p/$path" && test -x "$p/$path"; then
46417            new_path="$p/$path"
46418            break
46419          fi
46420        done
46421        IFS="$IFS_save"
46422      else
46423        # This is an absolute path, we can use it without further modifications.
46424        new_path="$path"
46425      fi
46426
46427      if test "x$new_path" = x; then
46428        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46429$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46430        has_space=`$ECHO "$complete" | $GREP " "`
46431        if test "x$has_space" != x; then
46432          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46433$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46434        fi
46435        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46436      fi
46437    fi
46438
46439    # Now join together the path and the arguments once again
46440    if test "x$arguments" != xEOL; then
46441      new_complete="$new_path ${arguments% *}"
46442    else
46443      new_complete="$new_path"
46444    fi
46445
46446    if test "x$complete" != "x$new_complete"; then
46447      BUILD_OBJCOPY="$new_complete"
46448      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46449$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46450    fi
46451  fi
46452
46453
46454
46455  # Publish this variable in the help.
46456
46457
46458  if [ -z "${BUILD_STRIP+x}" ]; then
46459    # The variable is not set by user, try to locate tool using the code snippet
46460    for ac_prog in strip
46461do
46462  # Extract the first word of "$ac_prog", so it can be a program name with args.
46463set dummy $ac_prog; ac_word=$2
46464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46465$as_echo_n "checking for $ac_word... " >&6; }
46466if ${ac_cv_path_BUILD_STRIP+:} false; then :
46467  $as_echo_n "(cached) " >&6
46468else
46469  case $BUILD_STRIP in
46470  [\\/]* | ?:[\\/]*)
46471  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46472  ;;
46473  *)
46474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46475for as_dir in $PATH
46476do
46477  IFS=$as_save_IFS
46478  test -z "$as_dir" && as_dir=.
46479    for ac_exec_ext in '' $ac_executable_extensions; do
46480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46481    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46483    break 2
46484  fi
46485done
46486  done
46487IFS=$as_save_IFS
46488
46489  ;;
46490esac
46491fi
46492BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46493if test -n "$BUILD_STRIP"; then
46494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46495$as_echo "$BUILD_STRIP" >&6; }
46496else
46497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46498$as_echo "no" >&6; }
46499fi
46500
46501
46502  test -n "$BUILD_STRIP" && break
46503done
46504
46505  else
46506    # The variable is set, but is it from the command line or the environment?
46507
46508    # Try to remove the string !BUILD_STRIP! from our list.
46509    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46510    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46511      # If it failed, the variable was not from the command line. Ignore it,
46512      # but warn the user (except for BASH, which is always set by the calling BASH).
46513      if test "xBUILD_STRIP" != xBASH; then
46514        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46515$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46516      fi
46517      # Try to locate tool using the code snippet
46518      for ac_prog in strip
46519do
46520  # Extract the first word of "$ac_prog", so it can be a program name with args.
46521set dummy $ac_prog; ac_word=$2
46522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46523$as_echo_n "checking for $ac_word... " >&6; }
46524if ${ac_cv_path_BUILD_STRIP+:} false; then :
46525  $as_echo_n "(cached) " >&6
46526else
46527  case $BUILD_STRIP in
46528  [\\/]* | ?:[\\/]*)
46529  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46530  ;;
46531  *)
46532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46533for as_dir in $PATH
46534do
46535  IFS=$as_save_IFS
46536  test -z "$as_dir" && as_dir=.
46537    for ac_exec_ext in '' $ac_executable_extensions; do
46538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46539    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46541    break 2
46542  fi
46543done
46544  done
46545IFS=$as_save_IFS
46546
46547  ;;
46548esac
46549fi
46550BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46551if test -n "$BUILD_STRIP"; then
46552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46553$as_echo "$BUILD_STRIP" >&6; }
46554else
46555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46556$as_echo "no" >&6; }
46557fi
46558
46559
46560  test -n "$BUILD_STRIP" && break
46561done
46562
46563    else
46564      # If it succeeded, then it was overridden by the user. We will use it
46565      # for the tool.
46566
46567      # First remove it from the list of overridden variables, so we can test
46568      # for unknown variables in the end.
46569      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46570
46571      # Check if we try to supply an empty value
46572      if test "x$BUILD_STRIP" = x; then
46573        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46574$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46575        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46576$as_echo_n "checking for BUILD_STRIP... " >&6; }
46577        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46578$as_echo "disabled" >&6; }
46579      else
46580        # Check if the provided tool contains a complete path.
46581        tool_specified="$BUILD_STRIP"
46582        tool_basename="${tool_specified##*/}"
46583        if test "x$tool_basename" = "x$tool_specified"; then
46584          # A command without a complete path is provided, search $PATH.
46585          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46586$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46587          # Extract the first word of "$tool_basename", so it can be a program name with args.
46588set dummy $tool_basename; ac_word=$2
46589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46590$as_echo_n "checking for $ac_word... " >&6; }
46591if ${ac_cv_path_BUILD_STRIP+:} false; then :
46592  $as_echo_n "(cached) " >&6
46593else
46594  case $BUILD_STRIP in
46595  [\\/]* | ?:[\\/]*)
46596  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46597  ;;
46598  *)
46599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46600for as_dir in $PATH
46601do
46602  IFS=$as_save_IFS
46603  test -z "$as_dir" && as_dir=.
46604    for ac_exec_ext in '' $ac_executable_extensions; do
46605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46606    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46608    break 2
46609  fi
46610done
46611  done
46612IFS=$as_save_IFS
46613
46614  ;;
46615esac
46616fi
46617BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46618if test -n "$BUILD_STRIP"; then
46619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46620$as_echo "$BUILD_STRIP" >&6; }
46621else
46622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46623$as_echo "no" >&6; }
46624fi
46625
46626
46627          if test "x$BUILD_STRIP" = x; then
46628            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46629          fi
46630        else
46631          # Otherwise we believe it is a complete path. Use it as it is.
46632          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46633$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46634          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46635$as_echo_n "checking for BUILD_STRIP... " >&6; }
46636          if test ! -x "$tool_specified"; then
46637            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46638$as_echo "not found" >&6; }
46639            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46640          fi
46641          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46642$as_echo "$tool_specified" >&6; }
46643        fi
46644      fi
46645    fi
46646
46647  fi
46648
46649
46650
46651  # Only process if variable expands to non-empty
46652
46653  if test "x$BUILD_STRIP" != x; then
46654    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46655
46656  # First separate the path from the arguments. This will split at the first
46657  # space.
46658  complete="$BUILD_STRIP"
46659  path="${complete%% *}"
46660  tmp="$complete EOL"
46661  arguments="${tmp#* }"
46662
46663  # Input might be given as Windows format, start by converting to
46664  # unix format.
46665  new_path=`$CYGPATH -u "$path"`
46666
46667  # Now try to locate executable using which
46668  new_path=`$WHICH "$new_path" 2> /dev/null`
46669  # bat and cmd files are not always considered executable in cygwin causing which
46670  # to not find them
46671  if test "x$new_path" = x \
46672      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46673      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46674    new_path=`$CYGPATH -u "$path"`
46675  fi
46676  if test "x$new_path" = x; then
46677    # Oops. Which didn't find the executable.
46678    # The splitting of arguments from the executable at a space might have been incorrect,
46679    # since paths with space are more likely in Windows. Give it another try with the whole
46680    # argument.
46681    path="$complete"
46682    arguments="EOL"
46683    new_path=`$CYGPATH -u "$path"`
46684    new_path=`$WHICH "$new_path" 2> /dev/null`
46685    # bat and cmd files are not always considered executable in cygwin causing which
46686    # to not find them
46687    if test "x$new_path" = x \
46688        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46689        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46690      new_path=`$CYGPATH -u "$path"`
46691    fi
46692    if test "x$new_path" = x; then
46693      # It's still not found. Now this is an unrecoverable error.
46694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46695$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46696      has_space=`$ECHO "$complete" | $GREP " "`
46697      if test "x$has_space" != x; then
46698        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46699$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46700      fi
46701      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46702    fi
46703  fi
46704
46705  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46706  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46707  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46708  # "foo.exe" is OK but "foo" is an error.
46709  #
46710  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46711  # It is also a way to make sure we got the proper file name for the real test later on.
46712  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46713  if test "x$test_shortpath" = x; then
46714    # Short path failed, file does not exist as specified.
46715    # Try adding .exe or .cmd
46716    if test -f "${new_path}.exe"; then
46717      input_to_shortpath="${new_path}.exe"
46718    elif test -f "${new_path}.cmd"; then
46719      input_to_shortpath="${new_path}.cmd"
46720    else
46721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46722$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46723      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46724$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46725      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46726    fi
46727  else
46728    input_to_shortpath="$new_path"
46729  fi
46730
46731  # Call helper function which possibly converts this using DOS-style short mode.
46732  # If so, the updated path is stored in $new_path.
46733  new_path="$input_to_shortpath"
46734
46735  input_path="$input_to_shortpath"
46736  # Check if we need to convert this using DOS-style short mode. If the path
46737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46738  # take no chances and rewrite it.
46739  # Note: m4 eats our [], so we need to use [ and ] instead.
46740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46741  if test "x$has_forbidden_chars" != x; then
46742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46743    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46744    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46745    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46746      # Going to short mode and back again did indeed matter. Since short mode is
46747      # case insensitive, let's make it lowercase to improve readability.
46748      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46749      # Now convert it back to Unix-style (cygpath)
46750      input_path=`$CYGPATH -u "$shortmode_path"`
46751      new_path="$input_path"
46752    fi
46753  fi
46754
46755  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46756  if test "x$test_cygdrive_prefix" = x; then
46757    # As a simple fix, exclude /usr/bin since it's not a real path.
46758    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46759      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46760      # a path prefixed by /cygdrive for fixpath to work.
46761      new_path="$CYGWIN_ROOT_PATH$input_path"
46762    fi
46763  fi
46764
46765  # remove trailing .exe if any
46766  new_path="${new_path/%.exe/}"
46767
46768    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46769
46770  # First separate the path from the arguments. This will split at the first
46771  # space.
46772  complete="$BUILD_STRIP"
46773  path="${complete%% *}"
46774  tmp="$complete EOL"
46775  arguments="${tmp#* }"
46776
46777  # Input might be given as Windows format, start by converting to
46778  # unix format.
46779  new_path="$path"
46780
46781  windows_path="$new_path"
46782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46783    unix_path=`$CYGPATH -u "$windows_path"`
46784    new_path="$unix_path"
46785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46787    new_path="$unix_path"
46788  fi
46789
46790
46791  # Now try to locate executable using which
46792  new_path=`$WHICH "$new_path" 2> /dev/null`
46793
46794  if test "x$new_path" = x; then
46795    # Oops. Which didn't find the executable.
46796    # The splitting of arguments from the executable at a space might have been incorrect,
46797    # since paths with space are more likely in Windows. Give it another try with the whole
46798    # argument.
46799    path="$complete"
46800    arguments="EOL"
46801    new_path="$path"
46802
46803  windows_path="$new_path"
46804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46805    unix_path=`$CYGPATH -u "$windows_path"`
46806    new_path="$unix_path"
46807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46809    new_path="$unix_path"
46810  fi
46811
46812
46813    new_path=`$WHICH "$new_path" 2> /dev/null`
46814    # bat and cmd files are not always considered executable in MSYS causing which
46815    # to not find them
46816    if test "x$new_path" = x \
46817        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46818        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46819      new_path="$path"
46820
46821  windows_path="$new_path"
46822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46823    unix_path=`$CYGPATH -u "$windows_path"`
46824    new_path="$unix_path"
46825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46827    new_path="$unix_path"
46828  fi
46829
46830    fi
46831
46832    if test "x$new_path" = x; then
46833      # It's still not found. Now this is an unrecoverable error.
46834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46835$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46836      has_space=`$ECHO "$complete" | $GREP " "`
46837      if test "x$has_space" != x; then
46838        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46839$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46840      fi
46841      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46842    fi
46843  fi
46844
46845  # Now new_path has a complete unix path to the binary
46846  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46847    # Keep paths in /bin as-is, but remove trailing .exe if any
46848    new_path="${new_path/%.exe/}"
46849    # Do not save /bin paths to all_fixpath_prefixes!
46850  else
46851    # Not in mixed or Windows style, start by that.
46852    new_path=`cmd //c echo $new_path`
46853
46854  input_path="$new_path"
46855  # Check if we need to convert this using DOS-style short mode. If the path
46856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46857  # take no chances and rewrite it.
46858  # Note: m4 eats our [], so we need to use [ and ] instead.
46859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46860  if test "x$has_forbidden_chars" != x; then
46861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46863  fi
46864
46865    # Output is in $new_path
46866
46867  windows_path="$new_path"
46868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46869    unix_path=`$CYGPATH -u "$windows_path"`
46870    new_path="$unix_path"
46871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46873    new_path="$unix_path"
46874  fi
46875
46876    # remove trailing .exe if any
46877    new_path="${new_path/%.exe/}"
46878
46879    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46880    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46881  fi
46882
46883    else
46884      # We're on a unix platform. Hooray! :)
46885      # First separate the path from the arguments. This will split at the first
46886      # space.
46887      complete="$BUILD_STRIP"
46888      path="${complete%% *}"
46889      tmp="$complete EOL"
46890      arguments="${tmp#* }"
46891
46892      # Cannot rely on the command "which" here since it doesn't always work.
46893      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46894      if test -z "$is_absolute_path"; then
46895        # Path to executable is not absolute. Find it.
46896        IFS_save="$IFS"
46897        IFS=:
46898        for p in $PATH; do
46899          if test -f "$p/$path" && test -x "$p/$path"; then
46900            new_path="$p/$path"
46901            break
46902          fi
46903        done
46904        IFS="$IFS_save"
46905      else
46906        # This is an absolute path, we can use it without further modifications.
46907        new_path="$path"
46908      fi
46909
46910      if test "x$new_path" = x; then
46911        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46912$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46913        has_space=`$ECHO "$complete" | $GREP " "`
46914        if test "x$has_space" != x; then
46915          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46916$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46917        fi
46918        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46919      fi
46920    fi
46921
46922    # Now join together the path and the arguments once again
46923    if test "x$arguments" != xEOL; then
46924      new_complete="$new_path ${arguments% *}"
46925    else
46926      new_complete="$new_path"
46927    fi
46928
46929    if test "x$complete" != "x$new_complete"; then
46930      BUILD_STRIP="$new_complete"
46931      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46932$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46933    fi
46934  fi
46935
46936    # Assume the C compiler is the assembler
46937    BUILD_AS="$BUILD_CC -c"
46938    # Just like for the target compiler, use the compiler as linker
46939    BUILD_LD="$BUILD_CC"
46940    BUILD_LDCXX="$BUILD_CXX"
46941
46942    PATH="$OLDPATH"
46943
46944
46945  COMPILER=$BUILD_CC
46946  COMPILER_NAME=BuildC
46947
46948  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46949    # cc -V output typically looks like
46950    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46951    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46952    # Check that this is likely to be the Solaris Studio cc.
46953    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46954    if test $? -ne 0; then
46955      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46956      { $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
46957$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46958      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46959$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46960      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46961$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46962      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46963    fi
46964    # Remove usage instructions (if present), and
46965    # collapse compiler output into a single line
46966    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46967        $SED -e 's/ *[Uu]sage:.*//'`
46968    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46969        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46970  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46971    # xlc -qversion output typically looks like
46972    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46973    #     Version: 11.01.0000.0015
46974    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46975    # Check that this is likely to be the IBM XL C compiler.
46976    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46977    if test $? -ne 0; then
46978      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46979      { $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
46980$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46981      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46982$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46983      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46984$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46985      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46986    fi
46987    # Collapse compiler output into a single line
46988    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46989    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46990        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
46991  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46992    # There is no specific version flag, but all output starts with a version string.
46993    # First line typically looks something like:
46994    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
46995    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46996    # Check that this is likely to be Microsoft CL.EXE.
46997    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
46998    if test $? -ne 0; then
46999      { $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
47000$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47001      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47002$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47003      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47004    fi
47005    # Collapse compiler output into a single line
47006    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47007    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47008        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47009  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47010    # gcc --version output typically looks like
47011    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47012    #     Copyright (C) 2013 Free Software Foundation, Inc.
47013    #     This is free software; see the source for copying conditions.  There is NO
47014    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47015    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47016    # Check that this is likely to be GCC.
47017    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47018    if test $? -ne 0; then
47019      { $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
47020$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47021      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47022$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47023      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47024    fi
47025    # Remove Copyright and legalese from version string, and
47026    # collapse into a single line
47027    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47028        $SED -e 's/ *Copyright .*//'`
47029    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47030        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47031  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47032    # clang --version output typically looks like
47033    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47034    #    clang version 3.3 (tags/RELEASE_33/final)
47035    # or
47036    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47037    #    Target: x86_64-pc-linux-gnu
47038    #    Thread model: posix
47039    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47040    # Check that this is likely to be clang
47041    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47042    if test $? -ne 0; then
47043      { $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
47044$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47045      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47046$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47047      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47048    fi
47049    # Collapse compiler output into a single line
47050    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47051    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47052        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47053  else
47054      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47055  fi
47056  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47057  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47058  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47059  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47060
47061  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47062$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47063
47064
47065  COMPILER=$BUILD_CXX
47066  COMPILER_NAME=BuildC++
47067
47068  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47069    # cc -V output typically looks like
47070    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47071    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47072    # Check that this is likely to be the Solaris Studio cc.
47073    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47074    if test $? -ne 0; then
47075      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47076      { $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
47077$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47078      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47079$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47080      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47081$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47082      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47083    fi
47084    # Remove usage instructions (if present), and
47085    # collapse compiler output into a single line
47086    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47087        $SED -e 's/ *[Uu]sage:.*//'`
47088    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47089        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47090  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47091    # xlc -qversion output typically looks like
47092    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47093    #     Version: 11.01.0000.0015
47094    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47095    # Check that this is likely to be the IBM XL C compiler.
47096    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47097    if test $? -ne 0; then
47098      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47099      { $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
47100$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47101      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47102$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47103      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47104$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47105      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47106    fi
47107    # Collapse compiler output into a single line
47108    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47109    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47110        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47111  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47112    # There is no specific version flag, but all output starts with a version string.
47113    # First line typically looks something like:
47114    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47115    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47116    # Check that this is likely to be Microsoft CL.EXE.
47117    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47118    if test $? -ne 0; then
47119      { $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
47120$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47121      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47122$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47123      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47124    fi
47125    # Collapse compiler output into a single line
47126    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47127    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47128        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47129  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47130    # gcc --version output typically looks like
47131    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47132    #     Copyright (C) 2013 Free Software Foundation, Inc.
47133    #     This is free software; see the source for copying conditions.  There is NO
47134    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47135    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47136    # Check that this is likely to be GCC.
47137    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47138    if test $? -ne 0; then
47139      { $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
47140$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47141      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47142$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47143      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47144    fi
47145    # Remove Copyright and legalese from version string, and
47146    # collapse into a single line
47147    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47148        $SED -e 's/ *Copyright .*//'`
47149    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47150        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47151  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47152    # clang --version output typically looks like
47153    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47154    #    clang version 3.3 (tags/RELEASE_33/final)
47155    # or
47156    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47157    #    Target: x86_64-pc-linux-gnu
47158    #    Thread model: posix
47159    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47160    # Check that this is likely to be clang
47161    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47162    if test $? -ne 0; then
47163      { $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
47164$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47165      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47166$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47167      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47168    fi
47169    # Collapse compiler output into a single line
47170    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47171    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47172        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47173  else
47174      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47175  fi
47176  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47177  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47178  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47179  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47180
47181  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47182$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47183
47184
47185  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47186    { $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
47187$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47188    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47189$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47190  fi
47191
47192  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47193  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47194    { $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
47195$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;}
47196  fi
47197
47198  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47199    { $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
47200$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47201  fi
47202
47203  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47204
47205  else
47206    # If we are not cross compiling, use the normal target compilers for
47207    # building the build platform executables.
47208    BUILD_CC="$CC"
47209    BUILD_CXX="$CXX"
47210    BUILD_LD="$LD"
47211    BUILD_LDCXX="$LDCXX"
47212    BUILD_NM="$NM"
47213    BUILD_AS="$AS"
47214    BUILD_OBJCOPY="$OBJCOPY"
47215    BUILD_STRIP="$STRIP"
47216    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47217    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47218    BUILD_AR="$AR"
47219
47220
47221  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47222    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47223$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47224    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47225$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47226  fi
47227
47228  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47229  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47230    { $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
47231$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;}
47232  fi
47233
47234  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47235    { $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
47236$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47237  fi
47238
47239  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
47240
47241  fi
47242
47243
47244
47245
47246
47247
47248
47249
47250
47251
47252
47253
47254  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47255    # For hotspot, we need these in Windows mixed path,
47256    # so rewrite them all. Need added .exe suffix.
47257    HOTSPOT_CXX="$CXX.exe"
47258    HOTSPOT_LD="$LD.exe"
47259    HOTSPOT_MT="$MT.exe"
47260    HOTSPOT_RC="$RC.exe"
47261
47262  unix_path="$HOTSPOT_CXX"
47263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47264    windows_path=`$CYGPATH -m "$unix_path"`
47265    HOTSPOT_CXX="$windows_path"
47266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47267    windows_path=`cmd //c echo $unix_path`
47268    HOTSPOT_CXX="$windows_path"
47269  fi
47270
47271
47272  unix_path="$HOTSPOT_LD"
47273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47274    windows_path=`$CYGPATH -m "$unix_path"`
47275    HOTSPOT_LD="$windows_path"
47276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47277    windows_path=`cmd //c echo $unix_path`
47278    HOTSPOT_LD="$windows_path"
47279  fi
47280
47281
47282  unix_path="$HOTSPOT_MT"
47283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47284    windows_path=`$CYGPATH -m "$unix_path"`
47285    HOTSPOT_MT="$windows_path"
47286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47287    windows_path=`cmd //c echo $unix_path`
47288    HOTSPOT_MT="$windows_path"
47289  fi
47290
47291
47292  unix_path="$HOTSPOT_RC"
47293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47294    windows_path=`$CYGPATH -m "$unix_path"`
47295    HOTSPOT_RC="$windows_path"
47296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47297    windows_path=`cmd //c echo $unix_path`
47298    HOTSPOT_RC="$windows_path"
47299  fi
47300
47301
47302
47303  else
47304    HOTSPOT_CXX="$CXX"
47305    HOTSPOT_LD="$LD"
47306  fi
47307
47308
47309
47310  if test  "x$TOOLCHAIN_TYPE" = xclang; then
47311    USE_CLANG=true
47312  fi
47313
47314
47315
47316
47317
47318  # The package path is used only on macosx?
47319  # FIXME: clean this up, and/or move it elsewhere.
47320  PACKAGE_PATH=/opt/local
47321
47322
47323  # Check for extra potential brokenness.
47324  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47325    # On Windows, double-check that we got the right compiler.
47326    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47327    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47328    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47329      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47330        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
47331      fi
47332    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47333      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47334        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47335      fi
47336    fi
47337  fi
47338
47339  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47340    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47341    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47342    # This is later checked when setting flags.
47343
47344    # "-Og" suppported for GCC 4.8 and later
47345    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47346
47347
47348
47349
47350
47351
47352
47353
47354
47355
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393    # Execute function body
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405
47406
47407
47408
47409
47410
47411
47412
47413
47414
47415
47416
47417
47418
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442    # Execute function body
47443
47444  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47445$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47446  supports=yes
47447
47448  saved_cflags="$CFLAGS"
47449  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47450  ac_ext=c
47451ac_cpp='$CPP $CPPFLAGS'
47452ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47453ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47454ac_compiler_gnu=$ac_cv_c_compiler_gnu
47455
47456  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47457/* end confdefs.h.  */
47458int i;
47459_ACEOF
47460if ac_fn_c_try_compile "$LINENO"; then :
47461
47462else
47463  supports=no
47464fi
47465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47466  ac_ext=cpp
47467ac_cpp='$CXXCPP $CPPFLAGS'
47468ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47469ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47470ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47471
47472  CFLAGS="$saved_cflags"
47473
47474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47475$as_echo "$supports" >&6; }
47476  if test "x$supports" = "xyes" ; then
47477    :
47478    C_COMP_SUPPORTS="yes"
47479  else
47480    :
47481    C_COMP_SUPPORTS="no"
47482  fi
47483
47484
47485
47486
47487
47488
47489
47490
47491
47492
47493
47494
47495
47496
47497
47498
47499
47500
47501
47502
47503
47504
47505
47506
47507
47508
47509
47510
47511
47512
47513
47514
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542    # Execute function body
47543
47544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47545$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47546  supports=yes
47547
47548  saved_cxxflags="$CXXFLAGS"
47549  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47550  ac_ext=cpp
47551ac_cpp='$CXXCPP $CPPFLAGS'
47552ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47553ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47554ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47555
47556  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47557/* end confdefs.h.  */
47558int i;
47559_ACEOF
47560if ac_fn_cxx_try_compile "$LINENO"; then :
47561
47562else
47563  supports=no
47564fi
47565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47566  ac_ext=cpp
47567ac_cpp='$CXXCPP $CPPFLAGS'
47568ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47569ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47570ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47571
47572  CXXFLAGS="$saved_cxxflags"
47573
47574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47575$as_echo "$supports" >&6; }
47576  if test "x$supports" = "xyes" ; then
47577    :
47578    CXX_COMP_SUPPORTS="yes"
47579  else
47580    :
47581    CXX_COMP_SUPPORTS="no"
47582  fi
47583
47584
47585
47586
47587
47588
47589
47590
47591
47592
47593
47594
47595
47596  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47597$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47598  supports=no
47599  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47600
47601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47602$as_echo "$supports" >&6; }
47603  if test "x$supports" = "xyes" ; then
47604    :
47605    HAS_CFLAG_OPTIMIZE_DEBUG=true
47606  else
47607    :
47608    HAS_CFLAG_OPTIMIZE_DEBUG=false
47609  fi
47610
47611
47612
47613
47614
47615
47616
47617    # "-z relro" supported in GNU binutils 2.17 and later
47618    LINKER_RELRO_FLAG="-Wl,-z,relro"
47619
47620
47621
47622
47623
47624
47625
47626
47627
47628
47629
47630
47631
47632
47633
47634
47635
47636
47637
47638
47639
47640
47641
47642
47643
47644
47645
47646
47647
47648
47649
47650
47651
47652
47653
47654
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666    # Execute function body
47667
47668  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47669$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47670  supports=yes
47671
47672  saved_ldflags="$LDFLAGS"
47673  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47674  ac_ext=c
47675ac_cpp='$CPP $CPPFLAGS'
47676ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47677ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47678ac_compiler_gnu=$ac_cv_c_compiler_gnu
47679
47680  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47681/* end confdefs.h.  */
47682
47683int
47684main ()
47685{
47686
47687  ;
47688  return 0;
47689}
47690_ACEOF
47691if ac_fn_c_try_link "$LINENO"; then :
47692
47693else
47694  supports=no
47695fi
47696rm -f core conftest.err conftest.$ac_objext \
47697    conftest$ac_exeext conftest.$ac_ext
47698  ac_ext=cpp
47699ac_cpp='$CXXCPP $CPPFLAGS'
47700ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47701ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47702ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47703
47704  LDFLAGS="$saved_ldflags"
47705
47706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47707$as_echo "$supports" >&6; }
47708  if test "x$supports" = "xyes" ; then
47709    :
47710    HAS_LINKER_RELRO=true
47711  else
47712    :
47713    HAS_LINKER_RELRO=false
47714  fi
47715
47716
47717
47718
47719
47720
47721
47722
47723
47724
47725
47726
47727
47728    # "-z now" supported in GNU binutils 2.11 and later
47729    LINKER_NOW_FLAG="-Wl,-z,now"
47730
47731
47732
47733
47734
47735
47736
47737
47738
47739
47740
47741
47742
47743
47744
47745
47746
47747
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776
47777    # Execute function body
47778
47779  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47780$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47781  supports=yes
47782
47783  saved_ldflags="$LDFLAGS"
47784  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47785  ac_ext=c
47786ac_cpp='$CPP $CPPFLAGS'
47787ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47788ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47789ac_compiler_gnu=$ac_cv_c_compiler_gnu
47790
47791  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47792/* end confdefs.h.  */
47793
47794int
47795main ()
47796{
47797
47798  ;
47799  return 0;
47800}
47801_ACEOF
47802if ac_fn_c_try_link "$LINENO"; then :
47803
47804else
47805  supports=no
47806fi
47807rm -f core conftest.err conftest.$ac_objext \
47808    conftest$ac_exeext conftest.$ac_ext
47809  ac_ext=cpp
47810ac_cpp='$CXXCPP $CPPFLAGS'
47811ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47812ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47813ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47814
47815  LDFLAGS="$saved_ldflags"
47816
47817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47818$as_echo "$supports" >&6; }
47819  if test "x$supports" = "xyes" ; then
47820    :
47821    HAS_LINKER_NOW=true
47822  else
47823    :
47824    HAS_LINKER_NOW=false
47825  fi
47826
47827
47828
47829
47830
47831
47832
47833
47834
47835
47836
47837
47838  fi
47839
47840  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47841  # in executable.'
47842  USING_BROKEN_SUSE_LD=no
47843  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47844    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47845$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47846    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47847    $ECHO "int main() { }" > main.c
47848    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47849      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47850$as_echo "no" >&6; }
47851      USING_BROKEN_SUSE_LD=no
47852    else
47853      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47854$as_echo "yes" >&6; }
47855      USING_BROKEN_SUSE_LD=yes
47856    fi
47857    $RM version-script.map main.c a.out
47858  fi
47859
47860
47861  # Setup hotspot lecagy names for toolchains
47862  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47863  if test "x$TOOLCHAIN_TYPE" = xclang; then
47864    HOTSPOT_TOOLCHAIN_TYPE=gcc
47865  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47866    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47867  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47868    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47869  fi
47870
47871
47872
47873# Setup the JTReg Regression Test Harness.
47874
47875
47876# Check whether --with-jtreg was given.
47877if test "${with_jtreg+set}" = set; then :
47878  withval=$with_jtreg;
47879else
47880  with_jtreg=no
47881fi
47882
47883
47884  if test "x$with_jtreg" = xno; then
47885    # jtreg disabled
47886    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47887$as_echo_n "checking for jtreg... " >&6; }
47888    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47889$as_echo "no" >&6; }
47890  else
47891    if test "x$with_jtreg" != xyes; then
47892      # with path specified.
47893      JT_HOME="$with_jtreg"
47894    fi
47895
47896    if test "x$JT_HOME" != x; then
47897      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47898$as_echo_n "checking for jtreg... " >&6; }
47899
47900      # use JT_HOME enviroment var.
47901
47902  # Only process if variable expands to non-empty
47903
47904  if test "x$JT_HOME" != x; then
47905    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47906
47907  # Input might be given as Windows format, start by converting to
47908  # unix format.
47909  path="$JT_HOME"
47910  new_path=`$CYGPATH -u "$path"`
47911
47912  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47913  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47914  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47915  # "foo.exe" is OK but "foo" is an error.
47916  #
47917  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47918  # It is also a way to make sure we got the proper file name for the real test later on.
47919  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47920  if test "x$test_shortpath" = x; then
47921    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47922$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47923    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47924  fi
47925
47926  # Call helper function which possibly converts this using DOS-style short mode.
47927  # If so, the updated path is stored in $new_path.
47928
47929  input_path="$new_path"
47930  # Check if we need to convert this using DOS-style short mode. If the path
47931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47932  # take no chances and rewrite it.
47933  # Note: m4 eats our [], so we need to use [ and ] instead.
47934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47935  if test "x$has_forbidden_chars" != x; then
47936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47937    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47938    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47939    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47940      # Going to short mode and back again did indeed matter. Since short mode is
47941      # case insensitive, let's make it lowercase to improve readability.
47942      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47943      # Now convert it back to Unix-style (cygpath)
47944      input_path=`$CYGPATH -u "$shortmode_path"`
47945      new_path="$input_path"
47946    fi
47947  fi
47948
47949  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47950  if test "x$test_cygdrive_prefix" = x; then
47951    # As a simple fix, exclude /usr/bin since it's not a real path.
47952    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47953      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47954      # a path prefixed by /cygdrive for fixpath to work.
47955      new_path="$CYGWIN_ROOT_PATH$input_path"
47956    fi
47957  fi
47958
47959
47960  if test "x$path" != "x$new_path"; then
47961    JT_HOME="$new_path"
47962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47963$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47964  fi
47965
47966    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47967
47968  path="$JT_HOME"
47969  has_colon=`$ECHO $path | $GREP ^.:`
47970  new_path="$path"
47971  if test "x$has_colon" = x; then
47972    # Not in mixed or Windows style, start by that.
47973    new_path=`cmd //c echo $path`
47974  fi
47975
47976
47977  input_path="$new_path"
47978  # Check if we need to convert this using DOS-style short mode. If the path
47979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47980  # take no chances and rewrite it.
47981  # Note: m4 eats our [], so we need to use [ and ] instead.
47982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47983  if test "x$has_forbidden_chars" != x; then
47984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47985    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47986  fi
47987
47988
47989  windows_path="$new_path"
47990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47991    unix_path=`$CYGPATH -u "$windows_path"`
47992    new_path="$unix_path"
47993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47995    new_path="$unix_path"
47996  fi
47997
47998  if test "x$path" != "x$new_path"; then
47999    JT_HOME="$new_path"
48000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48001$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48002  fi
48003
48004  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48005  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48006
48007    else
48008      # We're on a unix platform. Hooray! :)
48009      path="$JT_HOME"
48010      has_space=`$ECHO "$path" | $GREP " "`
48011      if test "x$has_space" != x; then
48012        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48013$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48014        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48015      fi
48016
48017      # Use eval to expand a potential ~
48018      eval path="$path"
48019      if test ! -f "$path" && test ! -d "$path"; then
48020        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48021      fi
48022
48023      if test -d "$path"; then
48024        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48025      else
48026        dir="`$DIRNAME "$path"`"
48027        base="`$BASENAME "$path"`"
48028        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48029      fi
48030    fi
48031  fi
48032
48033
48034      # jtreg win32 script works for everybody
48035      JTREGEXE="$JT_HOME/bin/jtreg"
48036
48037      if test ! -f "$JTREGEXE"; then
48038        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48039      fi
48040
48041      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48042$as_echo "$JTREGEXE" >&6; }
48043    else
48044      # try to find jtreg on path
48045
48046
48047
48048  # Publish this variable in the help.
48049
48050
48051  if [ -z "${JTREGEXE+x}" ]; then
48052    # The variable is not set by user, try to locate tool using the code snippet
48053    for ac_prog in jtreg
48054do
48055  # Extract the first word of "$ac_prog", so it can be a program name with args.
48056set dummy $ac_prog; ac_word=$2
48057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48058$as_echo_n "checking for $ac_word... " >&6; }
48059if ${ac_cv_path_JTREGEXE+:} false; then :
48060  $as_echo_n "(cached) " >&6
48061else
48062  case $JTREGEXE in
48063  [\\/]* | ?:[\\/]*)
48064  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48065  ;;
48066  *)
48067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48068for as_dir in $PATH
48069do
48070  IFS=$as_save_IFS
48071  test -z "$as_dir" && as_dir=.
48072    for ac_exec_ext in '' $ac_executable_extensions; do
48073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48074    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48076    break 2
48077  fi
48078done
48079  done
48080IFS=$as_save_IFS
48081
48082  ;;
48083esac
48084fi
48085JTREGEXE=$ac_cv_path_JTREGEXE
48086if test -n "$JTREGEXE"; then
48087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48088$as_echo "$JTREGEXE" >&6; }
48089else
48090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48091$as_echo "no" >&6; }
48092fi
48093
48094
48095  test -n "$JTREGEXE" && break
48096done
48097
48098  else
48099    # The variable is set, but is it from the command line or the environment?
48100
48101    # Try to remove the string !JTREGEXE! from our list.
48102    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48103    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48104      # If it failed, the variable was not from the command line. Ignore it,
48105      # but warn the user (except for BASH, which is always set by the calling BASH).
48106      if test "xJTREGEXE" != xBASH; then
48107        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48108$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48109      fi
48110      # Try to locate tool using the code snippet
48111      for ac_prog in jtreg
48112do
48113  # Extract the first word of "$ac_prog", so it can be a program name with args.
48114set dummy $ac_prog; ac_word=$2
48115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48116$as_echo_n "checking for $ac_word... " >&6; }
48117if ${ac_cv_path_JTREGEXE+:} false; then :
48118  $as_echo_n "(cached) " >&6
48119else
48120  case $JTREGEXE in
48121  [\\/]* | ?:[\\/]*)
48122  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48123  ;;
48124  *)
48125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48126for as_dir in $PATH
48127do
48128  IFS=$as_save_IFS
48129  test -z "$as_dir" && as_dir=.
48130    for ac_exec_ext in '' $ac_executable_extensions; do
48131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48132    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48134    break 2
48135  fi
48136done
48137  done
48138IFS=$as_save_IFS
48139
48140  ;;
48141esac
48142fi
48143JTREGEXE=$ac_cv_path_JTREGEXE
48144if test -n "$JTREGEXE"; then
48145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48146$as_echo "$JTREGEXE" >&6; }
48147else
48148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48149$as_echo "no" >&6; }
48150fi
48151
48152
48153  test -n "$JTREGEXE" && break
48154done
48155
48156    else
48157      # If it succeeded, then it was overridden by the user. We will use it
48158      # for the tool.
48159
48160      # First remove it from the list of overridden variables, so we can test
48161      # for unknown variables in the end.
48162      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48163
48164      # Check if we try to supply an empty value
48165      if test "x$JTREGEXE" = x; then
48166        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48167$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48168        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48169$as_echo_n "checking for JTREGEXE... " >&6; }
48170        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48171$as_echo "disabled" >&6; }
48172      else
48173        # Check if the provided tool contains a complete path.
48174        tool_specified="$JTREGEXE"
48175        tool_basename="${tool_specified##*/}"
48176        if test "x$tool_basename" = "x$tool_specified"; then
48177          # A command without a complete path is provided, search $PATH.
48178          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48179$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48180          # Extract the first word of "$tool_basename", so it can be a program name with args.
48181set dummy $tool_basename; ac_word=$2
48182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48183$as_echo_n "checking for $ac_word... " >&6; }
48184if ${ac_cv_path_JTREGEXE+:} false; then :
48185  $as_echo_n "(cached) " >&6
48186else
48187  case $JTREGEXE in
48188  [\\/]* | ?:[\\/]*)
48189  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48190  ;;
48191  *)
48192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48193for as_dir in $PATH
48194do
48195  IFS=$as_save_IFS
48196  test -z "$as_dir" && as_dir=.
48197    for ac_exec_ext in '' $ac_executable_extensions; do
48198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48199    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48201    break 2
48202  fi
48203done
48204  done
48205IFS=$as_save_IFS
48206
48207  ;;
48208esac
48209fi
48210JTREGEXE=$ac_cv_path_JTREGEXE
48211if test -n "$JTREGEXE"; then
48212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48213$as_echo "$JTREGEXE" >&6; }
48214else
48215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48216$as_echo "no" >&6; }
48217fi
48218
48219
48220          if test "x$JTREGEXE" = x; then
48221            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48222          fi
48223        else
48224          # Otherwise we believe it is a complete path. Use it as it is.
48225          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48226$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48227          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48228$as_echo_n "checking for JTREGEXE... " >&6; }
48229          if test ! -x "$tool_specified"; then
48230            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48231$as_echo "not found" >&6; }
48232            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48233          fi
48234          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48235$as_echo "$tool_specified" >&6; }
48236        fi
48237      fi
48238    fi
48239
48240  fi
48241
48242
48243
48244  if test "x$JTREGEXE" = x; then
48245    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48246  fi
48247
48248
48249      JT_HOME="`$DIRNAME $JTREGEXE`"
48250    fi
48251  fi
48252
48253
48254
48255
48256
48257
48258  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48259  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48260  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48261  #                              commands produced by the link step (currently AIX only)
48262  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48263    COMPILER_TARGET_BITS_FLAG="-q"
48264    COMPILER_COMMAND_FILE_FLAG="-f"
48265    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48266  else
48267    COMPILER_TARGET_BITS_FLAG="-m"
48268    COMPILER_COMMAND_FILE_FLAG="@"
48269    COMPILER_BINDCMD_FILE_FLAG=""
48270
48271    # The solstudio linker does not support @-files.
48272    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48273      COMPILER_COMMAND_FILE_FLAG=
48274    fi
48275
48276    # Check if @file is supported by gcc
48277    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48278      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48279$as_echo_n "checking if @file is supported by gcc... " >&6; }
48280      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48281      $ECHO "" "--version" > command.file
48282      if $CXX @command.file 2>&5 >&5; then
48283        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48284$as_echo "yes" >&6; }
48285        COMPILER_COMMAND_FILE_FLAG="@"
48286      else
48287        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48288$as_echo "no" >&6; }
48289        COMPILER_COMMAND_FILE_FLAG=
48290      fi
48291      $RM command.file
48292    fi
48293  fi
48294
48295
48296
48297
48298  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48299  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48300    ARFLAGS="-r"
48301  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48302    ARFLAGS="-X64"
48303  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48304    # lib.exe is used as AR to create static libraries.
48305    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48306  else
48307    ARFLAGS=""
48308  fi
48309
48310
48311  ## Setup strip.
48312  # FIXME: should this really be per platform, or should it be per toolchain type?
48313  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48314  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48315  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48316    STRIPFLAGS="-g"
48317  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48318    STRIPFLAGS="-x"
48319  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48320    STRIPFLAGS="-S"
48321  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48322    STRIPFLAGS="-X32_64"
48323  fi
48324
48325
48326
48327  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48328    CC_OUT_OPTION=-Fo
48329    EXE_OUT_OPTION=-out:
48330    LD_OUT_OPTION=-out:
48331    AR_OUT_OPTION=-out:
48332  else
48333    # The option used to specify the target .o,.a or .so file.
48334    # When compiling, how to specify the to be created object file.
48335    CC_OUT_OPTION='-o$(SPACE)'
48336    # When linking, how to specify the to be created executable.
48337    EXE_OUT_OPTION='-o$(SPACE)'
48338    # When linking, how to specify the to be created dynamically linkable library.
48339    LD_OUT_OPTION='-o$(SPACE)'
48340    # When archiving, how to specify the to be create static archive for object files.
48341    AR_OUT_OPTION='rcs$(SPACE)'
48342  fi
48343
48344
48345
48346
48347
48348  # On Windows, we need to set RC flags.
48349  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48350    RC_FLAGS="-nologo -l0x409"
48351    JVM_RCFLAGS="-nologo"
48352    if test "x$DEBUG_LEVEL" = xrelease; then
48353      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48354      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48355    fi
48356
48357    # The version variables used to create RC_FLAGS may be overridden
48358    # in a custom configure script, or possibly the command line.
48359    # Let those variables be expanded at make time in spec.gmk.
48360    # The \$ are escaped to the shell, and the $(...) variables
48361    # are evaluated by make.
48362    RC_FLAGS="$RC_FLAGS \
48363        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48364        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48365        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48366        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48367        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48368        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48369        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48370
48371    JVM_RCFLAGS="$JVM_RCFLAGS \
48372        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48373        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48374        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48375        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48376        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48377        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48378        -D\"HS_FNAME=jvm.dll\" \
48379        -D\"HS_INTERNAL_NAME=jvm\""
48380  fi
48381
48382
48383
48384  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48385    # silence copyright notice and other headers.
48386    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48387  fi
48388
48389
48390# Now we can test some aspects on the target using configure macros.
48391
48392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48393$as_echo_n "checking for ANSI C header files... " >&6; }
48394if ${ac_cv_header_stdc+:} false; then :
48395  $as_echo_n "(cached) " >&6
48396else
48397  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48398/* end confdefs.h.  */
48399#include <stdlib.h>
48400#include <stdarg.h>
48401#include <string.h>
48402#include <float.h>
48403
48404int
48405main ()
48406{
48407
48408  ;
48409  return 0;
48410}
48411_ACEOF
48412if ac_fn_cxx_try_compile "$LINENO"; then :
48413  ac_cv_header_stdc=yes
48414else
48415  ac_cv_header_stdc=no
48416fi
48417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48418
48419if test $ac_cv_header_stdc = yes; then
48420  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48421  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48422/* end confdefs.h.  */
48423#include <string.h>
48424
48425_ACEOF
48426if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48427  $EGREP "memchr" >/dev/null 2>&1; then :
48428
48429else
48430  ac_cv_header_stdc=no
48431fi
48432rm -f conftest*
48433
48434fi
48435
48436if test $ac_cv_header_stdc = yes; then
48437  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48438  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48439/* end confdefs.h.  */
48440#include <stdlib.h>
48441
48442_ACEOF
48443if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48444  $EGREP "free" >/dev/null 2>&1; then :
48445
48446else
48447  ac_cv_header_stdc=no
48448fi
48449rm -f conftest*
48450
48451fi
48452
48453if test $ac_cv_header_stdc = yes; then
48454  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48455  if test "$cross_compiling" = yes; then :
48456  :
48457else
48458  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48459/* end confdefs.h.  */
48460#include <ctype.h>
48461#include <stdlib.h>
48462#if ((' ' & 0x0FF) == 0x020)
48463# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48464# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48465#else
48466# define ISLOWER(c) \
48467		   (('a' <= (c) && (c) <= 'i') \
48468		     || ('j' <= (c) && (c) <= 'r') \
48469		     || ('s' <= (c) && (c) <= 'z'))
48470# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48471#endif
48472
48473#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48474int
48475main ()
48476{
48477  int i;
48478  for (i = 0; i < 256; i++)
48479    if (XOR (islower (i), ISLOWER (i))
48480	|| toupper (i) != TOUPPER (i))
48481      return 2;
48482  return 0;
48483}
48484_ACEOF
48485if ac_fn_cxx_try_run "$LINENO"; then :
48486
48487else
48488  ac_cv_header_stdc=no
48489fi
48490rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48491  conftest.$ac_objext conftest.beam conftest.$ac_ext
48492fi
48493
48494fi
48495fi
48496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48497$as_echo "$ac_cv_header_stdc" >&6; }
48498if test $ac_cv_header_stdc = yes; then
48499
48500$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48501
48502fi
48503
48504# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48505for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48506		  inttypes.h stdint.h unistd.h
48507do :
48508  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48509ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48510"
48511if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48512  cat >>confdefs.h <<_ACEOF
48513#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48514_ACEOF
48515
48516fi
48517
48518done
48519
48520
48521
48522  ###############################################################################
48523  #
48524  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48525  # (The JVM can use 32 or 64 bit Java pointers but that decision
48526  # is made at runtime.)
48527  #
48528
48529  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48530    # Always specify -m flag on Solaris
48531    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48532
48533  # When we add flags to the "official" CFLAGS etc, we need to
48534  # keep track of these additions in ADDED_CFLAGS etc. These
48535  # will later be checked to make sure only controlled additions
48536  # have been made to CFLAGS etc.
48537  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48538  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48539  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48540
48541  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48542  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48543  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48544
48545  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48546  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48547  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48548
48549  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48550  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48551  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48552
48553  elif test "x$COMPILE_TYPE" = xreduced; then
48554    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48555      # Specify -m if running reduced on unix platforms
48556
48557  # When we add flags to the "official" CFLAGS etc, we need to
48558  # keep track of these additions in ADDED_CFLAGS etc. These
48559  # will later be checked to make sure only controlled additions
48560  # have been made to CFLAGS etc.
48561  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48562  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48563  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48564
48565  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48566  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48567  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48568
48569  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48570  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48571  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48572
48573  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48574  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48575  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48576
48577    fi
48578  fi
48579  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48580    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48581    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48582    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48583  fi
48584
48585  # Make compilation sanity check
48586  for ac_header in stdio.h
48587do :
48588  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48589if test "x$ac_cv_header_stdio_h" = xyes; then :
48590  cat >>confdefs.h <<_ACEOF
48591#define HAVE_STDIO_H 1
48592_ACEOF
48593
48594else
48595
48596    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48597$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48598    if test "x$COMPILE_TYPE" = xreduced; then
48599
48600  # Print a helpful message on how to acquire the necessary build dependency.
48601  # reduced is the help tag: freetype, cups, alsa etc
48602  MISSING_DEPENDENCY=reduced
48603
48604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48605    cygwin_help $MISSING_DEPENDENCY
48606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48607    msys_help $MISSING_DEPENDENCY
48608  else
48609    PKGHANDLER_COMMAND=
48610
48611    case $PKGHANDLER in
48612      apt-get)
48613        apt_help     $MISSING_DEPENDENCY ;;
48614      yum)
48615        yum_help     $MISSING_DEPENDENCY ;;
48616      port)
48617        port_help    $MISSING_DEPENDENCY ;;
48618      pkgutil)
48619        pkgutil_help $MISSING_DEPENDENCY ;;
48620      pkgadd)
48621        pkgadd_help  $MISSING_DEPENDENCY ;;
48622    esac
48623
48624    if test "x$PKGHANDLER_COMMAND" != x; then
48625      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48626    fi
48627  fi
48628
48629      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48630$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48631    elif test "x$COMPILE_TYPE" = xcross; then
48632      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48633$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48634    fi
48635    as_fn_error $? "Cannot continue." "$LINENO" 5
48636
48637fi
48638
48639done
48640
48641
48642  # The cast to long int works around a bug in the HP C Compiler
48643# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48644# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48645# This bug is HP SR number 8606223364.
48646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48647$as_echo_n "checking size of int *... " >&6; }
48648if ${ac_cv_sizeof_int_p+:} false; then :
48649  $as_echo_n "(cached) " >&6
48650else
48651  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48652
48653else
48654  if test "$ac_cv_type_int_p" = yes; then
48655     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48656$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48657as_fn_error 77 "cannot compute sizeof (int *)
48658See \`config.log' for more details" "$LINENO" 5; }
48659   else
48660     ac_cv_sizeof_int_p=0
48661   fi
48662fi
48663
48664fi
48665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48666$as_echo "$ac_cv_sizeof_int_p" >&6; }
48667
48668
48669
48670cat >>confdefs.h <<_ACEOF
48671#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48672_ACEOF
48673
48674
48675
48676  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48677  if test "x$ac_cv_sizeof_int_p" = x; then
48678    # The test failed, lets stick to the assumed value.
48679    { $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
48680$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48681  else
48682    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48683
48684    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48685      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48686      # Let's try to implicitely set the compilers target architecture and retry the test
48687      { $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
48688$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;}
48689      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48690$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48691
48692  # When we add flags to the "official" CFLAGS etc, we need to
48693  # keep track of these additions in ADDED_CFLAGS etc. These
48694  # will later be checked to make sure only controlled additions
48695  # have been made to CFLAGS etc.
48696  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48697  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48698  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48699
48700  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48701  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48702  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48703
48704  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48705  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48706  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48707
48708  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48709  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48710  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48711
48712
48713      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48714      unset ac_cv_sizeof_int_p
48715      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48716      cat >>confdefs.h <<_ACEOF
48717#undef SIZEOF_INT_P
48718_ACEOF
48719
48720      # The cast to long int works around a bug in the HP C Compiler
48721# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48722# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48723# This bug is HP SR number 8606223364.
48724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48725$as_echo_n "checking size of int *... " >&6; }
48726if ${ac_cv_sizeof_int_p+:} false; then :
48727  $as_echo_n "(cached) " >&6
48728else
48729  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48730
48731else
48732  if test "$ac_cv_type_int_p" = yes; then
48733     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48734$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48735as_fn_error 77 "cannot compute sizeof (int *)
48736See \`config.log' for more details" "$LINENO" 5; }
48737   else
48738     ac_cv_sizeof_int_p=0
48739   fi
48740fi
48741
48742fi
48743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48744$as_echo "$ac_cv_sizeof_int_p" >&6; }
48745
48746
48747
48748cat >>confdefs.h <<_ACEOF
48749#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48750_ACEOF
48751
48752
48753
48754      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48755
48756      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48757        { $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
48758$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;}
48759        if test "x$COMPILE_TYPE" = xreduced; then
48760
48761  # Print a helpful message on how to acquire the necessary build dependency.
48762  # reduced is the help tag: freetype, cups, alsa etc
48763  MISSING_DEPENDENCY=reduced
48764
48765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48766    cygwin_help $MISSING_DEPENDENCY
48767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48768    msys_help $MISSING_DEPENDENCY
48769  else
48770    PKGHANDLER_COMMAND=
48771
48772    case $PKGHANDLER in
48773      apt-get)
48774        apt_help     $MISSING_DEPENDENCY ;;
48775      yum)
48776        yum_help     $MISSING_DEPENDENCY ;;
48777      port)
48778        port_help    $MISSING_DEPENDENCY ;;
48779      pkgutil)
48780        pkgutil_help $MISSING_DEPENDENCY ;;
48781      pkgadd)
48782        pkgadd_help  $MISSING_DEPENDENCY ;;
48783    esac
48784
48785    if test "x$PKGHANDLER_COMMAND" != x; then
48786      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48787    fi
48788  fi
48789
48790          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48791$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48792        elif test "x$COMPILE_TYPE" = xcross; then
48793          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48794$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48795        fi
48796        as_fn_error $? "Cannot continue." "$LINENO" 5
48797      fi
48798    fi
48799  fi
48800
48801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48802$as_echo_n "checking for target address size... " >&6; }
48803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48804$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48805
48806
48807  ###############################################################################
48808  #
48809  # Is the target little of big endian?
48810  #
48811   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48812$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48813if ${ac_cv_c_bigendian+:} false; then :
48814  $as_echo_n "(cached) " >&6
48815else
48816  ac_cv_c_bigendian=unknown
48817    # See if we're dealing with a universal compiler.
48818    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48819/* end confdefs.h.  */
48820#ifndef __APPLE_CC__
48821	       not a universal capable compiler
48822	     #endif
48823	     typedef int dummy;
48824
48825_ACEOF
48826if ac_fn_cxx_try_compile "$LINENO"; then :
48827
48828	# Check for potential -arch flags.  It is not universal unless
48829	# there are at least two -arch flags with different values.
48830	ac_arch=
48831	ac_prev=
48832	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48833	 if test -n "$ac_prev"; then
48834	   case $ac_word in
48835	     i?86 | x86_64 | ppc | ppc64)
48836	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48837		 ac_arch=$ac_word
48838	       else
48839		 ac_cv_c_bigendian=universal
48840		 break
48841	       fi
48842	       ;;
48843	   esac
48844	   ac_prev=
48845	 elif test "x$ac_word" = "x-arch"; then
48846	   ac_prev=arch
48847	 fi
48848       done
48849fi
48850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48851    if test $ac_cv_c_bigendian = unknown; then
48852      # See if sys/param.h defines the BYTE_ORDER macro.
48853      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48854/* end confdefs.h.  */
48855#include <sys/types.h>
48856	     #include <sys/param.h>
48857
48858int
48859main ()
48860{
48861#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48862		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48863		     && LITTLE_ENDIAN)
48864	      bogus endian macros
48865	     #endif
48866
48867  ;
48868  return 0;
48869}
48870_ACEOF
48871if ac_fn_cxx_try_compile "$LINENO"; then :
48872  # It does; now see whether it defined to BIG_ENDIAN or not.
48873	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48874/* end confdefs.h.  */
48875#include <sys/types.h>
48876		#include <sys/param.h>
48877
48878int
48879main ()
48880{
48881#if BYTE_ORDER != BIG_ENDIAN
48882		 not big endian
48883		#endif
48884
48885  ;
48886  return 0;
48887}
48888_ACEOF
48889if ac_fn_cxx_try_compile "$LINENO"; then :
48890  ac_cv_c_bigendian=yes
48891else
48892  ac_cv_c_bigendian=no
48893fi
48894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48895fi
48896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48897    fi
48898    if test $ac_cv_c_bigendian = unknown; then
48899      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48900      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48901/* end confdefs.h.  */
48902#include <limits.h>
48903
48904int
48905main ()
48906{
48907#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48908	      bogus endian macros
48909	     #endif
48910
48911  ;
48912  return 0;
48913}
48914_ACEOF
48915if ac_fn_cxx_try_compile "$LINENO"; then :
48916  # It does; now see whether it defined to _BIG_ENDIAN or not.
48917	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48918/* end confdefs.h.  */
48919#include <limits.h>
48920
48921int
48922main ()
48923{
48924#ifndef _BIG_ENDIAN
48925		 not big endian
48926		#endif
48927
48928  ;
48929  return 0;
48930}
48931_ACEOF
48932if ac_fn_cxx_try_compile "$LINENO"; then :
48933  ac_cv_c_bigendian=yes
48934else
48935  ac_cv_c_bigendian=no
48936fi
48937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48938fi
48939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48940    fi
48941    if test $ac_cv_c_bigendian = unknown; then
48942      # Compile a test program.
48943      if test "$cross_compiling" = yes; then :
48944  # Try to guess by grepping values from an object file.
48945	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48946/* end confdefs.h.  */
48947short int ascii_mm[] =
48948		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48949		short int ascii_ii[] =
48950		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48951		int use_ascii (int i) {
48952		  return ascii_mm[i] + ascii_ii[i];
48953		}
48954		short int ebcdic_ii[] =
48955		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48956		short int ebcdic_mm[] =
48957		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48958		int use_ebcdic (int i) {
48959		  return ebcdic_mm[i] + ebcdic_ii[i];
48960		}
48961		extern int foo;
48962
48963int
48964main ()
48965{
48966return use_ascii (foo) == use_ebcdic (foo);
48967  ;
48968  return 0;
48969}
48970_ACEOF
48971if ac_fn_cxx_try_compile "$LINENO"; then :
48972  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48973	      ac_cv_c_bigendian=yes
48974	    fi
48975	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48976	      if test "$ac_cv_c_bigendian" = unknown; then
48977		ac_cv_c_bigendian=no
48978	      else
48979		# finding both strings is unlikely to happen, but who knows?
48980		ac_cv_c_bigendian=unknown
48981	      fi
48982	    fi
48983fi
48984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48985else
48986  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48987/* end confdefs.h.  */
48988$ac_includes_default
48989int
48990main ()
48991{
48992
48993	     /* Are we little or big endian?  From Harbison&Steele.  */
48994	     union
48995	     {
48996	       long int l;
48997	       char c[sizeof (long int)];
48998	     } u;
48999	     u.l = 1;
49000	     return u.c[sizeof (long int) - 1] == 1;
49001
49002  ;
49003  return 0;
49004}
49005_ACEOF
49006if ac_fn_cxx_try_run "$LINENO"; then :
49007  ac_cv_c_bigendian=no
49008else
49009  ac_cv_c_bigendian=yes
49010fi
49011rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49012  conftest.$ac_objext conftest.beam conftest.$ac_ext
49013fi
49014
49015    fi
49016fi
49017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49018$as_echo "$ac_cv_c_bigendian" >&6; }
49019 case $ac_cv_c_bigendian in #(
49020   yes)
49021     ENDIAN="big";; #(
49022   no)
49023     ENDIAN="little" ;; #(
49024   universal)
49025     ENDIAN="universal_endianness"
49026     ;; #(
49027   *)
49028     ENDIAN="unknown" ;;
49029 esac
49030
49031
49032  if test "x$ENDIAN" = xuniversal_endianness; then
49033    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49034  fi
49035  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49036    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
49037  fi
49038
49039
49040# Configure flags for the tools
49041
49042  ###############################################################################
49043  #
49044  # How to compile shared libraries.
49045  #
49046
49047  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49048    PICFLAG="-fPIC"
49049    C_FLAG_REORDER=''
49050    CXX_FLAG_REORDER=''
49051
49052    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49053      # Linking is different on MacOSX
49054      if test "x$STATIC_BUILD" = xtrue; then
49055        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49056      else
49057        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49058        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49059      fi
49060      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49061      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49062      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49063      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49064    else
49065      # Default works for linux, might work on other platforms as well.
49066      SHARED_LIBRARY_FLAGS='-shared'
49067      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49068      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49069      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49070      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49071    fi
49072  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49073    C_FLAG_REORDER=''
49074    CXX_FLAG_REORDER=''
49075
49076    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49077      # Linking is different on MacOSX
49078      PICFLAG=''
49079      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49080      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49081      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49082      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49083      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49084
49085      if test "x$STATIC_BUILD" = xfalse; then
49086        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49087      fi
49088    else
49089      # Default works for linux, might work on other platforms as well.
49090      PICFLAG='-fPIC'
49091      SHARED_LIBRARY_FLAGS='-shared'
49092      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49093      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49094      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49095      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49096    fi
49097  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49098    PICFLAG="-KPIC"
49099    C_FLAG_REORDER='-xF'
49100    CXX_FLAG_REORDER='-xF'
49101    SHARED_LIBRARY_FLAGS="-G"
49102    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
49103    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49104    SET_SHARED_LIBRARY_NAME='-h $1'
49105    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49106  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49107    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49108    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49109    # will have to patch this single instruction with a call to some out-of-order code which
49110    # does the load from the TOC. This is of course slow. But in that case we also would have
49111    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49112    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49113    # can be patched directly by the linker and does not require a jump to out-of-order code.
49114    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49115    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49116    # loads for accessing a global variable). But there are rumors that this may be seen as a
49117    # 'performance feature' because of improved code locality of the symbols used in a
49118    # compilation unit.
49119    PICFLAG="-qpic"
49120    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49121    C_FLAG_REORDER=''
49122    CXX_FLAG_REORDER=''
49123    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49124    SET_EXECUTABLE_ORIGIN=""
49125    SET_SHARED_LIBRARY_ORIGIN=''
49126    SET_SHARED_LIBRARY_NAME=''
49127    SET_SHARED_LIBRARY_MAPFILE=''
49128  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49129    PICFLAG=""
49130    C_FLAG_REORDER=''
49131    CXX_FLAG_REORDER=''
49132    SHARED_LIBRARY_FLAGS="-dll"
49133    SET_EXECUTABLE_ORIGIN=''
49134    SET_SHARED_LIBRARY_ORIGIN=''
49135    SET_SHARED_LIBRARY_NAME=''
49136    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49137  fi
49138
49139
49140
49141
49142
49143
49144
49145
49146
49147  # The (cross) compiler is now configured, we can now test capabilities
49148  # of the target platform.
49149
49150
49151
49152  ###############################################################################
49153  #
49154  # Setup the opt flags for different compilers
49155  # and different operating systems.
49156  #
49157
49158  # FIXME: this was indirectly the old default, but just inherited.
49159  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49160  #   C_FLAG_DEPS="-MMD -MF"
49161  # fi
49162
49163  # Generate make dependency files
49164  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49165    C_FLAG_DEPS="-MMD -MF"
49166  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49167    C_FLAG_DEPS="-MMD -MF"
49168  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49169    C_FLAG_DEPS="-xMMD -xMF"
49170  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49171    C_FLAG_DEPS="-qmakedep=gcc -MF"
49172  fi
49173  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49174
49175
49176
49177  # Debug symbols
49178  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49179    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49180      # reduce from default "-g2" option to save space
49181      CFLAGS_DEBUG_SYMBOLS="-g1"
49182      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49183    else
49184      CFLAGS_DEBUG_SYMBOLS="-g"
49185      CXXFLAGS_DEBUG_SYMBOLS="-g"
49186    fi
49187  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49188    CFLAGS_DEBUG_SYMBOLS="-g"
49189    CXXFLAGS_DEBUG_SYMBOLS="-g"
49190  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49191    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49192    # -g0 enables debug symbols without disabling inlining.
49193    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49194  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49195    CFLAGS_DEBUG_SYMBOLS="-g"
49196    CXXFLAGS_DEBUG_SYMBOLS="-g"
49197  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49198    CFLAGS_DEBUG_SYMBOLS="-Zi"
49199    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49200  fi
49201
49202
49203
49204  # Debug symbols for JVM_CFLAGS
49205  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49206    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49207    if test "x$DEBUG_LEVEL" = xslowdebug; then
49208      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49209    else
49210      # -g0 does not disable inlining, which -g does.
49211      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49212    fi
49213  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49214    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49215  else
49216    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49217  fi
49218
49219
49220  # bounds, memory and behavior checking options
49221  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49222    case $DEBUG_LEVEL in
49223    release )
49224      # no adjustment
49225      ;;
49226    fastdebug )
49227      # no adjustment
49228      ;;
49229    slowdebug )
49230      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49231      # get's added conditionally on whether we produce debug symbols or not.
49232      # This is most likely not really correct.
49233
49234      # Add runtime stack smashing and undefined behavior checks.
49235      # Not all versions of gcc support -fstack-protector
49236      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49237
49238
49239
49240
49241
49242
49243
49244
49245
49246
49247
49248
49249
49250
49251
49252
49253
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279    # Execute function body
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293
49294
49295
49296
49297
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317
49318
49319
49320
49321
49322
49323
49324
49325
49326
49327
49328    # Execute function body
49329
49330  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49331$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49332  supports=yes
49333
49334  saved_cflags="$CFLAGS"
49335  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49336  ac_ext=c
49337ac_cpp='$CPP $CPPFLAGS'
49338ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49339ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49340ac_compiler_gnu=$ac_cv_c_compiler_gnu
49341
49342  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49343/* end confdefs.h.  */
49344int i;
49345_ACEOF
49346if ac_fn_c_try_compile "$LINENO"; then :
49347
49348else
49349  supports=no
49350fi
49351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49352  ac_ext=cpp
49353ac_cpp='$CXXCPP $CPPFLAGS'
49354ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49355ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49356ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49357
49358  CFLAGS="$saved_cflags"
49359
49360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49361$as_echo "$supports" >&6; }
49362  if test "x$supports" = "xyes" ; then
49363    :
49364    C_COMP_SUPPORTS="yes"
49365  else
49366    :
49367    C_COMP_SUPPORTS="no"
49368  fi
49369
49370
49371
49372
49373
49374
49375
49376
49377
49378
49379
49380
49381
49382
49383
49384
49385
49386
49387
49388
49389
49390
49391
49392
49393
49394
49395
49396
49397
49398
49399
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428    # Execute function body
49429
49430  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49431$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49432  supports=yes
49433
49434  saved_cxxflags="$CXXFLAGS"
49435  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49436  ac_ext=cpp
49437ac_cpp='$CXXCPP $CPPFLAGS'
49438ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49439ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49440ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49441
49442  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49443/* end confdefs.h.  */
49444int i;
49445_ACEOF
49446if ac_fn_cxx_try_compile "$LINENO"; then :
49447
49448else
49449  supports=no
49450fi
49451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49452  ac_ext=cpp
49453ac_cpp='$CXXCPP $CPPFLAGS'
49454ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49455ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49456ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49457
49458  CXXFLAGS="$saved_cxxflags"
49459
49460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49461$as_echo "$supports" >&6; }
49462  if test "x$supports" = "xyes" ; then
49463    :
49464    CXX_COMP_SUPPORTS="yes"
49465  else
49466    :
49467    CXX_COMP_SUPPORTS="no"
49468  fi
49469
49470
49471
49472
49473
49474
49475
49476
49477
49478
49479
49480
49481
49482  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49483$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49484  supports=no
49485  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49486
49487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49488$as_echo "$supports" >&6; }
49489  if test "x$supports" = "xyes" ; then
49490    :
49491
49492  else
49493    :
49494    STACK_PROTECTOR_CFLAG=""
49495  fi
49496
49497
49498
49499
49500
49501
49502
49503      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49504      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49505      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49506        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49507      fi
49508      ;;
49509    esac
49510  fi
49511
49512  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49513    if test "x$DEBUG_LEVEL" != xrelease; then
49514      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49515        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49516      fi
49517    fi
49518  fi
49519
49520  # Optimization levels
49521  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49522    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49523
49524    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49525      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49526      C_O_FLAG_HIGHEST_JVM="-xO4"
49527      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49528      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49529      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49530      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49531      C_O_FLAG_DEBUG_JVM=""
49532      C_O_FLAG_NONE="-xregs=no%frameptr"
49533      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49534      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49535      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49536      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49537      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49538      CXX_O_FLAG_DEBUG_JVM=""
49539      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49540      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49541        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49542        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49543      fi
49544    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49545      C_O_FLAG_HIGHEST_JVM="-xO4"
49546      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49547      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49548      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49549      C_O_FLAG_DEBUG=""
49550      C_O_FLAG_DEBUG_JVM=""
49551      C_O_FLAG_NONE=""
49552      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49553      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49554      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49555      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49556      CXX_O_FLAG_DEBUG=""
49557      CXX_O_FLAG_DEBUG_JVM=""
49558      CXX_O_FLAG_NONE=""
49559    fi
49560  else
49561    # The remaining toolchains share opt flags between CC and CXX;
49562    # setup for C and duplicate afterwards.
49563    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49564      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49565        # On MacOSX we optimize for size, something
49566        # we should do for all platforms?
49567        C_O_FLAG_HIGHEST_JVM="-Os"
49568        C_O_FLAG_HIGHEST="-Os"
49569        C_O_FLAG_HI="-Os"
49570        C_O_FLAG_NORM="-Os"
49571        C_O_FLAG_SIZE="-Os"
49572      else
49573        C_O_FLAG_HIGHEST_JVM="-O3"
49574        C_O_FLAG_HIGHEST="-O3"
49575        C_O_FLAG_HI="-O3"
49576        C_O_FLAG_NORM="-O2"
49577        C_O_FLAG_SIZE="-Os"
49578      fi
49579      C_O_FLAG_DEBUG="-O0"
49580      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49581        C_O_FLAG_DEBUG_JVM=""
49582      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49583        C_O_FLAG_DEBUG_JVM="-O0"
49584      fi
49585      C_O_FLAG_NONE="-O0"
49586    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49587      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49588        # On MacOSX we optimize for size, something
49589        # we should do for all platforms?
49590        C_O_FLAG_HIGHEST_JVM="-Os"
49591        C_O_FLAG_HIGHEST="-Os"
49592        C_O_FLAG_HI="-Os"
49593        C_O_FLAG_NORM="-Os"
49594        C_O_FLAG_SIZE="-Os"
49595      else
49596        C_O_FLAG_HIGHEST_JVM="-O3"
49597        C_O_FLAG_HIGHEST="-O3"
49598        C_O_FLAG_HI="-O3"
49599        C_O_FLAG_NORM="-O2"
49600        C_O_FLAG_SIZE="-Os"
49601      fi
49602      C_O_FLAG_DEBUG="-O0"
49603      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49604        C_O_FLAG_DEBUG_JVM=""
49605      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49606        C_O_FLAG_DEBUG_JVM="-O0"
49607      fi
49608      C_O_FLAG_NONE="-O0"
49609    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49610      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49611      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49612      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49613      C_O_FLAG_NORM="-O2"
49614      C_O_FLAG_DEBUG="-qnoopt"
49615      # FIXME: Value below not verified.
49616      C_O_FLAG_DEBUG_JVM=""
49617      C_O_FLAG_NONE="-qnoopt"
49618    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49619      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49620      C_O_FLAG_HIGHEST="-O2"
49621      C_O_FLAG_HI="-O1"
49622      C_O_FLAG_NORM="-O1"
49623      C_O_FLAG_DEBUG="-Od"
49624      C_O_FLAG_DEBUG_JVM=""
49625      C_O_FLAG_NONE="-Od"
49626      C_O_FLAG_SIZE="-Os"
49627    fi
49628    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49629    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49630    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49631    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49632    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49633    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49634    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49635    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49636  fi
49637
49638  # Adjust optimization flags according to debug level.
49639  case $DEBUG_LEVEL in
49640    release )
49641      # no adjustment
49642      ;;
49643    fastdebug )
49644      # Not quite so much optimization
49645      C_O_FLAG_HI="$C_O_FLAG_NORM"
49646      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49647      ;;
49648    slowdebug )
49649      # Disable optimization
49650      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49651      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49652      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49653      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49654      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49655      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49656      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49657      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49658      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49659      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49660      ;;
49661  esac
49662
49663
49664
49665
49666
49667
49668
49669
49670
49671
49672
49673
49674
49675
49676
49677
49678
49679
49680
49681  # Special extras...
49682  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49683    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49684      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49685      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49686    fi
49687    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49688    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49689  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49690    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49691    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49692  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49693    CXXSTD_CXXFLAG="-std=gnu++98"
49694
49695
49696
49697
49698
49699
49700
49701
49702
49703
49704
49705
49706
49707
49708
49709
49710
49711
49712
49713
49714
49715
49716
49717
49718
49719
49720
49721
49722
49723
49724
49725
49726
49727
49728
49729
49730
49731
49732
49733
49734
49735
49736    # Execute function body
49737
49738  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49739$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49740  supports=yes
49741
49742  saved_cxxflags="$CXXFLAGS"
49743  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49744  ac_ext=cpp
49745ac_cpp='$CXXCPP $CPPFLAGS'
49746ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49747ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49748ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49749
49750  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49751/* end confdefs.h.  */
49752int i;
49753_ACEOF
49754if ac_fn_cxx_try_compile "$LINENO"; then :
49755
49756else
49757  supports=no
49758fi
49759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49760  ac_ext=cpp
49761ac_cpp='$CXXCPP $CPPFLAGS'
49762ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49763ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49764ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49765
49766  CXXFLAGS="$saved_cxxflags"
49767
49768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49769$as_echo "$supports" >&6; }
49770  if test "x$supports" = "xyes" ; then
49771    :
49772
49773  else
49774    :
49775    CXXSTD_CXXFLAG=""
49776  fi
49777
49778
49779
49780
49781
49782
49783
49784
49785
49786
49787
49788
49789    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49790    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49791
49792  fi
49793  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49794    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49795    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49796  fi
49797
49798  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49799    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49800    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49801  fi
49802
49803  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49804  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49805  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49806
49807  ###############################################################################
49808  #
49809  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49810  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49811  #
49812
49813  # Setup compiler/platform specific flags into
49814  #    CFLAGS_JDK    - C Compiler flags
49815  #    CXXFLAGS_JDK  - C++ Compiler flags
49816  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49817  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49818    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49819    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49820    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49821    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49822      # Force compatibility with i586 on 32 bit intel platforms.
49823      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49824      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49825    fi
49826    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49827        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49828    case $OPENJDK_TARGET_CPU_ARCH in
49829      arm )
49830        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49831        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49832        ;;
49833      ppc )
49834        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49835        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49836        ;;
49837      * )
49838        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49839        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49840        ;;
49841    esac
49842
49843
49844
49845
49846
49847
49848
49849
49850
49851
49852
49853
49854
49855
49856
49857
49858
49859
49860
49861
49862
49863
49864
49865
49866
49867
49868
49869
49870
49871
49872
49873
49874
49875
49876
49877
49878
49879
49880
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896    # Execute function body
49897
49898  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49899  REFERENCE_VERSION=6
49900
49901  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49902    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49903  fi
49904
49905  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49906    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49907  fi
49908
49909  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49910  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49911
49912  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49913    :
49914
49915  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49916  # runs afoul of the more aggressive versions of these optimisations.
49917  # Notably, value range propagation now assumes that the this pointer of C++
49918  # member functions is non-null.
49919  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
49920        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49921        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
49922$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
49923  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49924  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49925
49926  else
49927    :
49928
49929  fi
49930
49931
49932
49933
49934
49935
49936
49937
49938
49939
49940
49941
49942
49943
49944  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49945    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49946
49947    # Restrict the debug information created by Clang to avoid
49948    # too big object files and speed the build up a little bit
49949    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49950    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49951    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49952      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49953        # Force compatibility with i586 on 32 bit intel platforms.
49954        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49955        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49956      fi
49957      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49958      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49959          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49960      case $OPENJDK_TARGET_CPU_ARCH in
49961        ppc )
49962          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49963          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49964          ;;
49965        * )
49966          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49967          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49968          ;;
49969      esac
49970    fi
49971  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49972    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49973    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49974    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49975      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49976    fi
49977
49978    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49979    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49980  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49981    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49982    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49983    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49984  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49985    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49986        -MD -Zc:wchar_t- -W3 -wd4800 \
49987        -DWIN32_LEAN_AND_MEAN \
49988        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49989        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49990        -DWIN32 -DIAL"
49991    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49992      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49993    else
49994      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
49995    fi
49996    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
49997    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
49998    # studio.
49999    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50000      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50001      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50002      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50003    fi
50004  fi
50005
50006  ###############################################################################
50007
50008  # Adjust flags according to debug level.
50009  case $DEBUG_LEVEL in
50010    fastdebug | slowdebug )
50011      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50012      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50013      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50014      ;;
50015    release )
50016      ;;
50017    * )
50018      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50019      ;;
50020  esac
50021
50022  # Set some common defines. These works for all compilers, but assume
50023  # -D is universally accepted.
50024
50025  # Setup endianness
50026  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50027    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50028    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50029    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50030    #   Note: -Dmacro         is the same as    #define macro 1
50031    #         -Dmacro=        is the same as    #define macro
50032    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50033      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50034    else
50035      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50036    fi
50037  else
50038    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50039    # are defined in the system?
50040    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50041      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50042    else
50043      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50044    fi
50045  fi
50046
50047  # Setup target OS define. Use OS target name but in upper case.
50048  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50049  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50050
50051  # Setup target CPU
50052  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50053      $OPENJDK_TARGET_ADD_LP64 \
50054      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50055
50056  # Setup debug/release defines
50057  if test "x$DEBUG_LEVEL" = xrelease; then
50058    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50059    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50060      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50061    fi
50062  else
50063    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50064  fi
50065
50066  # Set some additional per-OS defines.
50067  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50068    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50069    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50070        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50071  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50072    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50073    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50074        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50075  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50076    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50077    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50078    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50079    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50080        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50081        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50082        -fno-omit-frame-pointer"
50083  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50084    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50085    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50086    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50087        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50088        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50089  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50090    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50091  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50092    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50093    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50094  fi
50095
50096  # Set some additional per-CPU defines.
50097  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50098    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50099  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50100    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50101  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50102    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50103      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50104      # fixes `relocation truncated to fit' error for gcc 4.1.
50105      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50106      # Use ppc64 instructions, but schedule for power5
50107      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50108    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50109      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50110    fi
50111  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50112    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50113      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50114      # Little endian machine uses ELFv2 ABI.
50115      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50116      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50117      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
50118    fi
50119  fi
50120
50121  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50122    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50123  fi
50124
50125  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50126    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50127      # Solaris does not have _LP64=1 in the old build.
50128      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50129      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50130    fi
50131  fi
50132
50133  # Set JVM_CFLAGS warning handling
50134  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50135    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50136        -Wunused-value -Woverloaded-virtual"
50137
50138    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50139
50140
50141
50142
50143
50144
50145
50146
50147
50148
50149
50150
50151
50152
50153
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    # Execute function body
50194
50195  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50196  REFERENCE_VERSION=4.8
50197
50198  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50199    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50200  fi
50201
50202  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50203    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50204  fi
50205
50206  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50207  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50208
50209  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50210    :
50211
50212            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50213            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50214
50215
50216  else
50217    :
50218
50219  fi
50220
50221
50222
50223
50224
50225
50226
50227
50228
50229
50230
50231
50232
50233
50234    fi
50235    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50236      # Non-zero builds have stricter warnings
50237      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50238    else
50239      if test "x$TOOLCHAIN_TYPE" = xclang; then
50240        # Some versions of llvm do not like -Wundef
50241        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50242      fi
50243    fi
50244  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50245    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50246        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50247  fi
50248
50249  # Additional macosx handling
50250  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50251    # Setting these parameters makes it an error to link to macosx APIs that are
50252    # newer than the given OS version and makes the linked binaries compatible
50253    # even if built on a newer version of the OS.
50254    # The expected format is X.Y.Z
50255    MACOSX_VERSION_MIN=10.7.0
50256
50257
50258    # The macro takes the version with no dots, ex: 1070
50259    # Let the flags variables get resolved in make for easier override on make
50260    # command line.
50261    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50262    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50263  fi
50264
50265  # Setup some hard coded includes
50266  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50267      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50268      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50269      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50270      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50271      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50272
50273  # The shared libraries are compiled using the picflag.
50274  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50275      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50276  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50277      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50278
50279  # Executable flags
50280  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50281  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50282
50283
50284
50285
50286
50287
50288  # Setup LDFLAGS et al.
50289  #
50290
50291  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50292    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50293    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50294    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50295    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50296      LDFLAGS_SAFESH="-safeseh"
50297      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50298      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50299      # NOTE: Old build added -machine. Probably not needed.
50300      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50301    else
50302      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50303    fi
50304  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50305      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50306      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50307        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50308        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50309    fi
50310  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50311    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50312    # We have previously set HAS_GNU_HASH if this is the case
50313    if test -n "$HAS_GNU_HASH"; then
50314      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50315      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50316      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50317    fi
50318      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50319        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50320    fi
50321    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50322      # And since we now know that the linker is gnu, then add -z defs, to forbid
50323      # undefined symbols in object files.
50324      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50325      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50326      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50327      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50328      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50329      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50330        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50331      fi
50332      case $DEBUG_LEVEL in
50333        release )
50334          # tell linker to optimize libraries.
50335          # Should this be supplied to the OSS linker as well?
50336          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50337          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50338          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50339          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50340            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50341          fi
50342          ;;
50343        slowdebug )
50344          # Hotspot always let the linker optimize
50345          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50346          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50347            # do relocations at load
50348            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50349            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50350            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50351          fi
50352          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50353            # mark relocations read only
50354            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50355            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50356            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50357          fi
50358          ;;
50359        fastdebug )
50360          # Hotspot always let the linker optimize
50361          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50362          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50363            # mark relocations read only
50364            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50365            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50366            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50367          fi
50368          ;;
50369        * )
50370          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50371          ;;
50372        esac
50373    fi
50374  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50375    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50376    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50377    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50378    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50379    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50380    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50381      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50382    fi
50383  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50384    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50385    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50386    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50387  fi
50388
50389  # Customize LDFLAGS for executables
50390
50391  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50392
50393  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50394    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50395      LDFLAGS_STACK_SIZE=1048576
50396    else
50397      LDFLAGS_STACK_SIZE=327680
50398    fi
50399    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50400  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50401    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50402  fi
50403
50404  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50405
50406  # Customize LDFLAGS for libs
50407  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50408
50409  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50410  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50411    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50412        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50413    JDKLIB_LIBS=""
50414  else
50415    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50416        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50417
50418    if test "xTARGET" = "xTARGET"; then
50419    # On some platforms (mac) the linker warns about non existing -L dirs.
50420    # Add server first if available. Linking aginst client does not always produce the same results.
50421      # Only add client/minimal dir if client/minimal is being built.
50422    # Default to server for other variants.
50423      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50424        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50425      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50426        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50427      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50428        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50429    else
50430        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50431    fi
50432    elif test "xTARGET" = "xBUILD"; then
50433      # When building a buildjdk, it's always only the server variant
50434      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50435          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50436    fi
50437
50438    JDKLIB_LIBS="-ljava -ljvm"
50439    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50440      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50441    fi
50442
50443  fi
50444
50445LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50446
50447  # Set JVM_LIBS (per os)
50448  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50449    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50450  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50451    # FIXME: This hard-coded path is not really proper.
50452    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50453      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50454    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50455      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50456    fi
50457    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50458        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50459  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50460    JVM_LIBS="$JVM_LIBS -lm"
50461  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50462    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50463  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50464    JVM_LIBS="$JVM_LIBS -lm"
50465  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50466    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50467        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50468        wsock32.lib winmm.lib version.lib psapi.lib"
50469    fi
50470
50471  # Set JVM_ASFLAGS
50472  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50473    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50474      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50475    fi
50476  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50477    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50478  fi
50479
50480  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50481
50482
50483
50484
50485
50486
50487
50488
50489
50490
50491
50492
50493
50494
50495
50496  # Special extras...
50497  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50498    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50499      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50500      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50501    fi
50502    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50503    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50504  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50505    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50506    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50507  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50508    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50509
50510
50511
50512
50513
50514
50515
50516
50517
50518
50519
50520
50521
50522
50523
50524
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    # Execute function body
50552
50553  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50554$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50555  supports=yes
50556
50557  saved_cxxflags="$CXXFLAGS"
50558  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50559  ac_ext=cpp
50560ac_cpp='$CXXCPP $CPPFLAGS'
50561ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50562ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50563ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50564
50565  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50566/* end confdefs.h.  */
50567int i;
50568_ACEOF
50569if ac_fn_cxx_try_compile "$LINENO"; then :
50570
50571else
50572  supports=no
50573fi
50574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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  CXXFLAGS="$saved_cxxflags"
50582
50583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50584$as_echo "$supports" >&6; }
50585  if test "x$supports" = "xyes" ; then
50586    :
50587
50588  else
50589    :
50590    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50591  fi
50592
50593
50594
50595
50596
50597
50598
50599
50600
50601
50602
50603
50604    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50605    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50606
50607  fi
50608  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50609    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50610    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50611  fi
50612
50613  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50614    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50615    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50616  fi
50617
50618  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50619  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50620  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50621
50622  ###############################################################################
50623  #
50624  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50625  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50626  #
50627
50628  # Setup compiler/platform specific flags into
50629  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50630  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50631  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50632  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50633    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50634    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50635    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50636    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50637      # Force compatibility with i586 on 32 bit intel platforms.
50638      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50639      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50640    fi
50641    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50642        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50643    case $OPENJDK_BUILD_CPU_ARCH in
50644      arm )
50645        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50646        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50647        ;;
50648      ppc )
50649        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50650        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50651        ;;
50652      * )
50653        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50654        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50655        ;;
50656    esac
50657
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711    # Execute function body
50712
50713  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50714  REFERENCE_VERSION=6
50715
50716  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50717    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50718  fi
50719
50720  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50721    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50722  fi
50723
50724  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50725  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50726
50727  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50728    :
50729
50730  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50731  # runs afoul of the more aggressive versions of these optimisations.
50732  # Notably, value range propagation now assumes that the this pointer of C++
50733  # member functions is non-null.
50734  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50735        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50736        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50737$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50738  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50739  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50740
50741  else
50742    :
50743
50744  fi
50745
50746
50747
50748
50749
50750
50751
50752
50753
50754
50755
50756
50757
50758
50759  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50760    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50761
50762    # Restrict the debug information created by Clang to avoid
50763    # too big object files and speed the build up a little bit
50764    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50765    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50766    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50767      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50768        # Force compatibility with i586 on 32 bit intel platforms.
50769        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50770        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50771      fi
50772      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50773      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50774          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50775      case $OPENJDK_BUILD_CPU_ARCH in
50776        ppc )
50777          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50778          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50779          ;;
50780        * )
50781          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50782          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50783          ;;
50784      esac
50785    fi
50786  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50787    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50788    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50789    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50790      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50791    fi
50792
50793    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50794    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50795  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50796    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50797    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50798    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50799  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50800    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50801        -MD -Zc:wchar_t- -W3 -wd4800 \
50802        -DWIN32_LEAN_AND_MEAN \
50803        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50804        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50805        -DWIN32 -DIAL"
50806    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50807      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50808    else
50809      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50810    fi
50811    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50812    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50813    # studio.
50814    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50815      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50816      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50817      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50818    fi
50819  fi
50820
50821  ###############################################################################
50822
50823  # Adjust flags according to debug level.
50824  case $DEBUG_LEVEL in
50825    fastdebug | slowdebug )
50826      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50827      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50828      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50829      ;;
50830    release )
50831      ;;
50832    * )
50833      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50834      ;;
50835  esac
50836
50837  # Set some common defines. These works for all compilers, but assume
50838  # -D is universally accepted.
50839
50840  # Setup endianness
50841  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50842    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50843    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50844    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50845    #   Note: -Dmacro         is the same as    #define macro 1
50846    #         -Dmacro=        is the same as    #define macro
50847    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50848      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50849    else
50850      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50851    fi
50852  else
50853    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50854    # are defined in the system?
50855    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50856      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50857    else
50858      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50859    fi
50860  fi
50861
50862  # Setup target OS define. Use OS target name but in upper case.
50863  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50864  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50865
50866  # Setup target CPU
50867  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50868      $OPENJDK_BUILD_ADD_LP64 \
50869      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50870
50871  # Setup debug/release defines
50872  if test "x$DEBUG_LEVEL" = xrelease; then
50873    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50874    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50875      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50876    fi
50877  else
50878    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50879  fi
50880
50881  # Set some additional per-OS defines.
50882  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50883    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50884    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50885        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50886  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50887    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50888    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50889        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50890  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50891    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50892    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50893    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50894    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50895        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50896        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50897        -fno-omit-frame-pointer"
50898  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50899    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50900    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50901    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
50902        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50903        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50904  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50905    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50906  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50907    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50908    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50909  fi
50910
50911  # Set some additional per-CPU defines.
50912  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50913    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50914  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50915    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50916  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50917    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50918      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50919      # fixes `relocation truncated to fit' error for gcc 4.1.
50920      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50921      # Use ppc64 instructions, but schedule for power5
50922      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50923    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50924      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50925    fi
50926  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50927    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50928      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50929      # Little endian machine uses ELFv2 ABI.
50930      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50931      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50932      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
50933    fi
50934  fi
50935
50936  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50937    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50938  fi
50939
50940  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50941    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50942      # Solaris does not have _LP64=1 in the old build.
50943      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50944      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50945    fi
50946  fi
50947
50948  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50949  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50950    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50951        -Wunused-value -Woverloaded-virtual"
50952
50953    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50954
50955
50956
50957
50958
50959
50960
50961
50962
50963
50964
50965
50966
50967
50968
50969
50970
50971
50972
50973
50974
50975
50976
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    # Execute function body
51009
51010  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51011  REFERENCE_VERSION=4.8
51012
51013  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51014    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51015  fi
51016
51017  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51018    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51019  fi
51020
51021  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51022  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51023
51024  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51025    :
51026
51027            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51028            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51029
51030
51031  else
51032    :
51033
51034  fi
51035
51036
51037
51038
51039
51040
51041
51042
51043
51044
51045
51046
51047
51048
51049    fi
51050    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51051      # Non-zero builds have stricter warnings
51052      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51053    else
51054      if test "x$TOOLCHAIN_TYPE" = xclang; then
51055        # Some versions of llvm do not like -Wundef
51056        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51057      fi
51058    fi
51059  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51060    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51061        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51062  fi
51063
51064  # Additional macosx handling
51065  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51066    # Setting these parameters makes it an error to link to macosx APIs that are
51067    # newer than the given OS version and makes the linked binaries compatible
51068    # even if built on a newer version of the OS.
51069    # The expected format is X.Y.Z
51070    MACOSX_VERSION_MIN=10.7.0
51071
51072
51073    # The macro takes the version with no dots, ex: 1070
51074    # Let the flags variables get resolved in make for easier override on make
51075    # command line.
51076    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)"
51077    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51078  fi
51079
51080  # Setup some hard coded includes
51081  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51082      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51083      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51084      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51085      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51086      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51087
51088  # The shared libraries are compiled using the picflag.
51089  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51090      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51091  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51092      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51093
51094  # Executable flags
51095  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51096  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51097
51098
51099
51100
51101
51102
51103  # Setup LDFLAGS et al.
51104  #
51105
51106  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51107    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51108    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51109    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51110    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51111      LDFLAGS_SAFESH="-safeseh"
51112      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51113      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51114      # NOTE: Old build added -machine. Probably not needed.
51115      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51116    else
51117      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51118    fi
51119  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51120      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51121      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51122        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51123        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51124    fi
51125  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51126    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51127    # We have previously set HAS_GNU_HASH if this is the case
51128    if test -n "$HAS_GNU_HASH"; then
51129      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51130      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51131      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51132    fi
51133      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51134        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51135    fi
51136    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51137      # And since we now know that the linker is gnu, then add -z defs, to forbid
51138      # undefined symbols in object files.
51139      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51140      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51141      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51142      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51143      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51144      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51145        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51146      fi
51147      case $DEBUG_LEVEL in
51148        release )
51149          # tell linker to optimize libraries.
51150          # Should this be supplied to the OSS linker as well?
51151          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51152          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51153          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51154          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51155            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51156          fi
51157          ;;
51158        slowdebug )
51159          # Hotspot always let the linker optimize
51160          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51161          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51162            # do relocations at load
51163            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51164            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51165            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51166          fi
51167          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51168            # mark relocations read only
51169            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51170            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51171            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51172          fi
51173          ;;
51174        fastdebug )
51175          # Hotspot always let the linker optimize
51176          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51177          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51178            # mark relocations read only
51179            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51180            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51181            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51182          fi
51183          ;;
51184        * )
51185          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51186          ;;
51187        esac
51188    fi
51189  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51190    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51191    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51192    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51193    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51194    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51195    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51196      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51197    fi
51198  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51199    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51200    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51201    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51202  fi
51203
51204  # Customize LDFLAGS for executables
51205
51206  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51207
51208  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51209    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51210      LDFLAGS_STACK_SIZE=1048576
51211    else
51212      LDFLAGS_STACK_SIZE=327680
51213    fi
51214    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51215  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51216    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51217  fi
51218
51219  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51220
51221  # Customize LDFLAGS for libs
51222  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51223
51224  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51225  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51226    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51227        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51228    OPENJDK_BUILD_JDKLIB_LIBS=""
51229  else
51230    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51231        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51232
51233    if test "xBUILD" = "xTARGET"; then
51234    # On some platforms (mac) the linker warns about non existing -L dirs.
51235    # Add server first if available. Linking aginst client does not always produce the same results.
51236      # Only add client/minimal dir if client/minimal is being built.
51237    # Default to server for other variants.
51238      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51239        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51240      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51241        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51242      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51243        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51244    else
51245        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51246    fi
51247    elif test "xBUILD" = "xBUILD"; then
51248      # When building a buildjdk, it's always only the server variant
51249      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51250          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51251    fi
51252
51253    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51254    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51255      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51256    fi
51257
51258  fi
51259
51260OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51261
51262  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51263  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51264    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51265  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51266    # FIXME: This hard-coded path is not really proper.
51267    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51268      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51269    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51270      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51271    fi
51272    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51273        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51274  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51275    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51276  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51277    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51278  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51279    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51280  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51281    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51282        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51283        wsock32.lib winmm.lib version.lib psapi.lib"
51284    fi
51285
51286  # Set OPENJDK_BUILD_JVM_ASFLAGS
51287  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51288    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51289      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51290    fi
51291  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51292    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51293  fi
51294
51295  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51296
51297
51298
51299
51300
51301
51302
51303
51304
51305
51306
51307
51308
51309
51310
51311  # Tests are only ever compiled for TARGET
51312  # Flags for compiling test libraries
51313  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51314  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51315
51316  # Flags for compiling test executables
51317  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51318  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51319
51320
51321
51322
51323
51324
51325  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51326  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51327
51328
51329
51330
51331
51332
51333  # Some Zero and Shark settings.
51334  # ZERO_ARCHFLAG tells the compiler which mode to build for
51335  case "${OPENJDK_TARGET_CPU}" in
51336    s390)
51337      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51338      ;;
51339    *)
51340      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51341  esac
51342
51343
51344
51345
51346
51347
51348
51349
51350
51351
51352
51353
51354
51355
51356
51357
51358
51359
51360
51361
51362
51363
51364
51365
51366
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382
51383
51384    # Execute function body
51385
51386
51387
51388
51389
51390
51391
51392
51393
51394
51395
51396
51397
51398
51399
51400
51401
51402
51403
51404
51405
51406
51407
51408
51409
51410
51411
51412
51413
51414
51415
51416
51417
51418
51419
51420
51421
51422
51423
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433    # Execute function body
51434
51435  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51436$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51437  supports=yes
51438
51439  saved_cflags="$CFLAGS"
51440  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51441  ac_ext=c
51442ac_cpp='$CPP $CPPFLAGS'
51443ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51444ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51445ac_compiler_gnu=$ac_cv_c_compiler_gnu
51446
51447  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51448/* end confdefs.h.  */
51449int i;
51450_ACEOF
51451if ac_fn_c_try_compile "$LINENO"; then :
51452
51453else
51454  supports=no
51455fi
51456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51457  ac_ext=cpp
51458ac_cpp='$CXXCPP $CPPFLAGS'
51459ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51460ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51461ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51462
51463  CFLAGS="$saved_cflags"
51464
51465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51466$as_echo "$supports" >&6; }
51467  if test "x$supports" = "xyes" ; then
51468    :
51469    C_COMP_SUPPORTS="yes"
51470  else
51471    :
51472    C_COMP_SUPPORTS="no"
51473  fi
51474
51475
51476
51477
51478
51479
51480
51481
51482
51483
51484
51485
51486
51487
51488
51489
51490
51491
51492
51493
51494
51495
51496
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533    # Execute function body
51534
51535  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51536$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51537  supports=yes
51538
51539  saved_cxxflags="$CXXFLAGS"
51540  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51541  ac_ext=cpp
51542ac_cpp='$CXXCPP $CPPFLAGS'
51543ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51544ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51545ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51546
51547  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51548/* end confdefs.h.  */
51549int i;
51550_ACEOF
51551if ac_fn_cxx_try_compile "$LINENO"; then :
51552
51553else
51554  supports=no
51555fi
51556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51557  ac_ext=cpp
51558ac_cpp='$CXXCPP $CPPFLAGS'
51559ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51560ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51561ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51562
51563  CXXFLAGS="$saved_cxxflags"
51564
51565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51566$as_echo "$supports" >&6; }
51567  if test "x$supports" = "xyes" ; then
51568    :
51569    CXX_COMP_SUPPORTS="yes"
51570  else
51571    :
51572    CXX_COMP_SUPPORTS="no"
51573  fi
51574
51575
51576
51577
51578
51579
51580
51581
51582
51583
51584
51585
51586
51587  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51588$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51589  supports=no
51590  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51591
51592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51593$as_echo "$supports" >&6; }
51594  if test "x$supports" = "xyes" ; then
51595    :
51596
51597  else
51598    :
51599    ZERO_ARCHFLAG=""
51600  fi
51601
51602
51603
51604
51605
51606
51607
51608
51609  # Check that the compiler supports -mX (or -qX on AIX) flags
51610  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51611
51612
51613
51614
51615
51616
51617
51618
51619
51620
51621
51622
51623
51624
51625
51626
51627
51628
51629
51630
51631
51632
51633
51634
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658    # Execute function body
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675
51676
51677
51678
51679
51680
51681
51682
51683
51684
51685
51686
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705
51706
51707    # Execute function body
51708
51709  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51710$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51711  supports=yes
51712
51713  saved_cflags="$CFLAGS"
51714  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51715  ac_ext=c
51716ac_cpp='$CPP $CPPFLAGS'
51717ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51718ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51719ac_compiler_gnu=$ac_cv_c_compiler_gnu
51720
51721  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51722/* end confdefs.h.  */
51723int i;
51724_ACEOF
51725if ac_fn_c_try_compile "$LINENO"; then :
51726
51727else
51728  supports=no
51729fi
51730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51731  ac_ext=cpp
51732ac_cpp='$CXXCPP $CPPFLAGS'
51733ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51734ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51735ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51736
51737  CFLAGS="$saved_cflags"
51738
51739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51740$as_echo "$supports" >&6; }
51741  if test "x$supports" = "xyes" ; then
51742    :
51743    C_COMP_SUPPORTS="yes"
51744  else
51745    :
51746    C_COMP_SUPPORTS="no"
51747  fi
51748
51749
51750
51751
51752
51753
51754
51755
51756
51757
51758
51759
51760
51761
51762
51763
51764
51765
51766
51767
51768
51769
51770
51771
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    # Execute function body
51808
51809  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51810$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51811  supports=yes
51812
51813  saved_cxxflags="$CXXFLAGS"
51814  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51815  ac_ext=cpp
51816ac_cpp='$CXXCPP $CPPFLAGS'
51817ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51818ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51819ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51820
51821  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51822/* end confdefs.h.  */
51823int i;
51824_ACEOF
51825if ac_fn_cxx_try_compile "$LINENO"; then :
51826
51827else
51828  supports=no
51829fi
51830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51831  ac_ext=cpp
51832ac_cpp='$CXXCPP $CPPFLAGS'
51833ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51834ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51835ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51836
51837  CXXFLAGS="$saved_cxxflags"
51838
51839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51840$as_echo "$supports" >&6; }
51841  if test "x$supports" = "xyes" ; then
51842    :
51843    CXX_COMP_SUPPORTS="yes"
51844  else
51845    :
51846    CXX_COMP_SUPPORTS="no"
51847  fi
51848
51849
51850
51851
51852
51853
51854
51855
51856
51857
51858
51859
51860
51861  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51862$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51863  supports=no
51864  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51865
51866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51867$as_echo "$supports" >&6; }
51868  if test "x$supports" = "xyes" ; then
51869    :
51870    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51871  else
51872    :
51873    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51874  fi
51875
51876
51877
51878
51879
51880
51881
51882
51883  # Check whether --enable-warnings-as-errors was given.
51884if test "${enable_warnings_as_errors+set}" = set; then :
51885  enableval=$enable_warnings_as_errors;
51886fi
51887
51888
51889  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51890$as_echo_n "checking if native warnings are errors... " >&6; }
51891  if test "x$enable_warnings_as_errors" = "xyes"; then
51892    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51893$as_echo "yes (explicitely set)" >&6; }
51894    WARNINGS_AS_ERRORS=true
51895  elif test "x$enable_warnings_as_errors" = "xno"; then
51896    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51897$as_echo "no" >&6; }
51898    WARNINGS_AS_ERRORS=false
51899  elif test "x$enable_warnings_as_errors" = "x"; then
51900    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51901$as_echo "yes (default)" >&6; }
51902    WARNINGS_AS_ERRORS=true
51903  else
51904    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51905  fi
51906
51907  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51908    # Set legacy hotspot variable
51909    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51910  else
51911    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51912  fi
51913
51914
51915
51916
51917  case "${TOOLCHAIN_TYPE}" in
51918    microsoft)
51919      DISABLE_WARNING_PREFIX="-wd"
51920      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51921      ;;
51922    solstudio)
51923      DISABLE_WARNING_PREFIX="-erroff="
51924      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51925      ;;
51926    gcc)
51927      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946
51947
51948
51949
51950
51951
51952
51953
51954
51955
51956
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975    # Execute function body
51976
51977
51978
51979
51980
51981
51982
51983
51984
51985
51986
51987
51988
51989
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999
52000
52001
52002
52003
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016
52017
52018
52019
52020
52021
52022
52023
52024    # Execute function body
52025
52026  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52027$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52028  supports=yes
52029
52030  saved_cflags="$CFLAGS"
52031  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52032  ac_ext=c
52033ac_cpp='$CPP $CPPFLAGS'
52034ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52035ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52036ac_compiler_gnu=$ac_cv_c_compiler_gnu
52037
52038  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52039/* end confdefs.h.  */
52040int i;
52041_ACEOF
52042if ac_fn_c_try_compile "$LINENO"; then :
52043
52044else
52045  supports=no
52046fi
52047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52048  ac_ext=cpp
52049ac_cpp='$CXXCPP $CPPFLAGS'
52050ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52051ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52052ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52053
52054  CFLAGS="$saved_cflags"
52055
52056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52057$as_echo "$supports" >&6; }
52058  if test "x$supports" = "xyes" ; then
52059    :
52060    C_COMP_SUPPORTS="yes"
52061  else
52062    :
52063    C_COMP_SUPPORTS="no"
52064  fi
52065
52066
52067
52068
52069
52070
52071
52072
52073
52074
52075
52076
52077
52078
52079
52080
52081
52082
52083
52084
52085
52086
52087
52088
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    # Execute function body
52125
52126  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52127$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52128  supports=yes
52129
52130  saved_cxxflags="$CXXFLAGS"
52131  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52132  ac_ext=cpp
52133ac_cpp='$CXXCPP $CPPFLAGS'
52134ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52135ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52136ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52137
52138  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52139/* end confdefs.h.  */
52140int i;
52141_ACEOF
52142if ac_fn_cxx_try_compile "$LINENO"; then :
52143
52144else
52145  supports=no
52146fi
52147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52148  ac_ext=cpp
52149ac_cpp='$CXXCPP $CPPFLAGS'
52150ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52151ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52152ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52153
52154  CXXFLAGS="$saved_cxxflags"
52155
52156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52157$as_echo "$supports" >&6; }
52158  if test "x$supports" = "xyes" ; then
52159    :
52160    CXX_COMP_SUPPORTS="yes"
52161  else
52162    :
52163    CXX_COMP_SUPPORTS="no"
52164  fi
52165
52166
52167
52168
52169
52170
52171
52172
52173
52174
52175
52176
52177
52178  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52179$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52180  supports=no
52181  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52182
52183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52184$as_echo "$supports" >&6; }
52185  if test "x$supports" = "xyes" ; then
52186    :
52187    GCC_CAN_DISABLE_WARNINGS=true
52188  else
52189    :
52190    GCC_CAN_DISABLE_WARNINGS=false
52191
52192  fi
52193
52194
52195
52196
52197
52198
52199      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52200        DISABLE_WARNING_PREFIX="-Wno-"
52201      else
52202        DISABLE_WARNING_PREFIX=
52203      fi
52204      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52205      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52206      # CFLAGS since any target specific flags will likely not work with the
52207      # build compiler
52208      CC_OLD="$CC"
52209      CXX_OLD="$CXX"
52210      CC="$BUILD_CC"
52211      CXX="$BUILD_CXX"
52212      CFLAGS_OLD="$CFLAGS"
52213      CFLAGS=""
52214
52215
52216
52217
52218
52219
52220
52221
52222
52223
52224
52225
52226
52227
52228
52229
52230
52231
52232
52233
52234
52235
52236
52237
52238
52239
52240
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261    # Execute function body
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278
52279
52280
52281
52282
52283
52284
52285
52286
52287
52288
52289
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303
52304
52305
52306
52307
52308
52309
52310    # Execute function body
52311
52312  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52313$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52314  supports=yes
52315
52316  saved_cflags="$CFLAGS"
52317  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52318  ac_ext=c
52319ac_cpp='$CPP $CPPFLAGS'
52320ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52321ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52322ac_compiler_gnu=$ac_cv_c_compiler_gnu
52323
52324  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52325/* end confdefs.h.  */
52326int i;
52327_ACEOF
52328if ac_fn_c_try_compile "$LINENO"; then :
52329
52330else
52331  supports=no
52332fi
52333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52334  ac_ext=cpp
52335ac_cpp='$CXXCPP $CPPFLAGS'
52336ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52337ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52338ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52339
52340  CFLAGS="$saved_cflags"
52341
52342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52343$as_echo "$supports" >&6; }
52344  if test "x$supports" = "xyes" ; then
52345    :
52346    C_COMP_SUPPORTS="yes"
52347  else
52348    :
52349    C_COMP_SUPPORTS="no"
52350  fi
52351
52352
52353
52354
52355
52356
52357
52358
52359
52360
52361
52362
52363
52364
52365
52366
52367
52368
52369
52370
52371
52372
52373
52374
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    # Execute function body
52411
52412  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52413$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52414  supports=yes
52415
52416  saved_cxxflags="$CXXFLAGS"
52417  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52418  ac_ext=cpp
52419ac_cpp='$CXXCPP $CPPFLAGS'
52420ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52421ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52422ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52423
52424  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52425/* end confdefs.h.  */
52426int i;
52427_ACEOF
52428if ac_fn_cxx_try_compile "$LINENO"; then :
52429
52430else
52431  supports=no
52432fi
52433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52434  ac_ext=cpp
52435ac_cpp='$CXXCPP $CPPFLAGS'
52436ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52437ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52438ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52439
52440  CXXFLAGS="$saved_cxxflags"
52441
52442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52443$as_echo "$supports" >&6; }
52444  if test "x$supports" = "xyes" ; then
52445    :
52446    CXX_COMP_SUPPORTS="yes"
52447  else
52448    :
52449    CXX_COMP_SUPPORTS="no"
52450  fi
52451
52452
52453
52454
52455
52456
52457
52458
52459
52460
52461
52462
52463
52464  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52465$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52466  supports=no
52467  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52468
52469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52470$as_echo "$supports" >&6; }
52471  if test "x$supports" = "xyes" ; then
52472    :
52473    BUILD_CC_CAN_DISABLE_WARNINGS=true
52474  else
52475    :
52476    BUILD_CC_CAN_DISABLE_WARNINGS=false
52477
52478  fi
52479
52480
52481
52482
52483
52484
52485      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52486        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52487      else
52488        BUILD_CC_DISABLE_WARNING_PREFIX=
52489      fi
52490      CC="$CC_OLD"
52491      CXX="$CXX_OLD"
52492      CFLAGS="$CFLAGS_OLD"
52493      ;;
52494    clang)
52495      DISABLE_WARNING_PREFIX="-Wno-"
52496      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52497      ;;
52498    xlc)
52499      DISABLE_WARNING_PREFIX="-qsuppress="
52500      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52501      ;;
52502  esac
52503
52504
52505
52506
52507
52508# Setup debug symbols (need objcopy from the toolchain for that)
52509
52510  #
52511  # NATIVE_DEBUG_SYMBOLS
52512  # This must be done after the toolchain is setup, since we're looking at objcopy.
52513  #
52514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52515$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52516
52517# Check whether --with-native-debug-symbols was given.
52518if test "${with_native_debug_symbols+set}" = set; then :
52519  withval=$with_native_debug_symbols;
52520        if test "x$OPENJDK_TARGET_OS" = xaix; then
52521          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52522            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52523          fi
52524        fi
52525
52526else
52527
52528        if test "x$OPENJDK_TARGET_OS" = xaix; then
52529          # AIX doesn't support 'zipped' so use 'internal' as default
52530          with_native_debug_symbols="internal"
52531        else
52532          if test "x$STATIC_BUILD" = xtrue; then
52533            with_native_debug_symbols="none"
52534          else
52535            with_native_debug_symbols="zipped"
52536          fi
52537        fi
52538
52539fi
52540
52541  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52543$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52544
52545  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52546
52547    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52548      if test "x$OBJCOPY" = x; then
52549        # enabling of enable-debug-symbols and can't find objcopy
52550        # this is an error
52551        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52552      fi
52553    fi
52554
52555    COMPILE_WITH_DEBUG_SYMBOLS=true
52556    COPY_DEBUG_SYMBOLS=true
52557    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52558
52559    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52560    DEBUG_BINARIES=false
52561    STRIP_POLICY=min_strip
52562
52563  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52564    COMPILE_WITH_DEBUG_SYMBOLS=false
52565    COPY_DEBUG_SYMBOLS=false
52566    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52567
52568    DEBUG_BINARIES=false
52569    STRIP_POLICY=no_strip
52570  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52571    COMPILE_WITH_DEBUG_SYMBOLS=true
52572    COPY_DEBUG_SYMBOLS=false
52573    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52574
52575    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52576    DEBUG_BINARIES=true
52577    STRIP_POLICY=no_strip
52578    STRIP=""
52579
52580  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52581
52582    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52583      if test "x$OBJCOPY" = x; then
52584        # enabling of enable-debug-symbols and can't find objcopy
52585        # this is an error
52586        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52587      fi
52588    fi
52589
52590    COMPILE_WITH_DEBUG_SYMBOLS=true
52591    COPY_DEBUG_SYMBOLS=true
52592    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52593
52594    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52595    DEBUG_BINARIES=false
52596    STRIP_POLICY=min_strip
52597  else
52598    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52599  fi
52600
52601  # --enable-debug-symbols is deprecated.
52602  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52603
52604  # Check whether --enable-debug-symbols was given.
52605if test "${enable_debug_symbols+set}" = set; then :
52606  enableval=$enable_debug_symbols;
52607fi
52608
52609  if test "x$enable_debug_symbols" != x; then
52610    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52611$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52612
52613    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52614      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52615$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52616    fi
52617
52618  fi
52619
52620
52621  # --enable-zip-debug-info is deprecated.
52622  # Please use --with-native-debug-symbols=zipped .
52623
52624  # Check whether --enable-zip-debug-info was given.
52625if test "${enable_zip_debug_info+set}" = set; then :
52626  enableval=$enable_zip_debug_info;
52627fi
52628
52629  if test "x$enable_zip_debug_info" != x; then
52630    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52631$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52632
52633    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52634      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52635$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52636    fi
52637
52638  fi
52639
52640
52641
52642
52643
52644
52645  # Legacy values
52646
52647
52648
52649
52650  # Check whether --enable-native-coverage was given.
52651if test "${enable_native_coverage+set}" = set; then :
52652  enableval=$enable_native_coverage;
52653fi
52654
52655  GCOV_ENABLED="false"
52656  if test "x$enable_native_coverage" = "xyes"; then
52657    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52658      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52659$as_echo_n "checking if native coverage is enabled... " >&6; }
52660      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52661$as_echo "yes" >&6; }
52662      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52663      GCOV_LDFLAGS="-fprofile-arcs"
52664      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52665      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52666      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52667      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52668      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52669      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52670      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52671      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52672      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52673      GCOV_ENABLED="true"
52674    else
52675      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52676    fi
52677  elif test "x$enable_native_coverage" = "xno"; then
52678    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52679$as_echo_n "checking if native coverage is enabled... " >&6; }
52680    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52681$as_echo "no" >&6; }
52682  elif test "x$enable_native_coverage" != "x"; then
52683    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52684  fi
52685
52686
52687
52688
52689# Need toolchain to setup dtrace
52690
52691  # Test for dtrace dependencies
52692  # Check whether --enable-dtrace was given.
52693if test "${enable_dtrace+set}" = set; then :
52694  enableval=$enable_dtrace;
52695fi
52696
52697
52698  DTRACE_DEP_MISSING=false
52699
52700  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52701$as_echo_n "checking for dtrace tool... " >&6; }
52702  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52703    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52704$as_echo "$DTRACE" >&6; }
52705  else
52706    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52707$as_echo "not found, cannot build dtrace" >&6; }
52708    DTRACE_DEP_MISSING=true
52709  fi
52710
52711  for ac_header in sys/sdt.h
52712do :
52713  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52714if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52715  cat >>confdefs.h <<_ACEOF
52716#define HAVE_SYS_SDT_H 1
52717_ACEOF
52718 DTRACE_HEADERS_OK=yes
52719else
52720  DTRACE_HEADERS_OK=no
52721fi
52722
52723done
52724
52725  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52726    DTRACE_DEP_MISSING=true
52727  fi
52728
52729  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52730$as_echo_n "checking if dtrace should be built... " >&6; }
52731  if test "x$enable_dtrace" = "xyes"; then
52732    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52733      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52734$as_echo "no, missing dependencies" >&6; }
52735
52736  # Print a helpful message on how to acquire the necessary build dependency.
52737  # dtrace is the help tag: freetype, cups, alsa etc
52738  MISSING_DEPENDENCY=dtrace
52739
52740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52741    cygwin_help $MISSING_DEPENDENCY
52742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52743    msys_help $MISSING_DEPENDENCY
52744  else
52745    PKGHANDLER_COMMAND=
52746
52747    case $PKGHANDLER in
52748      apt-get)
52749        apt_help     $MISSING_DEPENDENCY ;;
52750      yum)
52751        yum_help     $MISSING_DEPENDENCY ;;
52752      port)
52753        port_help    $MISSING_DEPENDENCY ;;
52754      pkgutil)
52755        pkgutil_help $MISSING_DEPENDENCY ;;
52756      pkgadd)
52757        pkgadd_help  $MISSING_DEPENDENCY ;;
52758    esac
52759
52760    if test "x$PKGHANDLER_COMMAND" != x; then
52761      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52762    fi
52763  fi
52764
52765      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52766    else
52767      INCLUDE_DTRACE=true
52768      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52769$as_echo "yes, forced" >&6; }
52770    fi
52771  elif test "x$enable_dtrace" = "xno"; then
52772    INCLUDE_DTRACE=false
52773    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52774$as_echo "no, forced" >&6; }
52775  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52776    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52777      INCLUDE_DTRACE=false
52778      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52779$as_echo "no, missing dependencies" >&6; }
52780    else
52781      INCLUDE_DTRACE=true
52782      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52783$as_echo "yes, dependencies present" >&6; }
52784    fi
52785  else
52786    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52787  fi
52788
52789
52790
52791  # The user can in some cases supply additional jvm features. For the custom
52792  # variant, this defines the entire variant.
52793
52794# Check whether --with-jvm-features was given.
52795if test "${with_jvm_features+set}" = set; then :
52796  withval=$with_jvm_features;
52797fi
52798
52799  if test "x$with_jvm_features" != x; then
52800    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52801$as_echo_n "checking additional JVM features... " >&6; }
52802    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52804$as_echo "$JVM_FEATURES" >&6; }
52805  fi
52806
52807  # Verify that dependencies are met for explicitly set features.
52808  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52809    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52810  fi
52811
52812  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52813    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52814  fi
52815
52816  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
52817    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
52818  fi
52819
52820  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52821    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52822  fi
52823
52824  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52825    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52826  fi
52827
52828  # Turn on additional features based on other parts of configure
52829  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52830    JVM_FEATURES="$JVM_FEATURES dtrace"
52831  else
52832    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52833      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52834    fi
52835  fi
52836
52837  if test "x$STATIC_BUILD" = "xtrue"; then
52838    JVM_FEATURES="$JVM_FEATURES static-build"
52839  else
52840    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52841      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52842    fi
52843  fi
52844
52845  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52846    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52847      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52848    fi
52849  fi
52850
52851  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52852    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52853      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52854    fi
52855  fi
52856
52857  # Only enable jvmci on x86_64, sparcv9 and aarch64.
52858  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52859      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52860      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52861    JVM_FEATURES_jvmci="jvmci"
52862  else
52863    JVM_FEATURES_jvmci=""
52864  fi
52865
52866  # All variants but minimal (and custom) get these features
52867  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52868
52869  # Enable features depending on variant.
52870  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52871  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52872  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52873  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52874  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52875  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52876  JVM_FEATURES_custom="$JVM_FEATURES"
52877
52878
52879
52880
52881
52882
52883
52884
52885
52886  # Used for verification of Makefiles by check-jvm-feature
52887
52888
52889  # We don't support --with-jvm-interpreter anymore, use zero instead.
52890
52891
52892# Check whether --with-jvm-interpreter was given.
52893if test "${with_jvm_interpreter+set}" = set; then :
52894  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52895$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52896fi
52897
52898
52899
52900
52901  # Check whether --enable-hotspot-gtest was given.
52902if test "${enable_hotspot_gtest+set}" = set; then :
52903  enableval=$enable_hotspot_gtest;
52904fi
52905
52906
52907  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52908    GTEST_DIR_EXISTS="true"
52909  else
52910    GTEST_DIR_EXISTS="false"
52911  fi
52912
52913  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52914$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52915  if test "x$enable_hotspot_gtest" = "xyes"; then
52916    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52917      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52918$as_echo "yes, forced" >&6; }
52919      BUILD_GTEST="true"
52920    else
52921      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52922    fi
52923  elif test "x$enable_hotspot_gtest" = "xno"; then
52924    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52925$as_echo "no, forced" >&6; }
52926    BUILD_GTEST="false"
52927  elif test "x$enable_hotspot_gtest" = "x"; then
52928    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
52929      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52930$as_echo "yes" >&6; }
52931      BUILD_GTEST="true"
52932    else
52933      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52934$as_echo "no" >&6; }
52935      BUILD_GTEST="false"
52936    fi
52937  else
52938    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52939  fi
52940
52941
52942
52943
52944###############################################################################
52945#
52946# Check dependencies for external and internal libraries.
52947#
52948###############################################################################
52949
52950# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52951
52952  # When using cygwin or msys, we need a wrapper binary that renames
52953  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52954  # @files and rewrites these too! This wrapper binary is
52955  # called fixpath.
52956  FIXPATH=
52957  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52958    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52959$as_echo_n "checking if fixpath can be created... " >&6; }
52960    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52961    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52962    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52963    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52964      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52965      FIXPATH="$FIXPATH_BIN -c"
52966    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52967      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52968      # @ was chosen as separator to minimize risk of other tools messing around with it
52969      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52970          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52971      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52972      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52973    fi
52974    FIXPATH_SRC_W="$FIXPATH_SRC"
52975    FIXPATH_BIN_W="$FIXPATH_BIN"
52976
52977  unix_path="$FIXPATH_SRC_W"
52978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52979    windows_path=`$CYGPATH -m "$unix_path"`
52980    FIXPATH_SRC_W="$windows_path"
52981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52982    windows_path=`cmd //c echo $unix_path`
52983    FIXPATH_SRC_W="$windows_path"
52984  fi
52985
52986
52987  unix_path="$FIXPATH_BIN_W"
52988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52989    windows_path=`$CYGPATH -m "$unix_path"`
52990    FIXPATH_BIN_W="$windows_path"
52991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52992    windows_path=`cmd //c echo $unix_path`
52993    FIXPATH_BIN_W="$windows_path"
52994  fi
52995
52996    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52997    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52998    cd $FIXPATH_DIR
52999    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53000    cd $CURDIR
53001
53002    if test ! -x $FIXPATH_BIN; then
53003      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53004$as_echo "no" >&6; }
53005      cat $FIXPATH_DIR/fixpath1.log
53006      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53007    fi
53008    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53009$as_echo "yes" >&6; }
53010    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53011$as_echo_n "checking if fixpath.exe works... " >&6; }
53012    cd $FIXPATH_DIR
53013    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53014        > $FIXPATH_DIR/fixpath2.log 2>&1
53015    cd $CURDIR
53016    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53017      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53018$as_echo "no" >&6; }
53019      cat $FIXPATH_DIR/fixpath2.log
53020      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53021    fi
53022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53023$as_echo "yes" >&6; }
53024
53025    FIXPATH_DETACH_FLAG="--detach"
53026  fi
53027
53028
53029
53030
53031
53032
53033  # Check if X11 is needed
53034  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53035    # No X11 support on windows or macosx
53036    NEEDS_LIB_X11=false
53037  else
53038    # All other instances need X11, even if building headless only, libawt still
53039    # needs X11 headers.
53040    NEEDS_LIB_X11=true
53041  fi
53042
53043  # Check if cups is needed
53044  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53045    # Windows have a separate print system
53046    NEEDS_LIB_CUPS=false
53047  else
53048    NEEDS_LIB_CUPS=true
53049  fi
53050
53051  # A custom hook may have set this already
53052  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53053    NEEDS_LIB_FREETYPE=true
53054  fi
53055
53056  # Check if alsa is needed
53057  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53058    NEEDS_LIB_ALSA=true
53059  else
53060    NEEDS_LIB_ALSA=false
53061  fi
53062
53063  # Check if ffi is needed
53064  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53065    NEEDS_LIB_FFI=true
53066  else
53067    NEEDS_LIB_FFI=false
53068  fi
53069
53070
53071  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53072  # dynamic build is configured on command line.
53073
53074# Check whether --with-stdc++lib was given.
53075if test "${with_stdc__lib+set}" = set; then :
53076  withval=$with_stdc__lib;
53077        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53078                && test "x$with_stdc__lib" != xdefault; then
53079          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53080        fi
53081
53082else
53083  with_stdc__lib=default
53084
53085fi
53086
53087
53088  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53089    # Test if stdc++ can be linked statically.
53090    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53091$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53092    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53093    ac_ext=cpp
53094ac_cpp='$CXXCPP $CPPFLAGS'
53095ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53096ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53097ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53098
53099    OLD_LIBS="$LIBS"
53100    LIBS="$STATIC_STDCXX_FLAGS"
53101    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53102/* end confdefs.h.  */
53103
53104int
53105main ()
53106{
53107return 0;
53108  ;
53109  return 0;
53110}
53111_ACEOF
53112if ac_fn_cxx_try_link "$LINENO"; then :
53113  has_static_libstdcxx=yes
53114else
53115  has_static_libstdcxx=no
53116fi
53117rm -f core conftest.err conftest.$ac_objext \
53118    conftest$ac_exeext conftest.$ac_ext
53119    LIBS="$OLD_LIBS"
53120    ac_ext=cpp
53121ac_cpp='$CXXCPP $CPPFLAGS'
53122ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53123ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53124ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53125
53126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53127$as_echo "$has_static_libstdcxx" >&6; }
53128
53129    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53130      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53131    fi
53132
53133    # If dynamic was requested, it's available since it would fail above otherwise.
53134    # If dynamic wasn't requested, go with static unless it isn't available.
53135    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53136$as_echo_n "checking how to link with libstdc++... " >&6; }
53137    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53138        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53139      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53140$as_echo "dynamic" >&6; }
53141    else
53142      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53143      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53144      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53145      # just use the same setting as for the TARGET toolchain.
53146      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53147      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53148$as_echo "static" >&6; }
53149    fi
53150  fi
53151
53152  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53153  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53154    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53155  fi
53156
53157
53158
53159  # Setup Windows runtime dlls
53160  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53161
53162
53163# Check whether --with-msvcr-dll was given.
53164if test "${with_msvcr_dll+set}" = set; then :
53165  withval=$with_msvcr_dll;
53166fi
53167
53168
53169  if test "x$with_msvcr_dll" != x; then
53170    # If given explicitely by user, do not probe. If not present, fail directly.
53171
53172  DLL_NAME="$MSVCR_NAME"
53173  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53174  METHOD="--with-msvcr-dll"
53175  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53176    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53177$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53178
53179    # Need to check if the found msvcr is correct architecture
53180    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53181$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53182    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53183    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53184      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53185      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53186      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53187        CORRECT_MSVCR_ARCH="PE32 executable"
53188      else
53189        CORRECT_MSVCR_ARCH="PE32+ executable"
53190      fi
53191    else
53192      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53193        CORRECT_MSVCR_ARCH=386
53194      else
53195        CORRECT_MSVCR_ARCH=x86-64
53196      fi
53197    fi
53198    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53199      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53200$as_echo "ok" >&6; }
53201      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53202
53203  # Only process if variable expands to non-empty
53204
53205  if test "x$MSVC_DLL" != x; then
53206    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53207
53208  # Input might be given as Windows format, start by converting to
53209  # unix format.
53210  path="$MSVC_DLL"
53211  new_path=`$CYGPATH -u "$path"`
53212
53213  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53214  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53215  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53216  # "foo.exe" is OK but "foo" is an error.
53217  #
53218  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53219  # It is also a way to make sure we got the proper file name for the real test later on.
53220  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53221  if test "x$test_shortpath" = x; then
53222    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53223$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53224    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53225  fi
53226
53227  # Call helper function which possibly converts this using DOS-style short mode.
53228  # If so, the updated path is stored in $new_path.
53229
53230  input_path="$new_path"
53231  # Check if we need to convert this using DOS-style short mode. If the path
53232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53233  # take no chances and rewrite it.
53234  # Note: m4 eats our [], so we need to use [ and ] instead.
53235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53236  if test "x$has_forbidden_chars" != x; then
53237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53238    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53239    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53240    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53241      # Going to short mode and back again did indeed matter. Since short mode is
53242      # case insensitive, let's make it lowercase to improve readability.
53243      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53244      # Now convert it back to Unix-style (cygpath)
53245      input_path=`$CYGPATH -u "$shortmode_path"`
53246      new_path="$input_path"
53247    fi
53248  fi
53249
53250  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53251  if test "x$test_cygdrive_prefix" = x; then
53252    # As a simple fix, exclude /usr/bin since it's not a real path.
53253    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53254      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53255      # a path prefixed by /cygdrive for fixpath to work.
53256      new_path="$CYGWIN_ROOT_PATH$input_path"
53257    fi
53258  fi
53259
53260
53261  if test "x$path" != "x$new_path"; then
53262    MSVC_DLL="$new_path"
53263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53264$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53265  fi
53266
53267    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53268
53269  path="$MSVC_DLL"
53270  has_colon=`$ECHO $path | $GREP ^.:`
53271  new_path="$path"
53272  if test "x$has_colon" = x; then
53273    # Not in mixed or Windows style, start by that.
53274    new_path=`cmd //c echo $path`
53275  fi
53276
53277
53278  input_path="$new_path"
53279  # Check if we need to convert this using DOS-style short mode. If the path
53280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53281  # take no chances and rewrite it.
53282  # Note: m4 eats our [], so we need to use [ and ] instead.
53283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53284  if test "x$has_forbidden_chars" != x; then
53285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53286    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53287  fi
53288
53289
53290  windows_path="$new_path"
53291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53292    unix_path=`$CYGPATH -u "$windows_path"`
53293    new_path="$unix_path"
53294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53296    new_path="$unix_path"
53297  fi
53298
53299  if test "x$path" != "x$new_path"; then
53300    MSVC_DLL="$new_path"
53301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53302$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53303  fi
53304
53305  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53306  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53307
53308    else
53309      # We're on a unix platform. Hooray! :)
53310      path="$MSVC_DLL"
53311      has_space=`$ECHO "$path" | $GREP " "`
53312      if test "x$has_space" != x; then
53313        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53314$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53315        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53316      fi
53317
53318      # Use eval to expand a potential ~
53319      eval path="$path"
53320      if test ! -f "$path" && test ! -d "$path"; then
53321        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53322      fi
53323
53324      if test -d "$path"; then
53325        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53326      else
53327        dir="`$DIRNAME "$path"`"
53328        base="`$BASENAME "$path"`"
53329        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53330      fi
53331    fi
53332  fi
53333
53334      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53335$as_echo_n "checking for $DLL_NAME... " >&6; }
53336      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53337$as_echo "$MSVC_DLL" >&6; }
53338    else
53339      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53340$as_echo "incorrect, ignoring" >&6; }
53341      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53342$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53343    fi
53344  fi
53345
53346    if test "x$MSVC_DLL" = x; then
53347      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53348    fi
53349    MSVCR_DLL="$MSVC_DLL"
53350  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53351
53352  DLL_NAME="$MSVCR_NAME"
53353  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53354  METHOD="devkit"
53355  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53356    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53357$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53358
53359    # Need to check if the found msvcr is correct architecture
53360    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53361$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53362    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53363    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53364      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53365      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53366      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53367        CORRECT_MSVCR_ARCH="PE32 executable"
53368      else
53369        CORRECT_MSVCR_ARCH="PE32+ executable"
53370      fi
53371    else
53372      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53373        CORRECT_MSVCR_ARCH=386
53374      else
53375        CORRECT_MSVCR_ARCH=x86-64
53376      fi
53377    fi
53378    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53379      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53380$as_echo "ok" >&6; }
53381      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53382
53383  # Only process if variable expands to non-empty
53384
53385  if test "x$MSVC_DLL" != x; then
53386    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53387
53388  # Input might be given as Windows format, start by converting to
53389  # unix format.
53390  path="$MSVC_DLL"
53391  new_path=`$CYGPATH -u "$path"`
53392
53393  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53394  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53395  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53396  # "foo.exe" is OK but "foo" is an error.
53397  #
53398  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53399  # It is also a way to make sure we got the proper file name for the real test later on.
53400  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53401  if test "x$test_shortpath" = x; then
53402    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53403$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53404    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53405  fi
53406
53407  # Call helper function which possibly converts this using DOS-style short mode.
53408  # If so, the updated path is stored in $new_path.
53409
53410  input_path="$new_path"
53411  # Check if we need to convert this using DOS-style short mode. If the path
53412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53413  # take no chances and rewrite it.
53414  # Note: m4 eats our [], so we need to use [ and ] instead.
53415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53416  if test "x$has_forbidden_chars" != x; then
53417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53418    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53419    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53420    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53421      # Going to short mode and back again did indeed matter. Since short mode is
53422      # case insensitive, let's make it lowercase to improve readability.
53423      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53424      # Now convert it back to Unix-style (cygpath)
53425      input_path=`$CYGPATH -u "$shortmode_path"`
53426      new_path="$input_path"
53427    fi
53428  fi
53429
53430  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53431  if test "x$test_cygdrive_prefix" = x; then
53432    # As a simple fix, exclude /usr/bin since it's not a real path.
53433    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53434      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53435      # a path prefixed by /cygdrive for fixpath to work.
53436      new_path="$CYGWIN_ROOT_PATH$input_path"
53437    fi
53438  fi
53439
53440
53441  if test "x$path" != "x$new_path"; then
53442    MSVC_DLL="$new_path"
53443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53444$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53445  fi
53446
53447    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53448
53449  path="$MSVC_DLL"
53450  has_colon=`$ECHO $path | $GREP ^.:`
53451  new_path="$path"
53452  if test "x$has_colon" = x; then
53453    # Not in mixed or Windows style, start by that.
53454    new_path=`cmd //c echo $path`
53455  fi
53456
53457
53458  input_path="$new_path"
53459  # Check if we need to convert this using DOS-style short mode. If the path
53460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53461  # take no chances and rewrite it.
53462  # Note: m4 eats our [], so we need to use [ and ] instead.
53463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53464  if test "x$has_forbidden_chars" != x; then
53465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53466    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53467  fi
53468
53469
53470  windows_path="$new_path"
53471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53472    unix_path=`$CYGPATH -u "$windows_path"`
53473    new_path="$unix_path"
53474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53476    new_path="$unix_path"
53477  fi
53478
53479  if test "x$path" != "x$new_path"; then
53480    MSVC_DLL="$new_path"
53481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53482$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53483  fi
53484
53485  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53486  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53487
53488    else
53489      # We're on a unix platform. Hooray! :)
53490      path="$MSVC_DLL"
53491      has_space=`$ECHO "$path" | $GREP " "`
53492      if test "x$has_space" != x; then
53493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53494$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53495        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53496      fi
53497
53498      # Use eval to expand a potential ~
53499      eval path="$path"
53500      if test ! -f "$path" && test ! -d "$path"; then
53501        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53502      fi
53503
53504      if test -d "$path"; then
53505        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53506      else
53507        dir="`$DIRNAME "$path"`"
53508        base="`$BASENAME "$path"`"
53509        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53510      fi
53511    fi
53512  fi
53513
53514      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53515$as_echo_n "checking for $DLL_NAME... " >&6; }
53516      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53517$as_echo "$MSVC_DLL" >&6; }
53518    else
53519      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53520$as_echo "incorrect, ignoring" >&6; }
53521      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53522$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53523    fi
53524  fi
53525
53526    if test "x$MSVC_DLL" = x; then
53527      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53528    fi
53529    MSVCR_DLL="$MSVC_DLL"
53530  else
53531
53532  DLL_NAME="${MSVCR_NAME}"
53533  MSVC_DLL=
53534
53535  if test "x$MSVC_DLL" = x; then
53536    # Probe: Using well-known location from Visual Studio 10.0
53537    if test "x$VCINSTALLDIR" != x; then
53538      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53539
53540  windows_path="$CYGWIN_VC_INSTALL_DIR"
53541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53542    unix_path=`$CYGPATH -u "$windows_path"`
53543    CYGWIN_VC_INSTALL_DIR="$unix_path"
53544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53546    CYGWIN_VC_INSTALL_DIR="$unix_path"
53547  fi
53548
53549      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53550        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53551      else
53552        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53553      fi
53554      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53555
53556  DLL_NAME="$DLL_NAME"
53557  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53558  METHOD="well-known location in VCINSTALLDIR"
53559  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53560    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53561$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53562
53563    # Need to check if the found msvcr is correct architecture
53564    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53565$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53566    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53567    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53568      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53569      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53570      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53571        CORRECT_MSVCR_ARCH="PE32 executable"
53572      else
53573        CORRECT_MSVCR_ARCH="PE32+ executable"
53574      fi
53575    else
53576      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53577        CORRECT_MSVCR_ARCH=386
53578      else
53579        CORRECT_MSVCR_ARCH=x86-64
53580      fi
53581    fi
53582    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53583      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53584$as_echo "ok" >&6; }
53585      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53586
53587  # Only process if variable expands to non-empty
53588
53589  if test "x$MSVC_DLL" != x; then
53590    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53591
53592  # Input might be given as Windows format, start by converting to
53593  # unix format.
53594  path="$MSVC_DLL"
53595  new_path=`$CYGPATH -u "$path"`
53596
53597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53600  # "foo.exe" is OK but "foo" is an error.
53601  #
53602  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53603  # It is also a way to make sure we got the proper file name for the real test later on.
53604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53605  if test "x$test_shortpath" = x; then
53606    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53607$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53608    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53609  fi
53610
53611  # Call helper function which possibly converts this using DOS-style short mode.
53612  # If so, the updated path is stored in $new_path.
53613
53614  input_path="$new_path"
53615  # Check if we need to convert this using DOS-style short mode. If the path
53616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53617  # take no chances and rewrite it.
53618  # Note: m4 eats our [], so we need to use [ and ] instead.
53619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53620  if test "x$has_forbidden_chars" != x; then
53621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53625      # Going to short mode and back again did indeed matter. Since short mode is
53626      # case insensitive, let's make it lowercase to improve readability.
53627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53628      # Now convert it back to Unix-style (cygpath)
53629      input_path=`$CYGPATH -u "$shortmode_path"`
53630      new_path="$input_path"
53631    fi
53632  fi
53633
53634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53635  if test "x$test_cygdrive_prefix" = x; then
53636    # As a simple fix, exclude /usr/bin since it's not a real path.
53637    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53639      # a path prefixed by /cygdrive for fixpath to work.
53640      new_path="$CYGWIN_ROOT_PATH$input_path"
53641    fi
53642  fi
53643
53644
53645  if test "x$path" != "x$new_path"; then
53646    MSVC_DLL="$new_path"
53647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53648$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53649  fi
53650
53651    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53652
53653  path="$MSVC_DLL"
53654  has_colon=`$ECHO $path | $GREP ^.:`
53655  new_path="$path"
53656  if test "x$has_colon" = x; then
53657    # Not in mixed or Windows style, start by that.
53658    new_path=`cmd //c echo $path`
53659  fi
53660
53661
53662  input_path="$new_path"
53663  # Check if we need to convert this using DOS-style short mode. If the path
53664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53665  # take no chances and rewrite it.
53666  # Note: m4 eats our [], so we need to use [ and ] instead.
53667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53668  if test "x$has_forbidden_chars" != x; then
53669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53670    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53671  fi
53672
53673
53674  windows_path="$new_path"
53675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53676    unix_path=`$CYGPATH -u "$windows_path"`
53677    new_path="$unix_path"
53678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53680    new_path="$unix_path"
53681  fi
53682
53683  if test "x$path" != "x$new_path"; then
53684    MSVC_DLL="$new_path"
53685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53686$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53687  fi
53688
53689  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53690  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53691
53692    else
53693      # We're on a unix platform. Hooray! :)
53694      path="$MSVC_DLL"
53695      has_space=`$ECHO "$path" | $GREP " "`
53696      if test "x$has_space" != x; then
53697        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53698$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53699        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53700      fi
53701
53702      # Use eval to expand a potential ~
53703      eval path="$path"
53704      if test ! -f "$path" && test ! -d "$path"; then
53705        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53706      fi
53707
53708      if test -d "$path"; then
53709        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53710      else
53711        dir="`$DIRNAME "$path"`"
53712        base="`$BASENAME "$path"`"
53713        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53714      fi
53715    fi
53716  fi
53717
53718      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53719$as_echo_n "checking for $DLL_NAME... " >&6; }
53720      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53721$as_echo "$MSVC_DLL" >&6; }
53722    else
53723      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53724$as_echo "incorrect, ignoring" >&6; }
53725      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53726$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53727    fi
53728  fi
53729
53730    fi
53731  fi
53732
53733  if test "x$MSVC_DLL" = x; then
53734    # Probe: Check in the Boot JDK directory.
53735    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53736
53737  DLL_NAME="$DLL_NAME"
53738  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53739  METHOD="well-known location in Boot JDK"
53740  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53741    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53742$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53743
53744    # Need to check if the found msvcr is correct architecture
53745    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53746$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53747    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53748    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53749      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53750      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53751      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53752        CORRECT_MSVCR_ARCH="PE32 executable"
53753      else
53754        CORRECT_MSVCR_ARCH="PE32+ executable"
53755      fi
53756    else
53757      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53758        CORRECT_MSVCR_ARCH=386
53759      else
53760        CORRECT_MSVCR_ARCH=x86-64
53761      fi
53762    fi
53763    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53764      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53765$as_echo "ok" >&6; }
53766      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53767
53768  # Only process if variable expands to non-empty
53769
53770  if test "x$MSVC_DLL" != x; then
53771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53772
53773  # Input might be given as Windows format, start by converting to
53774  # unix format.
53775  path="$MSVC_DLL"
53776  new_path=`$CYGPATH -u "$path"`
53777
53778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53781  # "foo.exe" is OK but "foo" is an error.
53782  #
53783  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53784  # It is also a way to make sure we got the proper file name for the real test later on.
53785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53786  if test "x$test_shortpath" = x; then
53787    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53788$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53789    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53790  fi
53791
53792  # Call helper function which possibly converts this using DOS-style short mode.
53793  # If so, the updated path is stored in $new_path.
53794
53795  input_path="$new_path"
53796  # Check if we need to convert this using DOS-style short mode. If the path
53797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53798  # take no chances and rewrite it.
53799  # Note: m4 eats our [], so we need to use [ and ] instead.
53800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53801  if test "x$has_forbidden_chars" != x; then
53802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53806      # Going to short mode and back again did indeed matter. Since short mode is
53807      # case insensitive, let's make it lowercase to improve readability.
53808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53809      # Now convert it back to Unix-style (cygpath)
53810      input_path=`$CYGPATH -u "$shortmode_path"`
53811      new_path="$input_path"
53812    fi
53813  fi
53814
53815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53816  if test "x$test_cygdrive_prefix" = x; then
53817    # As a simple fix, exclude /usr/bin since it's not a real path.
53818    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53820      # a path prefixed by /cygdrive for fixpath to work.
53821      new_path="$CYGWIN_ROOT_PATH$input_path"
53822    fi
53823  fi
53824
53825
53826  if test "x$path" != "x$new_path"; then
53827    MSVC_DLL="$new_path"
53828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53829$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53830  fi
53831
53832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53833
53834  path="$MSVC_DLL"
53835  has_colon=`$ECHO $path | $GREP ^.:`
53836  new_path="$path"
53837  if test "x$has_colon" = x; then
53838    # Not in mixed or Windows style, start by that.
53839    new_path=`cmd //c echo $path`
53840  fi
53841
53842
53843  input_path="$new_path"
53844  # Check if we need to convert this using DOS-style short mode. If the path
53845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53846  # take no chances and rewrite it.
53847  # Note: m4 eats our [], so we need to use [ and ] instead.
53848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53849  if test "x$has_forbidden_chars" != x; then
53850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53852  fi
53853
53854
53855  windows_path="$new_path"
53856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53857    unix_path=`$CYGPATH -u "$windows_path"`
53858    new_path="$unix_path"
53859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53861    new_path="$unix_path"
53862  fi
53863
53864  if test "x$path" != "x$new_path"; then
53865    MSVC_DLL="$new_path"
53866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53867$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53868  fi
53869
53870  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53871  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53872
53873    else
53874      # We're on a unix platform. Hooray! :)
53875      path="$MSVC_DLL"
53876      has_space=`$ECHO "$path" | $GREP " "`
53877      if test "x$has_space" != x; then
53878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53879$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53880        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53881      fi
53882
53883      # Use eval to expand a potential ~
53884      eval path="$path"
53885      if test ! -f "$path" && test ! -d "$path"; then
53886        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53887      fi
53888
53889      if test -d "$path"; then
53890        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53891      else
53892        dir="`$DIRNAME "$path"`"
53893        base="`$BASENAME "$path"`"
53894        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53895      fi
53896    fi
53897  fi
53898
53899      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53900$as_echo_n "checking for $DLL_NAME... " >&6; }
53901      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53902$as_echo "$MSVC_DLL" >&6; }
53903    else
53904      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53905$as_echo "incorrect, ignoring" >&6; }
53906      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53907$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53908    fi
53909  fi
53910
53911  fi
53912
53913  if test "x$MSVC_DLL" = x; then
53914    # Probe: Look in the Windows system32 directory
53915    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53916
53917  windows_path="$CYGWIN_SYSTEMROOT"
53918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53919    unix_path=`$CYGPATH -u "$windows_path"`
53920    CYGWIN_SYSTEMROOT="$unix_path"
53921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53923    CYGWIN_SYSTEMROOT="$unix_path"
53924  fi
53925
53926    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53927
53928  DLL_NAME="$DLL_NAME"
53929  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53930  METHOD="well-known location in SYSTEMROOT"
53931  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53932    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53933$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53934
53935    # Need to check if the found msvcr is correct architecture
53936    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53937$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53938    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53939    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53940      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53941      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53942      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53943        CORRECT_MSVCR_ARCH="PE32 executable"
53944      else
53945        CORRECT_MSVCR_ARCH="PE32+ executable"
53946      fi
53947    else
53948      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53949        CORRECT_MSVCR_ARCH=386
53950      else
53951        CORRECT_MSVCR_ARCH=x86-64
53952      fi
53953    fi
53954    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53955      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53956$as_echo "ok" >&6; }
53957      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53958
53959  # Only process if variable expands to non-empty
53960
53961  if test "x$MSVC_DLL" != x; then
53962    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53963
53964  # Input might be given as Windows format, start by converting to
53965  # unix format.
53966  path="$MSVC_DLL"
53967  new_path=`$CYGPATH -u "$path"`
53968
53969  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53970  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53971  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53972  # "foo.exe" is OK but "foo" is an error.
53973  #
53974  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53975  # It is also a way to make sure we got the proper file name for the real test later on.
53976  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53977  if test "x$test_shortpath" = x; then
53978    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53979$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53980    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53981  fi
53982
53983  # Call helper function which possibly converts this using DOS-style short mode.
53984  # If so, the updated path is stored in $new_path.
53985
53986  input_path="$new_path"
53987  # Check if we need to convert this using DOS-style short mode. If the path
53988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53989  # take no chances and rewrite it.
53990  # Note: m4 eats our [], so we need to use [ and ] instead.
53991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53992  if test "x$has_forbidden_chars" != x; then
53993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53997      # Going to short mode and back again did indeed matter. Since short mode is
53998      # case insensitive, let's make it lowercase to improve readability.
53999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54000      # Now convert it back to Unix-style (cygpath)
54001      input_path=`$CYGPATH -u "$shortmode_path"`
54002      new_path="$input_path"
54003    fi
54004  fi
54005
54006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54007  if test "x$test_cygdrive_prefix" = x; then
54008    # As a simple fix, exclude /usr/bin since it's not a real path.
54009    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54011      # a path prefixed by /cygdrive for fixpath to work.
54012      new_path="$CYGWIN_ROOT_PATH$input_path"
54013    fi
54014  fi
54015
54016
54017  if test "x$path" != "x$new_path"; then
54018    MSVC_DLL="$new_path"
54019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54020$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54021  fi
54022
54023    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54024
54025  path="$MSVC_DLL"
54026  has_colon=`$ECHO $path | $GREP ^.:`
54027  new_path="$path"
54028  if test "x$has_colon" = x; then
54029    # Not in mixed or Windows style, start by that.
54030    new_path=`cmd //c echo $path`
54031  fi
54032
54033
54034  input_path="$new_path"
54035  # Check if we need to convert this using DOS-style short mode. If the path
54036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54037  # take no chances and rewrite it.
54038  # Note: m4 eats our [], so we need to use [ and ] instead.
54039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54040  if test "x$has_forbidden_chars" != x; then
54041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54043  fi
54044
54045
54046  windows_path="$new_path"
54047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54048    unix_path=`$CYGPATH -u "$windows_path"`
54049    new_path="$unix_path"
54050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54052    new_path="$unix_path"
54053  fi
54054
54055  if test "x$path" != "x$new_path"; then
54056    MSVC_DLL="$new_path"
54057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54058$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54059  fi
54060
54061  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54062  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54063
54064    else
54065      # We're on a unix platform. Hooray! :)
54066      path="$MSVC_DLL"
54067      has_space=`$ECHO "$path" | $GREP " "`
54068      if test "x$has_space" != x; then
54069        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54070$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54071        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54072      fi
54073
54074      # Use eval to expand a potential ~
54075      eval path="$path"
54076      if test ! -f "$path" && test ! -d "$path"; then
54077        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54078      fi
54079
54080      if test -d "$path"; then
54081        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54082      else
54083        dir="`$DIRNAME "$path"`"
54084        base="`$BASENAME "$path"`"
54085        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54086      fi
54087    fi
54088  fi
54089
54090      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54091$as_echo_n "checking for $DLL_NAME... " >&6; }
54092      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54093$as_echo "$MSVC_DLL" >&6; }
54094    else
54095      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54096$as_echo "incorrect, ignoring" >&6; }
54097      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54098$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54099    fi
54100  fi
54101
54102  fi
54103
54104  if test "x$MSVC_DLL" = x; then
54105    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54106    if test "x$VS100COMNTOOLS" != x; then
54107      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54108
54109  windows_path="$CYGWIN_VS_TOOLS_DIR"
54110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54111    unix_path=`$CYGPATH -u "$windows_path"`
54112    CYGWIN_VS_TOOLS_DIR="$unix_path"
54113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54115    CYGWIN_VS_TOOLS_DIR="$unix_path"
54116  fi
54117
54118      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54119        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54120	    | $GREP -i /x64/ | $HEAD --lines 1`
54121      else
54122        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54123	    | $GREP -i /x86/ | $HEAD --lines 1`
54124      fi
54125
54126  DLL_NAME="$DLL_NAME"
54127  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54128  METHOD="search of VS100COMNTOOLS"
54129  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54130    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54131$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54132
54133    # Need to check if the found msvcr is correct architecture
54134    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54135$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54136    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54137    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54138      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54139      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54140      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54141        CORRECT_MSVCR_ARCH="PE32 executable"
54142      else
54143        CORRECT_MSVCR_ARCH="PE32+ executable"
54144      fi
54145    else
54146      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54147        CORRECT_MSVCR_ARCH=386
54148      else
54149        CORRECT_MSVCR_ARCH=x86-64
54150      fi
54151    fi
54152    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54153      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54154$as_echo "ok" >&6; }
54155      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54156
54157  # Only process if variable expands to non-empty
54158
54159  if test "x$MSVC_DLL" != x; then
54160    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54161
54162  # Input might be given as Windows format, start by converting to
54163  # unix format.
54164  path="$MSVC_DLL"
54165  new_path=`$CYGPATH -u "$path"`
54166
54167  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54168  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54169  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54170  # "foo.exe" is OK but "foo" is an error.
54171  #
54172  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54173  # It is also a way to make sure we got the proper file name for the real test later on.
54174  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54175  if test "x$test_shortpath" = x; then
54176    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54177$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54178    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54179  fi
54180
54181  # Call helper function which possibly converts this using DOS-style short mode.
54182  # If so, the updated path is stored in $new_path.
54183
54184  input_path="$new_path"
54185  # Check if we need to convert this using DOS-style short mode. If the path
54186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54187  # take no chances and rewrite it.
54188  # Note: m4 eats our [], so we need to use [ and ] instead.
54189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54190  if test "x$has_forbidden_chars" != x; then
54191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54192    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54193    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54194    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54195      # Going to short mode and back again did indeed matter. Since short mode is
54196      # case insensitive, let's make it lowercase to improve readability.
54197      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54198      # Now convert it back to Unix-style (cygpath)
54199      input_path=`$CYGPATH -u "$shortmode_path"`
54200      new_path="$input_path"
54201    fi
54202  fi
54203
54204  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54205  if test "x$test_cygdrive_prefix" = x; then
54206    # As a simple fix, exclude /usr/bin since it's not a real path.
54207    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54208      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54209      # a path prefixed by /cygdrive for fixpath to work.
54210      new_path="$CYGWIN_ROOT_PATH$input_path"
54211    fi
54212  fi
54213
54214
54215  if test "x$path" != "x$new_path"; then
54216    MSVC_DLL="$new_path"
54217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54218$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54219  fi
54220
54221    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54222
54223  path="$MSVC_DLL"
54224  has_colon=`$ECHO $path | $GREP ^.:`
54225  new_path="$path"
54226  if test "x$has_colon" = x; then
54227    # Not in mixed or Windows style, start by that.
54228    new_path=`cmd //c echo $path`
54229  fi
54230
54231
54232  input_path="$new_path"
54233  # Check if we need to convert this using DOS-style short mode. If the path
54234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54235  # take no chances and rewrite it.
54236  # Note: m4 eats our [], so we need to use [ and ] instead.
54237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54238  if test "x$has_forbidden_chars" != x; then
54239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54240    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54241  fi
54242
54243
54244  windows_path="$new_path"
54245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54246    unix_path=`$CYGPATH -u "$windows_path"`
54247    new_path="$unix_path"
54248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54250    new_path="$unix_path"
54251  fi
54252
54253  if test "x$path" != "x$new_path"; then
54254    MSVC_DLL="$new_path"
54255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54256$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54257  fi
54258
54259  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54260  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54261
54262    else
54263      # We're on a unix platform. Hooray! :)
54264      path="$MSVC_DLL"
54265      has_space=`$ECHO "$path" | $GREP " "`
54266      if test "x$has_space" != x; then
54267        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54268$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54269        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54270      fi
54271
54272      # Use eval to expand a potential ~
54273      eval path="$path"
54274      if test ! -f "$path" && test ! -d "$path"; then
54275        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54276      fi
54277
54278      if test -d "$path"; then
54279        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54280      else
54281        dir="`$DIRNAME "$path"`"
54282        base="`$BASENAME "$path"`"
54283        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54284      fi
54285    fi
54286  fi
54287
54288      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54289$as_echo_n "checking for $DLL_NAME... " >&6; }
54290      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54291$as_echo "$MSVC_DLL" >&6; }
54292    else
54293      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54294$as_echo "incorrect, ignoring" >&6; }
54295      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54296$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54297    fi
54298  fi
54299
54300    fi
54301  fi
54302
54303  if test "x$MSVC_DLL" = x; then
54304    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54305    # (This was the original behaviour; kept since it might turn something up)
54306    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54307      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54308        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54309	    | $GREP x64 | $HEAD --lines 1`
54310      else
54311        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54312	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54313        if test "x$POSSIBLE_MSVC_DLL" = x; then
54314          # We're grasping at straws now...
54315          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54316	      | $HEAD --lines 1`
54317        fi
54318      fi
54319
54320
54321  DLL_NAME="$DLL_NAME"
54322  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54323  METHOD="search of VCINSTALLDIR"
54324  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54325    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54326$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54327
54328    # Need to check if the found msvcr is correct architecture
54329    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54330$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54331    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54332    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54333      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54334      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54335      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54336        CORRECT_MSVCR_ARCH="PE32 executable"
54337      else
54338        CORRECT_MSVCR_ARCH="PE32+ executable"
54339      fi
54340    else
54341      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54342        CORRECT_MSVCR_ARCH=386
54343      else
54344        CORRECT_MSVCR_ARCH=x86-64
54345      fi
54346    fi
54347    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54348      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54349$as_echo "ok" >&6; }
54350      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54351
54352  # Only process if variable expands to non-empty
54353
54354  if test "x$MSVC_DLL" != x; then
54355    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54356
54357  # Input might be given as Windows format, start by converting to
54358  # unix format.
54359  path="$MSVC_DLL"
54360  new_path=`$CYGPATH -u "$path"`
54361
54362  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54363  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54364  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54365  # "foo.exe" is OK but "foo" is an error.
54366  #
54367  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54368  # It is also a way to make sure we got the proper file name for the real test later on.
54369  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54370  if test "x$test_shortpath" = x; then
54371    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54372$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54373    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54374  fi
54375
54376  # Call helper function which possibly converts this using DOS-style short mode.
54377  # If so, the updated path is stored in $new_path.
54378
54379  input_path="$new_path"
54380  # Check if we need to convert this using DOS-style short mode. If the path
54381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54382  # take no chances and rewrite it.
54383  # Note: m4 eats our [], so we need to use [ and ] instead.
54384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54385  if test "x$has_forbidden_chars" != x; then
54386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54387    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54388    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54389    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54390      # Going to short mode and back again did indeed matter. Since short mode is
54391      # case insensitive, let's make it lowercase to improve readability.
54392      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54393      # Now convert it back to Unix-style (cygpath)
54394      input_path=`$CYGPATH -u "$shortmode_path"`
54395      new_path="$input_path"
54396    fi
54397  fi
54398
54399  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54400  if test "x$test_cygdrive_prefix" = x; then
54401    # As a simple fix, exclude /usr/bin since it's not a real path.
54402    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54403      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54404      # a path prefixed by /cygdrive for fixpath to work.
54405      new_path="$CYGWIN_ROOT_PATH$input_path"
54406    fi
54407  fi
54408
54409
54410  if test "x$path" != "x$new_path"; then
54411    MSVC_DLL="$new_path"
54412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54413$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54414  fi
54415
54416    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54417
54418  path="$MSVC_DLL"
54419  has_colon=`$ECHO $path | $GREP ^.:`
54420  new_path="$path"
54421  if test "x$has_colon" = x; then
54422    # Not in mixed or Windows style, start by that.
54423    new_path=`cmd //c echo $path`
54424  fi
54425
54426
54427  input_path="$new_path"
54428  # Check if we need to convert this using DOS-style short mode. If the path
54429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54430  # take no chances and rewrite it.
54431  # Note: m4 eats our [], so we need to use [ and ] instead.
54432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54433  if test "x$has_forbidden_chars" != x; then
54434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54436  fi
54437
54438
54439  windows_path="$new_path"
54440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54441    unix_path=`$CYGPATH -u "$windows_path"`
54442    new_path="$unix_path"
54443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54445    new_path="$unix_path"
54446  fi
54447
54448  if test "x$path" != "x$new_path"; then
54449    MSVC_DLL="$new_path"
54450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54451$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54452  fi
54453
54454  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54455  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54456
54457    else
54458      # We're on a unix platform. Hooray! :)
54459      path="$MSVC_DLL"
54460      has_space=`$ECHO "$path" | $GREP " "`
54461      if test "x$has_space" != x; then
54462        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54463$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54464        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54465      fi
54466
54467      # Use eval to expand a potential ~
54468      eval path="$path"
54469      if test ! -f "$path" && test ! -d "$path"; then
54470        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54471      fi
54472
54473      if test -d "$path"; then
54474        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54475      else
54476        dir="`$DIRNAME "$path"`"
54477        base="`$BASENAME "$path"`"
54478        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54479      fi
54480    fi
54481  fi
54482
54483      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54484$as_echo_n "checking for $DLL_NAME... " >&6; }
54485      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54486$as_echo "$MSVC_DLL" >&6; }
54487    else
54488      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54489$as_echo "incorrect, ignoring" >&6; }
54490      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54491$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54492    fi
54493  fi
54494
54495    fi
54496  fi
54497
54498  if test "x$MSVC_DLL" = x; then
54499    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54500$as_echo_n "checking for $DLL_NAME... " >&6; }
54501    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54502$as_echo "no" >&6; }
54503    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54504  fi
54505
54506    MSVCR_DLL="$MSVC_DLL"
54507  fi
54508
54509
54510
54511# Check whether --with-msvcp-dll was given.
54512if test "${with_msvcp_dll+set}" = set; then :
54513  withval=$with_msvcp_dll;
54514fi
54515
54516
54517  if test "x$MSVCP_NAME" != "x"; then
54518    if test "x$with_msvcp_dll" != x; then
54519      # If given explicitely by user, do not probe. If not present, fail directly.
54520
54521  DLL_NAME="$MSVCP_NAME"
54522  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54523  METHOD="--with-msvcp-dll"
54524  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54525    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54526$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54527
54528    # Need to check if the found msvcr is correct architecture
54529    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54530$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54531    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54532    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54533      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54534      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54535      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54536        CORRECT_MSVCR_ARCH="PE32 executable"
54537      else
54538        CORRECT_MSVCR_ARCH="PE32+ executable"
54539      fi
54540    else
54541      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54542        CORRECT_MSVCR_ARCH=386
54543      else
54544        CORRECT_MSVCR_ARCH=x86-64
54545      fi
54546    fi
54547    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54548      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54549$as_echo "ok" >&6; }
54550      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54551
54552  # Only process if variable expands to non-empty
54553
54554  if test "x$MSVC_DLL" != x; then
54555    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54556
54557  # Input might be given as Windows format, start by converting to
54558  # unix format.
54559  path="$MSVC_DLL"
54560  new_path=`$CYGPATH -u "$path"`
54561
54562  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54563  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54564  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54565  # "foo.exe" is OK but "foo" is an error.
54566  #
54567  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54568  # It is also a way to make sure we got the proper file name for the real test later on.
54569  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54570  if test "x$test_shortpath" = x; then
54571    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54572$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54573    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54574  fi
54575
54576  # Call helper function which possibly converts this using DOS-style short mode.
54577  # If so, the updated path is stored in $new_path.
54578
54579  input_path="$new_path"
54580  # Check if we need to convert this using DOS-style short mode. If the path
54581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54582  # take no chances and rewrite it.
54583  # Note: m4 eats our [], so we need to use [ and ] instead.
54584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54585  if test "x$has_forbidden_chars" != x; then
54586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54587    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54588    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54589    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54590      # Going to short mode and back again did indeed matter. Since short mode is
54591      # case insensitive, let's make it lowercase to improve readability.
54592      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54593      # Now convert it back to Unix-style (cygpath)
54594      input_path=`$CYGPATH -u "$shortmode_path"`
54595      new_path="$input_path"
54596    fi
54597  fi
54598
54599  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54600  if test "x$test_cygdrive_prefix" = x; then
54601    # As a simple fix, exclude /usr/bin since it's not a real path.
54602    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54603      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54604      # a path prefixed by /cygdrive for fixpath to work.
54605      new_path="$CYGWIN_ROOT_PATH$input_path"
54606    fi
54607  fi
54608
54609
54610  if test "x$path" != "x$new_path"; then
54611    MSVC_DLL="$new_path"
54612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54613$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54614  fi
54615
54616    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54617
54618  path="$MSVC_DLL"
54619  has_colon=`$ECHO $path | $GREP ^.:`
54620  new_path="$path"
54621  if test "x$has_colon" = x; then
54622    # Not in mixed or Windows style, start by that.
54623    new_path=`cmd //c echo $path`
54624  fi
54625
54626
54627  input_path="$new_path"
54628  # Check if we need to convert this using DOS-style short mode. If the path
54629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54630  # take no chances and rewrite it.
54631  # Note: m4 eats our [], so we need to use [ and ] instead.
54632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54633  if test "x$has_forbidden_chars" != x; then
54634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54635    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54636  fi
54637
54638
54639  windows_path="$new_path"
54640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54641    unix_path=`$CYGPATH -u "$windows_path"`
54642    new_path="$unix_path"
54643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54645    new_path="$unix_path"
54646  fi
54647
54648  if test "x$path" != "x$new_path"; then
54649    MSVC_DLL="$new_path"
54650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54651$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54652  fi
54653
54654  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54655  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54656
54657    else
54658      # We're on a unix platform. Hooray! :)
54659      path="$MSVC_DLL"
54660      has_space=`$ECHO "$path" | $GREP " "`
54661      if test "x$has_space" != x; then
54662        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54663$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54664        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54665      fi
54666
54667      # Use eval to expand a potential ~
54668      eval path="$path"
54669      if test ! -f "$path" && test ! -d "$path"; then
54670        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54671      fi
54672
54673      if test -d "$path"; then
54674        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54675      else
54676        dir="`$DIRNAME "$path"`"
54677        base="`$BASENAME "$path"`"
54678        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54679      fi
54680    fi
54681  fi
54682
54683      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54684$as_echo_n "checking for $DLL_NAME... " >&6; }
54685      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54686$as_echo "$MSVC_DLL" >&6; }
54687    else
54688      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54689$as_echo "incorrect, ignoring" >&6; }
54690      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54691$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54692    fi
54693  fi
54694
54695      if test "x$MSVC_DLL" = x; then
54696        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54697      fi
54698      MSVCP_DLL="$MSVC_DLL"
54699    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54700
54701  DLL_NAME="$MSVCP_NAME"
54702  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54703  METHOD="devkit"
54704  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54705    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54706$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54707
54708    # Need to check if the found msvcr is correct architecture
54709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54710$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54711    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54712    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54713      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54714      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54715      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54716        CORRECT_MSVCR_ARCH="PE32 executable"
54717      else
54718        CORRECT_MSVCR_ARCH="PE32+ executable"
54719      fi
54720    else
54721      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54722        CORRECT_MSVCR_ARCH=386
54723      else
54724        CORRECT_MSVCR_ARCH=x86-64
54725      fi
54726    fi
54727    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54728      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54729$as_echo "ok" >&6; }
54730      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54731
54732  # Only process if variable expands to non-empty
54733
54734  if test "x$MSVC_DLL" != x; then
54735    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54736
54737  # Input might be given as Windows format, start by converting to
54738  # unix format.
54739  path="$MSVC_DLL"
54740  new_path=`$CYGPATH -u "$path"`
54741
54742  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54743  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54744  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54745  # "foo.exe" is OK but "foo" is an error.
54746  #
54747  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54748  # It is also a way to make sure we got the proper file name for the real test later on.
54749  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54750  if test "x$test_shortpath" = x; then
54751    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54752$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54753    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54754  fi
54755
54756  # Call helper function which possibly converts this using DOS-style short mode.
54757  # If so, the updated path is stored in $new_path.
54758
54759  input_path="$new_path"
54760  # Check if we need to convert this using DOS-style short mode. If the path
54761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54762  # take no chances and rewrite it.
54763  # Note: m4 eats our [], so we need to use [ and ] instead.
54764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54765  if test "x$has_forbidden_chars" != x; then
54766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54767    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54768    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54769    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54770      # Going to short mode and back again did indeed matter. Since short mode is
54771      # case insensitive, let's make it lowercase to improve readability.
54772      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54773      # Now convert it back to Unix-style (cygpath)
54774      input_path=`$CYGPATH -u "$shortmode_path"`
54775      new_path="$input_path"
54776    fi
54777  fi
54778
54779  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54780  if test "x$test_cygdrive_prefix" = x; then
54781    # As a simple fix, exclude /usr/bin since it's not a real path.
54782    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54783      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54784      # a path prefixed by /cygdrive for fixpath to work.
54785      new_path="$CYGWIN_ROOT_PATH$input_path"
54786    fi
54787  fi
54788
54789
54790  if test "x$path" != "x$new_path"; then
54791    MSVC_DLL="$new_path"
54792    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54793$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54794  fi
54795
54796    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54797
54798  path="$MSVC_DLL"
54799  has_colon=`$ECHO $path | $GREP ^.:`
54800  new_path="$path"
54801  if test "x$has_colon" = x; then
54802    # Not in mixed or Windows style, start by that.
54803    new_path=`cmd //c echo $path`
54804  fi
54805
54806
54807  input_path="$new_path"
54808  # Check if we need to convert this using DOS-style short mode. If the path
54809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54810  # take no chances and rewrite it.
54811  # Note: m4 eats our [], so we need to use [ and ] instead.
54812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54813  if test "x$has_forbidden_chars" != x; then
54814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54815    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54816  fi
54817
54818
54819  windows_path="$new_path"
54820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54821    unix_path=`$CYGPATH -u "$windows_path"`
54822    new_path="$unix_path"
54823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54825    new_path="$unix_path"
54826  fi
54827
54828  if test "x$path" != "x$new_path"; then
54829    MSVC_DLL="$new_path"
54830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54831$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54832  fi
54833
54834  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54835  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54836
54837    else
54838      # We're on a unix platform. Hooray! :)
54839      path="$MSVC_DLL"
54840      has_space=`$ECHO "$path" | $GREP " "`
54841      if test "x$has_space" != x; then
54842        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54843$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54844        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54845      fi
54846
54847      # Use eval to expand a potential ~
54848      eval path="$path"
54849      if test ! -f "$path" && test ! -d "$path"; then
54850        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54851      fi
54852
54853      if test -d "$path"; then
54854        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54855      else
54856        dir="`$DIRNAME "$path"`"
54857        base="`$BASENAME "$path"`"
54858        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54859      fi
54860    fi
54861  fi
54862
54863      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54864$as_echo_n "checking for $DLL_NAME... " >&6; }
54865      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54866$as_echo "$MSVC_DLL" >&6; }
54867    else
54868      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54869$as_echo "incorrect, ignoring" >&6; }
54870      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54871$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54872    fi
54873  fi
54874
54875      if test "x$MSVC_DLL" = x; then
54876        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54877      fi
54878      MSVCP_DLL="$MSVC_DLL"
54879    else
54880
54881  DLL_NAME="${MSVCP_NAME}"
54882  MSVC_DLL=
54883
54884  if test "x$MSVC_DLL" = x; then
54885    # Probe: Using well-known location from Visual Studio 10.0
54886    if test "x$VCINSTALLDIR" != x; then
54887      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54888
54889  windows_path="$CYGWIN_VC_INSTALL_DIR"
54890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54891    unix_path=`$CYGPATH -u "$windows_path"`
54892    CYGWIN_VC_INSTALL_DIR="$unix_path"
54893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54895    CYGWIN_VC_INSTALL_DIR="$unix_path"
54896  fi
54897
54898      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54899        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54900      else
54901        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54902      fi
54903      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54904
54905  DLL_NAME="$DLL_NAME"
54906  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54907  METHOD="well-known location in VCINSTALLDIR"
54908  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54909    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54910$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54911
54912    # Need to check if the found msvcr is correct architecture
54913    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54914$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54915    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54916    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54917      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54918      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54919      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54920        CORRECT_MSVCR_ARCH="PE32 executable"
54921      else
54922        CORRECT_MSVCR_ARCH="PE32+ executable"
54923      fi
54924    else
54925      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54926        CORRECT_MSVCR_ARCH=386
54927      else
54928        CORRECT_MSVCR_ARCH=x86-64
54929      fi
54930    fi
54931    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54932      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54933$as_echo "ok" >&6; }
54934      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54935
54936  # Only process if variable expands to non-empty
54937
54938  if test "x$MSVC_DLL" != x; then
54939    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54940
54941  # Input might be given as Windows format, start by converting to
54942  # unix format.
54943  path="$MSVC_DLL"
54944  new_path=`$CYGPATH -u "$path"`
54945
54946  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54947  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54948  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54949  # "foo.exe" is OK but "foo" is an error.
54950  #
54951  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54952  # It is also a way to make sure we got the proper file name for the real test later on.
54953  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54954  if test "x$test_shortpath" = x; then
54955    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54956$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54957    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54958  fi
54959
54960  # Call helper function which possibly converts this using DOS-style short mode.
54961  # If so, the updated path is stored in $new_path.
54962
54963  input_path="$new_path"
54964  # Check if we need to convert this using DOS-style short mode. If the path
54965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54966  # take no chances and rewrite it.
54967  # Note: m4 eats our [], so we need to use [ and ] instead.
54968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54969  if test "x$has_forbidden_chars" != x; then
54970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54971    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54972    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54973    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54974      # Going to short mode and back again did indeed matter. Since short mode is
54975      # case insensitive, let's make it lowercase to improve readability.
54976      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54977      # Now convert it back to Unix-style (cygpath)
54978      input_path=`$CYGPATH -u "$shortmode_path"`
54979      new_path="$input_path"
54980    fi
54981  fi
54982
54983  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54984  if test "x$test_cygdrive_prefix" = x; then
54985    # As a simple fix, exclude /usr/bin since it's not a real path.
54986    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54987      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54988      # a path prefixed by /cygdrive for fixpath to work.
54989      new_path="$CYGWIN_ROOT_PATH$input_path"
54990    fi
54991  fi
54992
54993
54994  if test "x$path" != "x$new_path"; then
54995    MSVC_DLL="$new_path"
54996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54997$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54998  fi
54999
55000    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55001
55002  path="$MSVC_DLL"
55003  has_colon=`$ECHO $path | $GREP ^.:`
55004  new_path="$path"
55005  if test "x$has_colon" = x; then
55006    # Not in mixed or Windows style, start by that.
55007    new_path=`cmd //c echo $path`
55008  fi
55009
55010
55011  input_path="$new_path"
55012  # Check if we need to convert this using DOS-style short mode. If the path
55013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55014  # take no chances and rewrite it.
55015  # Note: m4 eats our [], so we need to use [ and ] instead.
55016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55017  if test "x$has_forbidden_chars" != x; then
55018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55019    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55020  fi
55021
55022
55023  windows_path="$new_path"
55024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55025    unix_path=`$CYGPATH -u "$windows_path"`
55026    new_path="$unix_path"
55027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55029    new_path="$unix_path"
55030  fi
55031
55032  if test "x$path" != "x$new_path"; then
55033    MSVC_DLL="$new_path"
55034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55035$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55036  fi
55037
55038  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55039  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55040
55041    else
55042      # We're on a unix platform. Hooray! :)
55043      path="$MSVC_DLL"
55044      has_space=`$ECHO "$path" | $GREP " "`
55045      if test "x$has_space" != x; then
55046        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55047$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55048        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55049      fi
55050
55051      # Use eval to expand a potential ~
55052      eval path="$path"
55053      if test ! -f "$path" && test ! -d "$path"; then
55054        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55055      fi
55056
55057      if test -d "$path"; then
55058        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55059      else
55060        dir="`$DIRNAME "$path"`"
55061        base="`$BASENAME "$path"`"
55062        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55063      fi
55064    fi
55065  fi
55066
55067      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55068$as_echo_n "checking for $DLL_NAME... " >&6; }
55069      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55070$as_echo "$MSVC_DLL" >&6; }
55071    else
55072      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55073$as_echo "incorrect, ignoring" >&6; }
55074      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55075$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55076    fi
55077  fi
55078
55079    fi
55080  fi
55081
55082  if test "x$MSVC_DLL" = x; then
55083    # Probe: Check in the Boot JDK directory.
55084    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55085
55086  DLL_NAME="$DLL_NAME"
55087  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55088  METHOD="well-known location in Boot JDK"
55089  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55090    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55091$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55092
55093    # Need to check if the found msvcr is correct architecture
55094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55095$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55096    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55097    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55098      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55099      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55100      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55101        CORRECT_MSVCR_ARCH="PE32 executable"
55102      else
55103        CORRECT_MSVCR_ARCH="PE32+ executable"
55104      fi
55105    else
55106      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55107        CORRECT_MSVCR_ARCH=386
55108      else
55109        CORRECT_MSVCR_ARCH=x86-64
55110      fi
55111    fi
55112    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55113      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55114$as_echo "ok" >&6; }
55115      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55116
55117  # Only process if variable expands to non-empty
55118
55119  if test "x$MSVC_DLL" != x; then
55120    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55121
55122  # Input might be given as Windows format, start by converting to
55123  # unix format.
55124  path="$MSVC_DLL"
55125  new_path=`$CYGPATH -u "$path"`
55126
55127  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55128  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55129  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55130  # "foo.exe" is OK but "foo" is an error.
55131  #
55132  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55133  # It is also a way to make sure we got the proper file name for the real test later on.
55134  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55135  if test "x$test_shortpath" = x; then
55136    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55137$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55138    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55139  fi
55140
55141  # Call helper function which possibly converts this using DOS-style short mode.
55142  # If so, the updated path is stored in $new_path.
55143
55144  input_path="$new_path"
55145  # Check if we need to convert this using DOS-style short mode. If the path
55146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55147  # take no chances and rewrite it.
55148  # Note: m4 eats our [], so we need to use [ and ] instead.
55149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55150  if test "x$has_forbidden_chars" != x; then
55151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55152    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55153    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55154    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55155      # Going to short mode and back again did indeed matter. Since short mode is
55156      # case insensitive, let's make it lowercase to improve readability.
55157      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55158      # Now convert it back to Unix-style (cygpath)
55159      input_path=`$CYGPATH -u "$shortmode_path"`
55160      new_path="$input_path"
55161    fi
55162  fi
55163
55164  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55165  if test "x$test_cygdrive_prefix" = x; then
55166    # As a simple fix, exclude /usr/bin since it's not a real path.
55167    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55168      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55169      # a path prefixed by /cygdrive for fixpath to work.
55170      new_path="$CYGWIN_ROOT_PATH$input_path"
55171    fi
55172  fi
55173
55174
55175  if test "x$path" != "x$new_path"; then
55176    MSVC_DLL="$new_path"
55177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55178$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55179  fi
55180
55181    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55182
55183  path="$MSVC_DLL"
55184  has_colon=`$ECHO $path | $GREP ^.:`
55185  new_path="$path"
55186  if test "x$has_colon" = x; then
55187    # Not in mixed or Windows style, start by that.
55188    new_path=`cmd //c echo $path`
55189  fi
55190
55191
55192  input_path="$new_path"
55193  # Check if we need to convert this using DOS-style short mode. If the path
55194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55195  # take no chances and rewrite it.
55196  # Note: m4 eats our [], so we need to use [ and ] instead.
55197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55198  if test "x$has_forbidden_chars" != x; then
55199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55201  fi
55202
55203
55204  windows_path="$new_path"
55205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55206    unix_path=`$CYGPATH -u "$windows_path"`
55207    new_path="$unix_path"
55208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55210    new_path="$unix_path"
55211  fi
55212
55213  if test "x$path" != "x$new_path"; then
55214    MSVC_DLL="$new_path"
55215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55216$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55217  fi
55218
55219  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55220  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55221
55222    else
55223      # We're on a unix platform. Hooray! :)
55224      path="$MSVC_DLL"
55225      has_space=`$ECHO "$path" | $GREP " "`
55226      if test "x$has_space" != x; then
55227        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55228$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55229        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55230      fi
55231
55232      # Use eval to expand a potential ~
55233      eval path="$path"
55234      if test ! -f "$path" && test ! -d "$path"; then
55235        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55236      fi
55237
55238      if test -d "$path"; then
55239        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55240      else
55241        dir="`$DIRNAME "$path"`"
55242        base="`$BASENAME "$path"`"
55243        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55244      fi
55245    fi
55246  fi
55247
55248      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55249$as_echo_n "checking for $DLL_NAME... " >&6; }
55250      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55251$as_echo "$MSVC_DLL" >&6; }
55252    else
55253      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55254$as_echo "incorrect, ignoring" >&6; }
55255      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55256$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55257    fi
55258  fi
55259
55260  fi
55261
55262  if test "x$MSVC_DLL" = x; then
55263    # Probe: Look in the Windows system32 directory
55264    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55265
55266  windows_path="$CYGWIN_SYSTEMROOT"
55267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55268    unix_path=`$CYGPATH -u "$windows_path"`
55269    CYGWIN_SYSTEMROOT="$unix_path"
55270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55272    CYGWIN_SYSTEMROOT="$unix_path"
55273  fi
55274
55275    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55276
55277  DLL_NAME="$DLL_NAME"
55278  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55279  METHOD="well-known location in SYSTEMROOT"
55280  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55281    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55282$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55283
55284    # Need to check if the found msvcr is correct architecture
55285    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55286$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55287    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55289      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55290      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55291      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55292        CORRECT_MSVCR_ARCH="PE32 executable"
55293      else
55294        CORRECT_MSVCR_ARCH="PE32+ executable"
55295      fi
55296    else
55297      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55298        CORRECT_MSVCR_ARCH=386
55299      else
55300        CORRECT_MSVCR_ARCH=x86-64
55301      fi
55302    fi
55303    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55304      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55305$as_echo "ok" >&6; }
55306      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55307
55308  # Only process if variable expands to non-empty
55309
55310  if test "x$MSVC_DLL" != x; then
55311    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55312
55313  # Input might be given as Windows format, start by converting to
55314  # unix format.
55315  path="$MSVC_DLL"
55316  new_path=`$CYGPATH -u "$path"`
55317
55318  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55319  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55320  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55321  # "foo.exe" is OK but "foo" is an error.
55322  #
55323  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55324  # It is also a way to make sure we got the proper file name for the real test later on.
55325  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55326  if test "x$test_shortpath" = x; then
55327    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55328$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55329    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55330  fi
55331
55332  # Call helper function which possibly converts this using DOS-style short mode.
55333  # If so, the updated path is stored in $new_path.
55334
55335  input_path="$new_path"
55336  # Check if we need to convert this using DOS-style short mode. If the path
55337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55338  # take no chances and rewrite it.
55339  # Note: m4 eats our [], so we need to use [ and ] instead.
55340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55341  if test "x$has_forbidden_chars" != x; then
55342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55346      # Going to short mode and back again did indeed matter. Since short mode is
55347      # case insensitive, let's make it lowercase to improve readability.
55348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55349      # Now convert it back to Unix-style (cygpath)
55350      input_path=`$CYGPATH -u "$shortmode_path"`
55351      new_path="$input_path"
55352    fi
55353  fi
55354
55355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55356  if test "x$test_cygdrive_prefix" = x; then
55357    # As a simple fix, exclude /usr/bin since it's not a real path.
55358    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55360      # a path prefixed by /cygdrive for fixpath to work.
55361      new_path="$CYGWIN_ROOT_PATH$input_path"
55362    fi
55363  fi
55364
55365
55366  if test "x$path" != "x$new_path"; then
55367    MSVC_DLL="$new_path"
55368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55369$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55370  fi
55371
55372    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55373
55374  path="$MSVC_DLL"
55375  has_colon=`$ECHO $path | $GREP ^.:`
55376  new_path="$path"
55377  if test "x$has_colon" = x; then
55378    # Not in mixed or Windows style, start by that.
55379    new_path=`cmd //c echo $path`
55380  fi
55381
55382
55383  input_path="$new_path"
55384  # Check if we need to convert this using DOS-style short mode. If the path
55385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55386  # take no chances and rewrite it.
55387  # Note: m4 eats our [], so we need to use [ and ] instead.
55388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55389  if test "x$has_forbidden_chars" != x; then
55390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55391    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55392  fi
55393
55394
55395  windows_path="$new_path"
55396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55397    unix_path=`$CYGPATH -u "$windows_path"`
55398    new_path="$unix_path"
55399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55401    new_path="$unix_path"
55402  fi
55403
55404  if test "x$path" != "x$new_path"; then
55405    MSVC_DLL="$new_path"
55406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55407$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55408  fi
55409
55410  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55411  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55412
55413    else
55414      # We're on a unix platform. Hooray! :)
55415      path="$MSVC_DLL"
55416      has_space=`$ECHO "$path" | $GREP " "`
55417      if test "x$has_space" != x; then
55418        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55419$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55420        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55421      fi
55422
55423      # Use eval to expand a potential ~
55424      eval path="$path"
55425      if test ! -f "$path" && test ! -d "$path"; then
55426        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55427      fi
55428
55429      if test -d "$path"; then
55430        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55431      else
55432        dir="`$DIRNAME "$path"`"
55433        base="`$BASENAME "$path"`"
55434        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55435      fi
55436    fi
55437  fi
55438
55439      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55440$as_echo_n "checking for $DLL_NAME... " >&6; }
55441      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55442$as_echo "$MSVC_DLL" >&6; }
55443    else
55444      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55445$as_echo "incorrect, ignoring" >&6; }
55446      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55447$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55448    fi
55449  fi
55450
55451  fi
55452
55453  if test "x$MSVC_DLL" = x; then
55454    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55455    if test "x$VS100COMNTOOLS" != x; then
55456      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55457
55458  windows_path="$CYGWIN_VS_TOOLS_DIR"
55459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55460    unix_path=`$CYGPATH -u "$windows_path"`
55461    CYGWIN_VS_TOOLS_DIR="$unix_path"
55462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55464    CYGWIN_VS_TOOLS_DIR="$unix_path"
55465  fi
55466
55467      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55468        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55469	    | $GREP -i /x64/ | $HEAD --lines 1`
55470      else
55471        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55472	    | $GREP -i /x86/ | $HEAD --lines 1`
55473      fi
55474
55475  DLL_NAME="$DLL_NAME"
55476  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55477  METHOD="search of VS100COMNTOOLS"
55478  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55479    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55480$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55481
55482    # Need to check if the found msvcr is correct architecture
55483    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55484$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55485    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55486    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55487      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55488      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55489      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55490        CORRECT_MSVCR_ARCH="PE32 executable"
55491      else
55492        CORRECT_MSVCR_ARCH="PE32+ executable"
55493      fi
55494    else
55495      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55496        CORRECT_MSVCR_ARCH=386
55497      else
55498        CORRECT_MSVCR_ARCH=x86-64
55499      fi
55500    fi
55501    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55502      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55503$as_echo "ok" >&6; }
55504      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55505
55506  # Only process if variable expands to non-empty
55507
55508  if test "x$MSVC_DLL" != x; then
55509    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55510
55511  # Input might be given as Windows format, start by converting to
55512  # unix format.
55513  path="$MSVC_DLL"
55514  new_path=`$CYGPATH -u "$path"`
55515
55516  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55517  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55518  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55519  # "foo.exe" is OK but "foo" is an error.
55520  #
55521  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55522  # It is also a way to make sure we got the proper file name for the real test later on.
55523  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55524  if test "x$test_shortpath" = x; then
55525    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55526$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55527    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55528  fi
55529
55530  # Call helper function which possibly converts this using DOS-style short mode.
55531  # If so, the updated path is stored in $new_path.
55532
55533  input_path="$new_path"
55534  # Check if we need to convert this using DOS-style short mode. If the path
55535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55536  # take no chances and rewrite it.
55537  # Note: m4 eats our [], so we need to use [ and ] instead.
55538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55539  if test "x$has_forbidden_chars" != x; then
55540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55541    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55542    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55543    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55544      # Going to short mode and back again did indeed matter. Since short mode is
55545      # case insensitive, let's make it lowercase to improve readability.
55546      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55547      # Now convert it back to Unix-style (cygpath)
55548      input_path=`$CYGPATH -u "$shortmode_path"`
55549      new_path="$input_path"
55550    fi
55551  fi
55552
55553  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55554  if test "x$test_cygdrive_prefix" = x; then
55555    # As a simple fix, exclude /usr/bin since it's not a real path.
55556    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55557      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55558      # a path prefixed by /cygdrive for fixpath to work.
55559      new_path="$CYGWIN_ROOT_PATH$input_path"
55560    fi
55561  fi
55562
55563
55564  if test "x$path" != "x$new_path"; then
55565    MSVC_DLL="$new_path"
55566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55567$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55568  fi
55569
55570    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55571
55572  path="$MSVC_DLL"
55573  has_colon=`$ECHO $path | $GREP ^.:`
55574  new_path="$path"
55575  if test "x$has_colon" = x; then
55576    # Not in mixed or Windows style, start by that.
55577    new_path=`cmd //c echo $path`
55578  fi
55579
55580
55581  input_path="$new_path"
55582  # Check if we need to convert this using DOS-style short mode. If the path
55583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55584  # take no chances and rewrite it.
55585  # Note: m4 eats our [], so we need to use [ and ] instead.
55586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55587  if test "x$has_forbidden_chars" != x; then
55588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55589    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55590  fi
55591
55592
55593  windows_path="$new_path"
55594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55595    unix_path=`$CYGPATH -u "$windows_path"`
55596    new_path="$unix_path"
55597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55599    new_path="$unix_path"
55600  fi
55601
55602  if test "x$path" != "x$new_path"; then
55603    MSVC_DLL="$new_path"
55604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55605$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55606  fi
55607
55608  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55609  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55610
55611    else
55612      # We're on a unix platform. Hooray! :)
55613      path="$MSVC_DLL"
55614      has_space=`$ECHO "$path" | $GREP " "`
55615      if test "x$has_space" != x; then
55616        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55617$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55618        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55619      fi
55620
55621      # Use eval to expand a potential ~
55622      eval path="$path"
55623      if test ! -f "$path" && test ! -d "$path"; then
55624        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55625      fi
55626
55627      if test -d "$path"; then
55628        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55629      else
55630        dir="`$DIRNAME "$path"`"
55631        base="`$BASENAME "$path"`"
55632        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55633      fi
55634    fi
55635  fi
55636
55637      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55638$as_echo_n "checking for $DLL_NAME... " >&6; }
55639      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55640$as_echo "$MSVC_DLL" >&6; }
55641    else
55642      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55643$as_echo "incorrect, ignoring" >&6; }
55644      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55645$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55646    fi
55647  fi
55648
55649    fi
55650  fi
55651
55652  if test "x$MSVC_DLL" = x; then
55653    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55654    # (This was the original behaviour; kept since it might turn something up)
55655    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55656      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55657        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55658	    | $GREP x64 | $HEAD --lines 1`
55659      else
55660        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55661	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55662        if test "x$POSSIBLE_MSVC_DLL" = x; then
55663          # We're grasping at straws now...
55664          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55665	      | $HEAD --lines 1`
55666        fi
55667      fi
55668
55669
55670  DLL_NAME="$DLL_NAME"
55671  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55672  METHOD="search of VCINSTALLDIR"
55673  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55674    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55675$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55676
55677    # Need to check if the found msvcr is correct architecture
55678    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55679$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55680    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55681    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55682      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55683      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55684      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55685        CORRECT_MSVCR_ARCH="PE32 executable"
55686      else
55687        CORRECT_MSVCR_ARCH="PE32+ executable"
55688      fi
55689    else
55690      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55691        CORRECT_MSVCR_ARCH=386
55692      else
55693        CORRECT_MSVCR_ARCH=x86-64
55694      fi
55695    fi
55696    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55697      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55698$as_echo "ok" >&6; }
55699      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55700
55701  # Only process if variable expands to non-empty
55702
55703  if test "x$MSVC_DLL" != x; then
55704    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55705
55706  # Input might be given as Windows format, start by converting to
55707  # unix format.
55708  path="$MSVC_DLL"
55709  new_path=`$CYGPATH -u "$path"`
55710
55711  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55712  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55713  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55714  # "foo.exe" is OK but "foo" is an error.
55715  #
55716  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55717  # It is also a way to make sure we got the proper file name for the real test later on.
55718  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55719  if test "x$test_shortpath" = x; then
55720    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55721$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55722    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55723  fi
55724
55725  # Call helper function which possibly converts this using DOS-style short mode.
55726  # If so, the updated path is stored in $new_path.
55727
55728  input_path="$new_path"
55729  # Check if we need to convert this using DOS-style short mode. If the path
55730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55731  # take no chances and rewrite it.
55732  # Note: m4 eats our [], so we need to use [ and ] instead.
55733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55734  if test "x$has_forbidden_chars" != x; then
55735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55736    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55737    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55738    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55739      # Going to short mode and back again did indeed matter. Since short mode is
55740      # case insensitive, let's make it lowercase to improve readability.
55741      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55742      # Now convert it back to Unix-style (cygpath)
55743      input_path=`$CYGPATH -u "$shortmode_path"`
55744      new_path="$input_path"
55745    fi
55746  fi
55747
55748  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55749  if test "x$test_cygdrive_prefix" = x; then
55750    # As a simple fix, exclude /usr/bin since it's not a real path.
55751    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55752      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55753      # a path prefixed by /cygdrive for fixpath to work.
55754      new_path="$CYGWIN_ROOT_PATH$input_path"
55755    fi
55756  fi
55757
55758
55759  if test "x$path" != "x$new_path"; then
55760    MSVC_DLL="$new_path"
55761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55762$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55763  fi
55764
55765    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55766
55767  path="$MSVC_DLL"
55768  has_colon=`$ECHO $path | $GREP ^.:`
55769  new_path="$path"
55770  if test "x$has_colon" = x; then
55771    # Not in mixed or Windows style, start by that.
55772    new_path=`cmd //c echo $path`
55773  fi
55774
55775
55776  input_path="$new_path"
55777  # Check if we need to convert this using DOS-style short mode. If the path
55778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55779  # take no chances and rewrite it.
55780  # Note: m4 eats our [], so we need to use [ and ] instead.
55781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55782  if test "x$has_forbidden_chars" != x; then
55783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55784    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55785  fi
55786
55787
55788  windows_path="$new_path"
55789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55790    unix_path=`$CYGPATH -u "$windows_path"`
55791    new_path="$unix_path"
55792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55794    new_path="$unix_path"
55795  fi
55796
55797  if test "x$path" != "x$new_path"; then
55798    MSVC_DLL="$new_path"
55799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55800$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55801  fi
55802
55803  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55804  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55805
55806    else
55807      # We're on a unix platform. Hooray! :)
55808      path="$MSVC_DLL"
55809      has_space=`$ECHO "$path" | $GREP " "`
55810      if test "x$has_space" != x; then
55811        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55812$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55813        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55814      fi
55815
55816      # Use eval to expand a potential ~
55817      eval path="$path"
55818      if test ! -f "$path" && test ! -d "$path"; then
55819        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55820      fi
55821
55822      if test -d "$path"; then
55823        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55824      else
55825        dir="`$DIRNAME "$path"`"
55826        base="`$BASENAME "$path"`"
55827        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55828      fi
55829    fi
55830  fi
55831
55832      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55833$as_echo_n "checking for $DLL_NAME... " >&6; }
55834      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55835$as_echo "$MSVC_DLL" >&6; }
55836    else
55837      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55838$as_echo "incorrect, ignoring" >&6; }
55839      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55840$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55841    fi
55842  fi
55843
55844    fi
55845  fi
55846
55847  if test "x$MSVC_DLL" = x; then
55848    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55849$as_echo_n "checking for $DLL_NAME... " >&6; }
55850    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55851$as_echo "no" >&6; }
55852    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55853  fi
55854
55855      MSVCP_DLL="$MSVC_DLL"
55856    fi
55857
55858  fi
55859
55860  fi
55861
55862
55863  if test "x$NEEDS_LIB_X11" = xfalse; then
55864    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55865      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55866$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55867    fi
55868    X_CFLAGS=
55869    X_LIBS=
55870  else
55871
55872    if test "x${with_x}" = xno; then
55873      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55874    fi
55875
55876    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55877      # The user has specified a X11 base directory. Use it for includes and
55878      # libraries, unless explicitely overridden.
55879      if test "x$x_includes" = xNONE; then
55880        x_includes="${with_x}/include"
55881      fi
55882      if test "x$x_libraries" = xNONE; then
55883        x_libraries="${with_x}/lib"
55884      fi
55885    else
55886      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55887      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55888      # --x-libraries for the sysroot, if that seems to be correct.
55889      if test "x$SYSROOT" != "x"; then
55890        if test "x$x_includes" = xNONE; then
55891          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55892            x_includes="$SYSROOT/usr/X11R6/include"
55893          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55894            x_includes="$SYSROOT/usr/include"
55895          fi
55896        fi
55897        if test "x$x_libraries" = xNONE; then
55898          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55899            x_libraries="$SYSROOT/usr/X11R6/lib"
55900          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55901            x_libraries="$SYSROOT/usr/lib64"
55902          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55903            x_libraries="$SYSROOT/usr/lib"
55904          fi
55905        fi
55906      fi
55907    fi
55908
55909    # Now let autoconf do it's magic
55910    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55911$as_echo_n "checking for X... " >&6; }
55912
55913
55914# Check whether --with-x was given.
55915if test "${with_x+set}" = set; then :
55916  withval=$with_x;
55917fi
55918
55919# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55920if test "x$with_x" = xno; then
55921  # The user explicitly disabled X.
55922  have_x=disabled
55923else
55924  case $x_includes,$x_libraries in #(
55925    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55926    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55927  $as_echo_n "(cached) " >&6
55928else
55929  # One or both of the vars are not set, and there is no cached value.
55930ac_x_includes=no ac_x_libraries=no
55931rm -f -r conftest.dir
55932if mkdir conftest.dir; then
55933  cd conftest.dir
55934  cat >Imakefile <<'_ACEOF'
55935incroot:
55936	@echo incroot='${INCROOT}'
55937usrlibdir:
55938	@echo usrlibdir='${USRLIBDIR}'
55939libdir:
55940	@echo libdir='${LIBDIR}'
55941_ACEOF
55942  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55943    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55944    for ac_var in incroot usrlibdir libdir; do
55945      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55946    done
55947    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55948    for ac_extension in a so sl dylib la dll; do
55949      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55950	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55951	ac_im_usrlibdir=$ac_im_libdir; break
55952      fi
55953    done
55954    # Screen out bogus values from the imake configuration.  They are
55955    # bogus both because they are the default anyway, and because
55956    # using them would break gcc on systems where it needs fixed includes.
55957    case $ac_im_incroot in
55958	/usr/include) ac_x_includes= ;;
55959	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55960    esac
55961    case $ac_im_usrlibdir in
55962	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55963	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55964    esac
55965  fi
55966  cd ..
55967  rm -f -r conftest.dir
55968fi
55969
55970# Standard set of common directories for X headers.
55971# Check X11 before X11Rn because it is often a symlink to the current release.
55972ac_x_header_dirs='
55973/usr/X11/include
55974/usr/X11R7/include
55975/usr/X11R6/include
55976/usr/X11R5/include
55977/usr/X11R4/include
55978
55979/usr/include/X11
55980/usr/include/X11R7
55981/usr/include/X11R6
55982/usr/include/X11R5
55983/usr/include/X11R4
55984
55985/usr/local/X11/include
55986/usr/local/X11R7/include
55987/usr/local/X11R6/include
55988/usr/local/X11R5/include
55989/usr/local/X11R4/include
55990
55991/usr/local/include/X11
55992/usr/local/include/X11R7
55993/usr/local/include/X11R6
55994/usr/local/include/X11R5
55995/usr/local/include/X11R4
55996
55997/usr/X386/include
55998/usr/x386/include
55999/usr/XFree86/include/X11
56000
56001/usr/include
56002/usr/local/include
56003/usr/unsupported/include
56004/usr/athena/include
56005/usr/local/x11r5/include
56006/usr/lpp/Xamples/include
56007
56008/usr/openwin/include
56009/usr/openwin/share/include'
56010
56011if test "$ac_x_includes" = no; then
56012  # Guess where to find include files, by looking for Xlib.h.
56013  # First, try using that file with no special directory specified.
56014  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56015/* end confdefs.h.  */
56016#include <X11/Xlib.h>
56017_ACEOF
56018if ac_fn_cxx_try_cpp "$LINENO"; then :
56019  # We can compile using X headers with no special include directory.
56020ac_x_includes=
56021else
56022  for ac_dir in $ac_x_header_dirs; do
56023  if test -r "$ac_dir/X11/Xlib.h"; then
56024    ac_x_includes=$ac_dir
56025    break
56026  fi
56027done
56028fi
56029rm -f conftest.err conftest.i conftest.$ac_ext
56030fi # $ac_x_includes = no
56031
56032if test "$ac_x_libraries" = no; then
56033  # Check for the libraries.
56034  # See if we find them without any special options.
56035  # Don't add to $LIBS permanently.
56036  ac_save_LIBS=$LIBS
56037  LIBS="-lX11 $LIBS"
56038  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56039/* end confdefs.h.  */
56040#include <X11/Xlib.h>
56041int
56042main ()
56043{
56044XrmInitialize ()
56045  ;
56046  return 0;
56047}
56048_ACEOF
56049if ac_fn_cxx_try_link "$LINENO"; then :
56050  LIBS=$ac_save_LIBS
56051# We can link X programs with no special library path.
56052ac_x_libraries=
56053else
56054  LIBS=$ac_save_LIBS
56055for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56056do
56057  # Don't even attempt the hair of trying to link an X program!
56058  for ac_extension in a so sl dylib la dll; do
56059    if test -r "$ac_dir/libX11.$ac_extension"; then
56060      ac_x_libraries=$ac_dir
56061      break 2
56062    fi
56063  done
56064done
56065fi
56066rm -f core conftest.err conftest.$ac_objext \
56067    conftest$ac_exeext conftest.$ac_ext
56068fi # $ac_x_libraries = no
56069
56070case $ac_x_includes,$ac_x_libraries in #(
56071  no,* | *,no | *\'*)
56072    # Didn't find X, or a directory has "'" in its name.
56073    ac_cv_have_x="have_x=no";; #(
56074  *)
56075    # Record where we found X for the cache.
56076    ac_cv_have_x="have_x=yes\
56077	ac_x_includes='$ac_x_includes'\
56078	ac_x_libraries='$ac_x_libraries'"
56079esac
56080fi
56081;; #(
56082    *) have_x=yes;;
56083  esac
56084  eval "$ac_cv_have_x"
56085fi # $with_x != no
56086
56087if test "$have_x" != yes; then
56088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56089$as_echo "$have_x" >&6; }
56090  no_x=yes
56091else
56092  # If each of the values was on the command line, it overrides each guess.
56093  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56094  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56095  # Update the cache value to reflect the command line values.
56096  ac_cv_have_x="have_x=yes\
56097	ac_x_includes='$x_includes'\
56098	ac_x_libraries='$x_libraries'"
56099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56100$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56101fi
56102
56103    if test "$no_x" = yes; then
56104  # Not all programs may use this symbol, but it does not hurt to define it.
56105
56106$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56107
56108  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56109else
56110  if test -n "$x_includes"; then
56111    X_CFLAGS="$X_CFLAGS -I$x_includes"
56112  fi
56113
56114  # It would also be nice to do this for all -L options, not just this one.
56115  if test -n "$x_libraries"; then
56116    X_LIBS="$X_LIBS -L$x_libraries"
56117    # For Solaris; some versions of Sun CC require a space after -R and
56118    # others require no space.  Words are not sufficient . . . .
56119    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56120$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56121    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56122    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56123    ac_cxx_werror_flag=yes
56124    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56125/* end confdefs.h.  */
56126
56127int
56128main ()
56129{
56130
56131  ;
56132  return 0;
56133}
56134_ACEOF
56135if ac_fn_cxx_try_link "$LINENO"; then :
56136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56137$as_echo "no" >&6; }
56138       X_LIBS="$X_LIBS -R$x_libraries"
56139else
56140  LIBS="$ac_xsave_LIBS -R $x_libraries"
56141       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56142/* end confdefs.h.  */
56143
56144int
56145main ()
56146{
56147
56148  ;
56149  return 0;
56150}
56151_ACEOF
56152if ac_fn_cxx_try_link "$LINENO"; then :
56153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56154$as_echo "yes" >&6; }
56155	  X_LIBS="$X_LIBS -R $x_libraries"
56156else
56157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56158$as_echo "neither works" >&6; }
56159fi
56160rm -f core conftest.err conftest.$ac_objext \
56161    conftest$ac_exeext conftest.$ac_ext
56162fi
56163rm -f core conftest.err conftest.$ac_objext \
56164    conftest$ac_exeext conftest.$ac_ext
56165    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56166    LIBS=$ac_xsave_LIBS
56167  fi
56168
56169  # Check for system-dependent libraries X programs must link with.
56170  # Do this before checking for the system-independent R6 libraries
56171  # (-lICE), since we may need -lsocket or whatever for X linking.
56172
56173  if test "$ISC" = yes; then
56174    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56175  else
56176    # Martyn Johnson says this is needed for Ultrix, if the X
56177    # libraries were built with DECnet support.  And Karl Berry says
56178    # the Alpha needs dnet_stub (dnet does not exist).
56179    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56180    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56181/* end confdefs.h.  */
56182
56183/* Override any GCC internal prototype to avoid an error.
56184   Use char because int might match the return type of a GCC
56185   builtin and then its argument prototype would still apply.  */
56186#ifdef __cplusplus
56187extern "C"
56188#endif
56189char XOpenDisplay ();
56190int
56191main ()
56192{
56193return XOpenDisplay ();
56194  ;
56195  return 0;
56196}
56197_ACEOF
56198if ac_fn_cxx_try_link "$LINENO"; then :
56199
56200else
56201  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56202$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56203if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56204  $as_echo_n "(cached) " >&6
56205else
56206  ac_check_lib_save_LIBS=$LIBS
56207LIBS="-ldnet  $LIBS"
56208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56209/* end confdefs.h.  */
56210
56211/* Override any GCC internal prototype to avoid an error.
56212   Use char because int might match the return type of a GCC
56213   builtin and then its argument prototype would still apply.  */
56214#ifdef __cplusplus
56215extern "C"
56216#endif
56217char dnet_ntoa ();
56218int
56219main ()
56220{
56221return dnet_ntoa ();
56222  ;
56223  return 0;
56224}
56225_ACEOF
56226if ac_fn_cxx_try_link "$LINENO"; then :
56227  ac_cv_lib_dnet_dnet_ntoa=yes
56228else
56229  ac_cv_lib_dnet_dnet_ntoa=no
56230fi
56231rm -f core conftest.err conftest.$ac_objext \
56232    conftest$ac_exeext conftest.$ac_ext
56233LIBS=$ac_check_lib_save_LIBS
56234fi
56235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56236$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56237if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56238  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56239fi
56240
56241    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56242      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56243$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56244if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56245  $as_echo_n "(cached) " >&6
56246else
56247  ac_check_lib_save_LIBS=$LIBS
56248LIBS="-ldnet_stub  $LIBS"
56249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56250/* end confdefs.h.  */
56251
56252/* Override any GCC internal prototype to avoid an error.
56253   Use char because int might match the return type of a GCC
56254   builtin and then its argument prototype would still apply.  */
56255#ifdef __cplusplus
56256extern "C"
56257#endif
56258char dnet_ntoa ();
56259int
56260main ()
56261{
56262return dnet_ntoa ();
56263  ;
56264  return 0;
56265}
56266_ACEOF
56267if ac_fn_cxx_try_link "$LINENO"; then :
56268  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56269else
56270  ac_cv_lib_dnet_stub_dnet_ntoa=no
56271fi
56272rm -f core conftest.err conftest.$ac_objext \
56273    conftest$ac_exeext conftest.$ac_ext
56274LIBS=$ac_check_lib_save_LIBS
56275fi
56276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56277$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56278if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56279  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56280fi
56281
56282    fi
56283fi
56284rm -f core conftest.err conftest.$ac_objext \
56285    conftest$ac_exeext conftest.$ac_ext
56286    LIBS="$ac_xsave_LIBS"
56287
56288    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56289    # to get the SysV transport functions.
56290    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56291    # needs -lnsl.
56292    # The nsl library prevents programs from opening the X display
56293    # on Irix 5.2, according to T.E. Dickey.
56294    # The functions gethostbyname, getservbyname, and inet_addr are
56295    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56296    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56297if test "x$ac_cv_func_gethostbyname" = xyes; then :
56298
56299fi
56300
56301    if test $ac_cv_func_gethostbyname = no; then
56302      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56303$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56304if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56305  $as_echo_n "(cached) " >&6
56306else
56307  ac_check_lib_save_LIBS=$LIBS
56308LIBS="-lnsl  $LIBS"
56309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56310/* end confdefs.h.  */
56311
56312/* Override any GCC internal prototype to avoid an error.
56313   Use char because int might match the return type of a GCC
56314   builtin and then its argument prototype would still apply.  */
56315#ifdef __cplusplus
56316extern "C"
56317#endif
56318char gethostbyname ();
56319int
56320main ()
56321{
56322return gethostbyname ();
56323  ;
56324  return 0;
56325}
56326_ACEOF
56327if ac_fn_cxx_try_link "$LINENO"; then :
56328  ac_cv_lib_nsl_gethostbyname=yes
56329else
56330  ac_cv_lib_nsl_gethostbyname=no
56331fi
56332rm -f core conftest.err conftest.$ac_objext \
56333    conftest$ac_exeext conftest.$ac_ext
56334LIBS=$ac_check_lib_save_LIBS
56335fi
56336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56337$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56338if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56339  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56340fi
56341
56342      if test $ac_cv_lib_nsl_gethostbyname = no; then
56343	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56344$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56345if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56346  $as_echo_n "(cached) " >&6
56347else
56348  ac_check_lib_save_LIBS=$LIBS
56349LIBS="-lbsd  $LIBS"
56350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56351/* end confdefs.h.  */
56352
56353/* Override any GCC internal prototype to avoid an error.
56354   Use char because int might match the return type of a GCC
56355   builtin and then its argument prototype would still apply.  */
56356#ifdef __cplusplus
56357extern "C"
56358#endif
56359char gethostbyname ();
56360int
56361main ()
56362{
56363return gethostbyname ();
56364  ;
56365  return 0;
56366}
56367_ACEOF
56368if ac_fn_cxx_try_link "$LINENO"; then :
56369  ac_cv_lib_bsd_gethostbyname=yes
56370else
56371  ac_cv_lib_bsd_gethostbyname=no
56372fi
56373rm -f core conftest.err conftest.$ac_objext \
56374    conftest$ac_exeext conftest.$ac_ext
56375LIBS=$ac_check_lib_save_LIBS
56376fi
56377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56378$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56379if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56380  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56381fi
56382
56383      fi
56384    fi
56385
56386    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56387    # socket/setsockopt and other routines are undefined under SCO ODT
56388    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56389    # on later versions), says Simon Leinen: it contains gethostby*
56390    # variants that don't use the name server (or something).  -lsocket
56391    # must be given before -lnsl if both are needed.  We assume that
56392    # if connect needs -lnsl, so does gethostbyname.
56393    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56394if test "x$ac_cv_func_connect" = xyes; then :
56395
56396fi
56397
56398    if test $ac_cv_func_connect = no; then
56399      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56400$as_echo_n "checking for connect in -lsocket... " >&6; }
56401if ${ac_cv_lib_socket_connect+:} false; then :
56402  $as_echo_n "(cached) " >&6
56403else
56404  ac_check_lib_save_LIBS=$LIBS
56405LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56407/* end confdefs.h.  */
56408
56409/* Override any GCC internal prototype to avoid an error.
56410   Use char because int might match the return type of a GCC
56411   builtin and then its argument prototype would still apply.  */
56412#ifdef __cplusplus
56413extern "C"
56414#endif
56415char connect ();
56416int
56417main ()
56418{
56419return connect ();
56420  ;
56421  return 0;
56422}
56423_ACEOF
56424if ac_fn_cxx_try_link "$LINENO"; then :
56425  ac_cv_lib_socket_connect=yes
56426else
56427  ac_cv_lib_socket_connect=no
56428fi
56429rm -f core conftest.err conftest.$ac_objext \
56430    conftest$ac_exeext conftest.$ac_ext
56431LIBS=$ac_check_lib_save_LIBS
56432fi
56433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56434$as_echo "$ac_cv_lib_socket_connect" >&6; }
56435if test "x$ac_cv_lib_socket_connect" = xyes; then :
56436  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56437fi
56438
56439    fi
56440
56441    # Guillermo Gomez says -lposix is necessary on A/UX.
56442    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56443if test "x$ac_cv_func_remove" = xyes; then :
56444
56445fi
56446
56447    if test $ac_cv_func_remove = no; then
56448      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56449$as_echo_n "checking for remove in -lposix... " >&6; }
56450if ${ac_cv_lib_posix_remove+:} false; then :
56451  $as_echo_n "(cached) " >&6
56452else
56453  ac_check_lib_save_LIBS=$LIBS
56454LIBS="-lposix  $LIBS"
56455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56456/* end confdefs.h.  */
56457
56458/* Override any GCC internal prototype to avoid an error.
56459   Use char because int might match the return type of a GCC
56460   builtin and then its argument prototype would still apply.  */
56461#ifdef __cplusplus
56462extern "C"
56463#endif
56464char remove ();
56465int
56466main ()
56467{
56468return remove ();
56469  ;
56470  return 0;
56471}
56472_ACEOF
56473if ac_fn_cxx_try_link "$LINENO"; then :
56474  ac_cv_lib_posix_remove=yes
56475else
56476  ac_cv_lib_posix_remove=no
56477fi
56478rm -f core conftest.err conftest.$ac_objext \
56479    conftest$ac_exeext conftest.$ac_ext
56480LIBS=$ac_check_lib_save_LIBS
56481fi
56482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56483$as_echo "$ac_cv_lib_posix_remove" >&6; }
56484if test "x$ac_cv_lib_posix_remove" = xyes; then :
56485  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56486fi
56487
56488    fi
56489
56490    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56491    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56492if test "x$ac_cv_func_shmat" = xyes; then :
56493
56494fi
56495
56496    if test $ac_cv_func_shmat = no; then
56497      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56498$as_echo_n "checking for shmat in -lipc... " >&6; }
56499if ${ac_cv_lib_ipc_shmat+:} false; then :
56500  $as_echo_n "(cached) " >&6
56501else
56502  ac_check_lib_save_LIBS=$LIBS
56503LIBS="-lipc  $LIBS"
56504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56505/* end confdefs.h.  */
56506
56507/* Override any GCC internal prototype to avoid an error.
56508   Use char because int might match the return type of a GCC
56509   builtin and then its argument prototype would still apply.  */
56510#ifdef __cplusplus
56511extern "C"
56512#endif
56513char shmat ();
56514int
56515main ()
56516{
56517return shmat ();
56518  ;
56519  return 0;
56520}
56521_ACEOF
56522if ac_fn_cxx_try_link "$LINENO"; then :
56523  ac_cv_lib_ipc_shmat=yes
56524else
56525  ac_cv_lib_ipc_shmat=no
56526fi
56527rm -f core conftest.err conftest.$ac_objext \
56528    conftest$ac_exeext conftest.$ac_ext
56529LIBS=$ac_check_lib_save_LIBS
56530fi
56531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56532$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56533if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56534  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56535fi
56536
56537    fi
56538  fi
56539
56540  # Check for libraries that X11R6 Xt/Xaw programs need.
56541  ac_save_LDFLAGS=$LDFLAGS
56542  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56543  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56544  # check for ICE first), but we must link in the order -lSM -lICE or
56545  # we get undefined symbols.  So assume we have SM if we have ICE.
56546  # These have to be linked with before -lX11, unlike the other
56547  # libraries we check for below, so use a different variable.
56548  # John Interrante, Karl Berry
56549  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56550$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56551if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56552  $as_echo_n "(cached) " >&6
56553else
56554  ac_check_lib_save_LIBS=$LIBS
56555LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56557/* end confdefs.h.  */
56558
56559/* Override any GCC internal prototype to avoid an error.
56560   Use char because int might match the return type of a GCC
56561   builtin and then its argument prototype would still apply.  */
56562#ifdef __cplusplus
56563extern "C"
56564#endif
56565char IceConnectionNumber ();
56566int
56567main ()
56568{
56569return IceConnectionNumber ();
56570  ;
56571  return 0;
56572}
56573_ACEOF
56574if ac_fn_cxx_try_link "$LINENO"; then :
56575  ac_cv_lib_ICE_IceConnectionNumber=yes
56576else
56577  ac_cv_lib_ICE_IceConnectionNumber=no
56578fi
56579rm -f core conftest.err conftest.$ac_objext \
56580    conftest$ac_exeext conftest.$ac_ext
56581LIBS=$ac_check_lib_save_LIBS
56582fi
56583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56584$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56585if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56586  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56587fi
56588
56589  LDFLAGS=$ac_save_LDFLAGS
56590
56591fi
56592
56593
56594    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56595    # this doesn't make sense so we remove it.
56596    if test "x$COMPILE_TYPE" = xcross; then
56597      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56598    fi
56599
56600    if test "x$no_x" = xyes; then
56601
56602  # Print a helpful message on how to acquire the necessary build dependency.
56603  # x11 is the help tag: freetype, cups, alsa etc
56604  MISSING_DEPENDENCY=x11
56605
56606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56607    cygwin_help $MISSING_DEPENDENCY
56608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56609    msys_help $MISSING_DEPENDENCY
56610  else
56611    PKGHANDLER_COMMAND=
56612
56613    case $PKGHANDLER in
56614      apt-get)
56615        apt_help     $MISSING_DEPENDENCY ;;
56616      yum)
56617        yum_help     $MISSING_DEPENDENCY ;;
56618      port)
56619        port_help    $MISSING_DEPENDENCY ;;
56620      pkgutil)
56621        pkgutil_help $MISSING_DEPENDENCY ;;
56622      pkgadd)
56623        pkgadd_help  $MISSING_DEPENDENCY ;;
56624    esac
56625
56626    if test "x$PKGHANDLER_COMMAND" != x; then
56627      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56628    fi
56629  fi
56630
56631      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56632    fi
56633
56634    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56635      OPENWIN_HOME="/usr/openwin"
56636      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56637      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56638          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56639    fi
56640
56641    ac_ext=c
56642ac_cpp='$CPP $CPPFLAGS'
56643ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56644ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56645ac_compiler_gnu=$ac_cv_c_compiler_gnu
56646
56647    OLD_CFLAGS="$CFLAGS"
56648    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56649
56650    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56651    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56652do :
56653  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56654ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56655          # include <X11/Xlib.h>
56656          # include <X11/Xutil.h>
56657
56658
56659"
56660if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56661  cat >>confdefs.h <<_ACEOF
56662#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56663_ACEOF
56664 X11_HEADERS_OK=yes
56665else
56666  X11_HEADERS_OK=no; break
56667fi
56668
56669done
56670
56671
56672    if test "x$X11_HEADERS_OK" = xno; then
56673
56674  # Print a helpful message on how to acquire the necessary build dependency.
56675  # x11 is the help tag: freetype, cups, alsa etc
56676  MISSING_DEPENDENCY=x11
56677
56678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56679    cygwin_help $MISSING_DEPENDENCY
56680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56681    msys_help $MISSING_DEPENDENCY
56682  else
56683    PKGHANDLER_COMMAND=
56684
56685    case $PKGHANDLER in
56686      apt-get)
56687        apt_help     $MISSING_DEPENDENCY ;;
56688      yum)
56689        yum_help     $MISSING_DEPENDENCY ;;
56690      port)
56691        port_help    $MISSING_DEPENDENCY ;;
56692      pkgutil)
56693        pkgutil_help $MISSING_DEPENDENCY ;;
56694      pkgadd)
56695        pkgadd_help  $MISSING_DEPENDENCY ;;
56696    esac
56697
56698    if test "x$PKGHANDLER_COMMAND" != x; then
56699      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56700    fi
56701  fi
56702
56703      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56704    fi
56705
56706    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56707    # defined in libawt_xawt.
56708    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56709$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56710    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56711/* end confdefs.h.  */
56712#include <X11/extensions/Xrender.h>
56713int
56714main ()
56715{
56716XLinearGradient x;
56717  ;
56718  return 0;
56719}
56720_ACEOF
56721if ac_fn_c_try_compile "$LINENO"; then :
56722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56723$as_echo "yes" >&6; }
56724else
56725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56726$as_echo "no" >&6; }
56727         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56728fi
56729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56730
56731    CFLAGS="$OLD_CFLAGS"
56732    ac_ext=cpp
56733ac_cpp='$CXXCPP $CPPFLAGS'
56734ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56735ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56736ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56737
56738  fi # NEEDS_LIB_X11
56739
56740
56741
56742
56743
56744
56745# Check whether --with-cups was given.
56746if test "${with_cups+set}" = set; then :
56747  withval=$with_cups;
56748fi
56749
56750
56751# Check whether --with-cups-include was given.
56752if test "${with_cups_include+set}" = set; then :
56753  withval=$with_cups_include;
56754fi
56755
56756
56757  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56758    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56759        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56760      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56761$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56762    fi
56763    CUPS_CFLAGS=
56764  else
56765    CUPS_FOUND=no
56766
56767    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56768      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56769    fi
56770
56771    if test "x${with_cups}" != x; then
56772      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56773$as_echo_n "checking for cups headers... " >&6; }
56774      if test -s "${with_cups}/include/cups/cups.h"; then
56775        CUPS_CFLAGS="-I${with_cups}/include"
56776        CUPS_FOUND=yes
56777        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56778$as_echo "$CUPS_FOUND" >&6; }
56779      else
56780        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56781      fi
56782    fi
56783    if test "x${with_cups_include}" != x; then
56784      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56785$as_echo_n "checking for cups headers... " >&6; }
56786      if test -s "${with_cups_include}/cups/cups.h"; then
56787        CUPS_CFLAGS="-I${with_cups_include}"
56788        CUPS_FOUND=yes
56789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56790$as_echo "$CUPS_FOUND" >&6; }
56791      else
56792        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56793      fi
56794    fi
56795    if test "x$CUPS_FOUND" = xno; then
56796      # Are the cups headers installed in the default /usr/include location?
56797      for ac_header in cups/cups.h cups/ppd.h
56798do :
56799  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56800ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56801if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56802  cat >>confdefs.h <<_ACEOF
56803#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56804_ACEOF
56805
56806          CUPS_FOUND=yes
56807          CUPS_CFLAGS=
56808          DEFAULT_CUPS=yes
56809
56810fi
56811
56812done
56813
56814    fi
56815    if test "x$CUPS_FOUND" = xno; then
56816
56817  # Print a helpful message on how to acquire the necessary build dependency.
56818  # cups is the help tag: freetype, cups, alsa etc
56819  MISSING_DEPENDENCY=cups
56820
56821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56822    cygwin_help $MISSING_DEPENDENCY
56823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56824    msys_help $MISSING_DEPENDENCY
56825  else
56826    PKGHANDLER_COMMAND=
56827
56828    case $PKGHANDLER in
56829      apt-get)
56830        apt_help     $MISSING_DEPENDENCY ;;
56831      yum)
56832        yum_help     $MISSING_DEPENDENCY ;;
56833      port)
56834        port_help    $MISSING_DEPENDENCY ;;
56835      pkgutil)
56836        pkgutil_help $MISSING_DEPENDENCY ;;
56837      pkgadd)
56838        pkgadd_help  $MISSING_DEPENDENCY ;;
56839    esac
56840
56841    if test "x$PKGHANDLER_COMMAND" != x; then
56842      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56843    fi
56844  fi
56845
56846      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56847    fi
56848  fi
56849
56850
56851
56852
56853
56854# Check whether --with-freetype was given.
56855if test "${with_freetype+set}" = set; then :
56856  withval=$with_freetype;
56857fi
56858
56859
56860# Check whether --with-freetype-include was given.
56861if test "${with_freetype_include+set}" = set; then :
56862  withval=$with_freetype_include;
56863fi
56864
56865
56866# Check whether --with-freetype-lib was given.
56867if test "${with_freetype_lib+set}" = set; then :
56868  withval=$with_freetype_lib;
56869fi
56870
56871
56872# Check whether --with-freetype-src was given.
56873if test "${with_freetype_src+set}" = set; then :
56874  withval=$with_freetype_src;
56875fi
56876
56877  # Check whether --enable-freetype-bundling was given.
56878if test "${enable_freetype_bundling+set}" = set; then :
56879  enableval=$enable_freetype_bundling;
56880fi
56881
56882
56883  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56884  FREETYPE_BASE_NAME=freetype
56885  FREETYPE_CFLAGS=
56886  FREETYPE_LIBS=
56887  FREETYPE_BUNDLE_LIB_PATH=
56888
56889  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56890    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56891        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56892        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56893        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56894      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56895$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56896    fi
56897    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56898      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56899$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56900    fi
56901  else
56902    # freetype is needed to build; go get it!
56903
56904    BUNDLE_FREETYPE="$enable_freetype_bundling"
56905
56906    if  test "x$with_freetype_src" != x; then
56907      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56908        # Try to build freetype if --with-freetype-src was given on Windows
56909
56910  FREETYPE_SRC_PATH="$with_freetype_src"
56911  BUILD_FREETYPE=yes
56912
56913  # Check if the freetype sources are acessible..
56914  if ! test -d $FREETYPE_SRC_PATH; then
56915    { $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
56916$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56917    BUILD_FREETYPE=no
56918  fi
56919  # ..and contain a vc2010 project file
56920  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56921  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56922    { $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
56923$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56924    BUILD_FREETYPE=no
56925  fi
56926  # Now check if configure found a version of 'msbuild.exe'
56927  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56928    { $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
56929$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;}
56930    BUILD_FREETYPE=no
56931  fi
56932
56933  # Ready to go..
56934  if test "x$BUILD_FREETYPE" = xyes; then
56935    # msbuild requires trailing slashes for output directories
56936    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56937    freetype_lib_path_unix="$freetype_lib_path"
56938    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56939
56940  unix_path="$vcxproj_path"
56941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56942    windows_path=`$CYGPATH -m "$unix_path"`
56943    vcxproj_path="$windows_path"
56944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56945    windows_path=`cmd //c echo $unix_path`
56946    vcxproj_path="$windows_path"
56947  fi
56948
56949
56950  unix_path="$freetype_lib_path"
56951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56952    windows_path=`$CYGPATH -m "$unix_path"`
56953    freetype_lib_path="$windows_path"
56954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56955    windows_path=`cmd //c echo $unix_path`
56956    freetype_lib_path="$windows_path"
56957  fi
56958
56959
56960  unix_path="$freetype_obj_path"
56961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56962    windows_path=`$CYGPATH -m "$unix_path"`
56963    freetype_obj_path="$windows_path"
56964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56965    windows_path=`cmd //c echo $unix_path`
56966    freetype_obj_path="$windows_path"
56967  fi
56968
56969    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56970      freetype_platform=x64
56971    else
56972      freetype_platform=win32
56973    fi
56974
56975    # The original freetype project file is for VS 2010 (i.e. 'v100'),
56976    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56977    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56978    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56979    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56980$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56981
56982    # First we try to build the freetype.dll
56983    $ECHO -e "@echo off\n"\
56984        "$MSBUILD $vcxproj_path "\
56985        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56986        "/p:Configuration=\"Release Multithreaded\" "\
56987        "/p:Platform=$freetype_platform "\
56988        "/p:ConfigurationType=DynamicLibrary "\
56989        "/p:TargetName=freetype "\
56990        "/p:OutDir=\"$freetype_lib_path\" "\
56991        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56992    cmd /c freetype.bat
56993
56994    if test -s "$freetype_lib_path_unix/freetype.dll"; then
56995      # If that succeeds we also build freetype.lib
56996      $ECHO -e "@echo off\n"\
56997          "$MSBUILD $vcxproj_path "\
56998          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56999          "/p:Configuration=\"Release Multithreaded\" "\
57000          "/p:Platform=$freetype_platform "\
57001          "/p:ConfigurationType=StaticLibrary "\
57002          "/p:TargetName=freetype "\
57003          "/p:OutDir=\"$freetype_lib_path\" "\
57004          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57005      cmd /c freetype.bat
57006
57007      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57008        # Once we build both, lib and dll, set freetype lib and include path appropriately
57009        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57010        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57011        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57012$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57013      else
57014        BUILD_FREETYPE=no
57015      fi
57016    else
57017      BUILD_FREETYPE=no
57018    fi
57019  fi
57020
57021        if test "x$BUILD_FREETYPE" = xyes; then
57022          # Okay, we built it. Check that it works.
57023
57024  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57025  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57026  METHOD="--with-freetype-src"
57027
57028  # Let's start with an optimistic view of the world :-)
57029  FOUND_FREETYPE=yes
57030
57031  # First look for the canonical freetype main include file ft2build.h.
57032  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57033    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57034    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57035    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57036      # Fail.
57037      FOUND_FREETYPE=no
57038    fi
57039  fi
57040
57041  if test "x$FOUND_FREETYPE" = xyes; then
57042    # Include file found, let's continue the sanity check.
57043    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57044$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57045
57046    # Reset to default value
57047    FREETYPE_BASE_NAME=freetype
57048    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57049    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57050      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57051          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57052        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57053        # for the .6 version explicitly.
57054        FREETYPE_BASE_NAME=freetype.6
57055        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57056        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57057$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57058      else
57059        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57060$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57061        FOUND_FREETYPE=no
57062      fi
57063    else
57064      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57065        # On Windows, we will need both .lib and .dll file.
57066        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57067          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57068$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57069          FOUND_FREETYPE=no
57070        fi
57071      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57072          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57073        # Found lib in isa dir, use that instead.
57074        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57075        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57076$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57077      fi
57078    fi
57079  fi
57080
57081  if test "x$FOUND_FREETYPE" = xyes; then
57082
57083  # Only process if variable expands to non-empty
57084
57085  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57086    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57087
57088  # Input might be given as Windows format, start by converting to
57089  # unix format.
57090  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57091  new_path=`$CYGPATH -u "$path"`
57092
57093  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57094  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57095  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57096  # "foo.exe" is OK but "foo" is an error.
57097  #
57098  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57099  # It is also a way to make sure we got the proper file name for the real test later on.
57100  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57101  if test "x$test_shortpath" = x; then
57102    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57103$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57104    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57105  fi
57106
57107  # Call helper function which possibly converts this using DOS-style short mode.
57108  # If so, the updated path is stored in $new_path.
57109
57110  input_path="$new_path"
57111  # Check if we need to convert this using DOS-style short mode. If the path
57112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57113  # take no chances and rewrite it.
57114  # Note: m4 eats our [], so we need to use [ and ] instead.
57115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57116  if test "x$has_forbidden_chars" != x; then
57117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57118    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57119    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57120    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57121      # Going to short mode and back again did indeed matter. Since short mode is
57122      # case insensitive, let's make it lowercase to improve readability.
57123      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57124      # Now convert it back to Unix-style (cygpath)
57125      input_path=`$CYGPATH -u "$shortmode_path"`
57126      new_path="$input_path"
57127    fi
57128  fi
57129
57130  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57131  if test "x$test_cygdrive_prefix" = x; then
57132    # As a simple fix, exclude /usr/bin since it's not a real path.
57133    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57134      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57135      # a path prefixed by /cygdrive for fixpath to work.
57136      new_path="$CYGWIN_ROOT_PATH$input_path"
57137    fi
57138  fi
57139
57140
57141  if test "x$path" != "x$new_path"; then
57142    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57144$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57145  fi
57146
57147    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57148
57149  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57150  has_colon=`$ECHO $path | $GREP ^.:`
57151  new_path="$path"
57152  if test "x$has_colon" = x; then
57153    # Not in mixed or Windows style, start by that.
57154    new_path=`cmd //c echo $path`
57155  fi
57156
57157
57158  input_path="$new_path"
57159  # Check if we need to convert this using DOS-style short mode. If the path
57160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57161  # take no chances and rewrite it.
57162  # Note: m4 eats our [], so we need to use [ and ] instead.
57163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57164  if test "x$has_forbidden_chars" != x; then
57165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57166    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57167  fi
57168
57169
57170  windows_path="$new_path"
57171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57172    unix_path=`$CYGPATH -u "$windows_path"`
57173    new_path="$unix_path"
57174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57176    new_path="$unix_path"
57177  fi
57178
57179  if test "x$path" != "x$new_path"; then
57180    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57181    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57182$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57183  fi
57184
57185  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57186  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57187
57188    else
57189      # We're on a unix platform. Hooray! :)
57190      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57191      has_space=`$ECHO "$path" | $GREP " "`
57192      if test "x$has_space" != x; then
57193        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57194$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57195        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57196      fi
57197
57198      # Use eval to expand a potential ~
57199      eval path="$path"
57200      if test ! -f "$path" && test ! -d "$path"; then
57201        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57202      fi
57203
57204      if test -d "$path"; then
57205        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57206      else
57207        dir="`$DIRNAME "$path"`"
57208        base="`$BASENAME "$path"`"
57209        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57210      fi
57211    fi
57212  fi
57213
57214
57215  # Only process if variable expands to non-empty
57216
57217  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57218    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57219
57220  # Input might be given as Windows format, start by converting to
57221  # unix format.
57222  path="$POTENTIAL_FREETYPE_LIB_PATH"
57223  new_path=`$CYGPATH -u "$path"`
57224
57225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57228  # "foo.exe" is OK but "foo" is an error.
57229  #
57230  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57231  # It is also a way to make sure we got the proper file name for the real test later on.
57232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57233  if test "x$test_shortpath" = x; then
57234    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57235$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57236    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57237  fi
57238
57239  # Call helper function which possibly converts this using DOS-style short mode.
57240  # If so, the updated path is stored in $new_path.
57241
57242  input_path="$new_path"
57243  # Check if we need to convert this using DOS-style short mode. If the path
57244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57245  # take no chances and rewrite it.
57246  # Note: m4 eats our [], so we need to use [ and ] instead.
57247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57248  if test "x$has_forbidden_chars" != x; then
57249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57250    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57251    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57252    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57253      # Going to short mode and back again did indeed matter. Since short mode is
57254      # case insensitive, let's make it lowercase to improve readability.
57255      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57256      # Now convert it back to Unix-style (cygpath)
57257      input_path=`$CYGPATH -u "$shortmode_path"`
57258      new_path="$input_path"
57259    fi
57260  fi
57261
57262  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57263  if test "x$test_cygdrive_prefix" = x; then
57264    # As a simple fix, exclude /usr/bin since it's not a real path.
57265    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57266      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57267      # a path prefixed by /cygdrive for fixpath to work.
57268      new_path="$CYGWIN_ROOT_PATH$input_path"
57269    fi
57270  fi
57271
57272
57273  if test "x$path" != "x$new_path"; then
57274    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57276$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57277  fi
57278
57279    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57280
57281  path="$POTENTIAL_FREETYPE_LIB_PATH"
57282  has_colon=`$ECHO $path | $GREP ^.:`
57283  new_path="$path"
57284  if test "x$has_colon" = x; then
57285    # Not in mixed or Windows style, start by that.
57286    new_path=`cmd //c echo $path`
57287  fi
57288
57289
57290  input_path="$new_path"
57291  # Check if we need to convert this using DOS-style short mode. If the path
57292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57293  # take no chances and rewrite it.
57294  # Note: m4 eats our [], so we need to use [ and ] instead.
57295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57296  if test "x$has_forbidden_chars" != x; then
57297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57298    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57299  fi
57300
57301
57302  windows_path="$new_path"
57303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57304    unix_path=`$CYGPATH -u "$windows_path"`
57305    new_path="$unix_path"
57306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57308    new_path="$unix_path"
57309  fi
57310
57311  if test "x$path" != "x$new_path"; then
57312    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57314$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57315  fi
57316
57317  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57318  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57319
57320    else
57321      # We're on a unix platform. Hooray! :)
57322      path="$POTENTIAL_FREETYPE_LIB_PATH"
57323      has_space=`$ECHO "$path" | $GREP " "`
57324      if test "x$has_space" != x; then
57325        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57326$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57327        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57328      fi
57329
57330      # Use eval to expand a potential ~
57331      eval path="$path"
57332      if test ! -f "$path" && test ! -d "$path"; then
57333        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57334      fi
57335
57336      if test -d "$path"; then
57337        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57338      else
57339        dir="`$DIRNAME "$path"`"
57340        base="`$BASENAME "$path"`"
57341        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57342      fi
57343    fi
57344  fi
57345
57346
57347    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57348    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57349$as_echo_n "checking for freetype includes... " >&6; }
57350    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57351$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57352    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57353    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57354$as_echo_n "checking for freetype libraries... " >&6; }
57355    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57356$as_echo "$FREETYPE_LIB_PATH" >&6; }
57357  fi
57358
57359          if test "x$FOUND_FREETYPE" != xyes; then
57360            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57361          fi
57362        else
57363          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57364$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57365          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57366        fi
57367      else
57368        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57369$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57370      fi
57371    fi
57372
57373    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57374      # User has specified settings
57375
57376      if test "x$BUNDLE_FREETYPE" = x; then
57377        # If not specified, default is to bundle freetype
57378        BUNDLE_FREETYPE=yes
57379      fi
57380
57381      if test "x$with_freetype" != x; then
57382        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57383        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57384      fi
57385
57386      # Allow --with-freetype-lib and --with-freetype-include to override
57387      if test "x$with_freetype_include" != x; then
57388        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57389      fi
57390      if test "x$with_freetype_lib" != x; then
57391        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57392      fi
57393
57394      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57395        # Okay, we got it. Check that it works.
57396
57397  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57398  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57399  METHOD="--with-freetype"
57400
57401  # Let's start with an optimistic view of the world :-)
57402  FOUND_FREETYPE=yes
57403
57404  # First look for the canonical freetype main include file ft2build.h.
57405  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57406    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57407    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57408    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57409      # Fail.
57410      FOUND_FREETYPE=no
57411    fi
57412  fi
57413
57414  if test "x$FOUND_FREETYPE" = xyes; then
57415    # Include file found, let's continue the sanity check.
57416    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57417$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57418
57419    # Reset to default value
57420    FREETYPE_BASE_NAME=freetype
57421    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57422    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57423      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57424          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57425        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57426        # for the .6 version explicitly.
57427        FREETYPE_BASE_NAME=freetype.6
57428        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57429        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57430$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57431      else
57432        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57433$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57434        FOUND_FREETYPE=no
57435      fi
57436    else
57437      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57438        # On Windows, we will need both .lib and .dll file.
57439        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57440          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57441$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57442          FOUND_FREETYPE=no
57443        fi
57444      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57445          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57446        # Found lib in isa dir, use that instead.
57447        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57448        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57449$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57450      fi
57451    fi
57452  fi
57453
57454  if test "x$FOUND_FREETYPE" = xyes; then
57455
57456  # Only process if variable expands to non-empty
57457
57458  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57459    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57460
57461  # Input might be given as Windows format, start by converting to
57462  # unix format.
57463  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57464  new_path=`$CYGPATH -u "$path"`
57465
57466  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57467  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57468  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57469  # "foo.exe" is OK but "foo" is an error.
57470  #
57471  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57472  # It is also a way to make sure we got the proper file name for the real test later on.
57473  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57474  if test "x$test_shortpath" = x; then
57475    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57476$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57477    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57478  fi
57479
57480  # Call helper function which possibly converts this using DOS-style short mode.
57481  # If so, the updated path is stored in $new_path.
57482
57483  input_path="$new_path"
57484  # Check if we need to convert this using DOS-style short mode. If the path
57485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57486  # take no chances and rewrite it.
57487  # Note: m4 eats our [], so we need to use [ and ] instead.
57488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57489  if test "x$has_forbidden_chars" != x; then
57490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57494      # Going to short mode and back again did indeed matter. Since short mode is
57495      # case insensitive, let's make it lowercase to improve readability.
57496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57497      # Now convert it back to Unix-style (cygpath)
57498      input_path=`$CYGPATH -u "$shortmode_path"`
57499      new_path="$input_path"
57500    fi
57501  fi
57502
57503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57504  if test "x$test_cygdrive_prefix" = x; then
57505    # As a simple fix, exclude /usr/bin since it's not a real path.
57506    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57508      # a path prefixed by /cygdrive for fixpath to work.
57509      new_path="$CYGWIN_ROOT_PATH$input_path"
57510    fi
57511  fi
57512
57513
57514  if test "x$path" != "x$new_path"; then
57515    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57517$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57518  fi
57519
57520    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57521
57522  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57523  has_colon=`$ECHO $path | $GREP ^.:`
57524  new_path="$path"
57525  if test "x$has_colon" = x; then
57526    # Not in mixed or Windows style, start by that.
57527    new_path=`cmd //c echo $path`
57528  fi
57529
57530
57531  input_path="$new_path"
57532  # Check if we need to convert this using DOS-style short mode. If the path
57533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57534  # take no chances and rewrite it.
57535  # Note: m4 eats our [], so we need to use [ and ] instead.
57536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57537  if test "x$has_forbidden_chars" != x; then
57538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57539    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57540  fi
57541
57542
57543  windows_path="$new_path"
57544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57545    unix_path=`$CYGPATH -u "$windows_path"`
57546    new_path="$unix_path"
57547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57549    new_path="$unix_path"
57550  fi
57551
57552  if test "x$path" != "x$new_path"; then
57553    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57555$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57556  fi
57557
57558  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57559  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57560
57561    else
57562      # We're on a unix platform. Hooray! :)
57563      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57564      has_space=`$ECHO "$path" | $GREP " "`
57565      if test "x$has_space" != x; then
57566        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57567$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57568        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57569      fi
57570
57571      # Use eval to expand a potential ~
57572      eval path="$path"
57573      if test ! -f "$path" && test ! -d "$path"; then
57574        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57575      fi
57576
57577      if test -d "$path"; then
57578        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57579      else
57580        dir="`$DIRNAME "$path"`"
57581        base="`$BASENAME "$path"`"
57582        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57583      fi
57584    fi
57585  fi
57586
57587
57588  # Only process if variable expands to non-empty
57589
57590  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57591    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57592
57593  # Input might be given as Windows format, start by converting to
57594  # unix format.
57595  path="$POTENTIAL_FREETYPE_LIB_PATH"
57596  new_path=`$CYGPATH -u "$path"`
57597
57598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57601  # "foo.exe" is OK but "foo" is an error.
57602  #
57603  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57604  # It is also a way to make sure we got the proper file name for the real test later on.
57605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57606  if test "x$test_shortpath" = x; then
57607    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57608$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57609    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57610  fi
57611
57612  # Call helper function which possibly converts this using DOS-style short mode.
57613  # If so, the updated path is stored in $new_path.
57614
57615  input_path="$new_path"
57616  # Check if we need to convert this using DOS-style short mode. If the path
57617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57618  # take no chances and rewrite it.
57619  # Note: m4 eats our [], so we need to use [ and ] instead.
57620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57621  if test "x$has_forbidden_chars" != x; then
57622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57626      # Going to short mode and back again did indeed matter. Since short mode is
57627      # case insensitive, let's make it lowercase to improve readability.
57628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57629      # Now convert it back to Unix-style (cygpath)
57630      input_path=`$CYGPATH -u "$shortmode_path"`
57631      new_path="$input_path"
57632    fi
57633  fi
57634
57635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57636  if test "x$test_cygdrive_prefix" = x; then
57637    # As a simple fix, exclude /usr/bin since it's not a real path.
57638    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57640      # a path prefixed by /cygdrive for fixpath to work.
57641      new_path="$CYGWIN_ROOT_PATH$input_path"
57642    fi
57643  fi
57644
57645
57646  if test "x$path" != "x$new_path"; then
57647    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57649$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57650  fi
57651
57652    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57653
57654  path="$POTENTIAL_FREETYPE_LIB_PATH"
57655  has_colon=`$ECHO $path | $GREP ^.:`
57656  new_path="$path"
57657  if test "x$has_colon" = x; then
57658    # Not in mixed or Windows style, start by that.
57659    new_path=`cmd //c echo $path`
57660  fi
57661
57662
57663  input_path="$new_path"
57664  # Check if we need to convert this using DOS-style short mode. If the path
57665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57666  # take no chances and rewrite it.
57667  # Note: m4 eats our [], so we need to use [ and ] instead.
57668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57669  if test "x$has_forbidden_chars" != x; then
57670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57672  fi
57673
57674
57675  windows_path="$new_path"
57676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57677    unix_path=`$CYGPATH -u "$windows_path"`
57678    new_path="$unix_path"
57679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57681    new_path="$unix_path"
57682  fi
57683
57684  if test "x$path" != "x$new_path"; then
57685    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57687$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57688  fi
57689
57690  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57691  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57692
57693    else
57694      # We're on a unix platform. Hooray! :)
57695      path="$POTENTIAL_FREETYPE_LIB_PATH"
57696      has_space=`$ECHO "$path" | $GREP " "`
57697      if test "x$has_space" != x; then
57698        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57699$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57700        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57701      fi
57702
57703      # Use eval to expand a potential ~
57704      eval path="$path"
57705      if test ! -f "$path" && test ! -d "$path"; then
57706        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57707      fi
57708
57709      if test -d "$path"; then
57710        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57711      else
57712        dir="`$DIRNAME "$path"`"
57713        base="`$BASENAME "$path"`"
57714        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57715      fi
57716    fi
57717  fi
57718
57719
57720    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57721    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57722$as_echo_n "checking for freetype includes... " >&6; }
57723    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57724$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57725    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57726    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57727$as_echo_n "checking for freetype libraries... " >&6; }
57728    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57729$as_echo "$FREETYPE_LIB_PATH" >&6; }
57730  fi
57731
57732        if test "x$FOUND_FREETYPE" != xyes; then
57733          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57734        fi
57735      else
57736        # User specified only one of lib or include. This is an error.
57737        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57738          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57739$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57740          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57741        else
57742          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57743$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57744          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57745        fi
57746      fi
57747    else
57748      # User did not specify settings, but we need freetype. Try to locate it.
57749
57750      if test "x$BUNDLE_FREETYPE" = x; then
57751        # If not specified, default is to bundle freetype only on windows
57752        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57753          BUNDLE_FREETYPE=yes
57754        else
57755          BUNDLE_FREETYPE=no
57756        fi
57757      fi
57758
57759      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57760      if test "x$SYSROOT" = x; then
57761        if test "x$FOUND_FREETYPE" != xyes; then
57762          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57763          if test "x$PKG_CONFIG" != x; then
57764
57765pkg_failed=no
57766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57767$as_echo_n "checking for FREETYPE... " >&6; }
57768
57769if test -n "$FREETYPE_CFLAGS"; then
57770    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57771 elif test -n "$PKG_CONFIG"; then
57772    if test -n "$PKG_CONFIG" && \
57773    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57774  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57775  ac_status=$?
57776  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57777  test $ac_status = 0; }; then
57778  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57779else
57780  pkg_failed=yes
57781fi
57782 else
57783    pkg_failed=untried
57784fi
57785if test -n "$FREETYPE_LIBS"; then
57786    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57787 elif test -n "$PKG_CONFIG"; then
57788    if test -n "$PKG_CONFIG" && \
57789    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57790  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57791  ac_status=$?
57792  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57793  test $ac_status = 0; }; then
57794  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57795else
57796  pkg_failed=yes
57797fi
57798 else
57799    pkg_failed=untried
57800fi
57801
57802
57803
57804if test $pkg_failed = yes; then
57805
57806if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57807        _pkg_short_errors_supported=yes
57808else
57809        _pkg_short_errors_supported=no
57810fi
57811        if test $_pkg_short_errors_supported = yes; then
57812	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57813        else
57814	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57815        fi
57816	# Put the nasty error message in config.log where it belongs
57817	echo "$FREETYPE_PKG_ERRORS" >&5
57818
57819	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57820$as_echo "no" >&6; }
57821                FOUND_FREETYPE=no
57822elif test $pkg_failed = untried; then
57823	FOUND_FREETYPE=no
57824else
57825	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57826	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57827        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57828$as_echo "yes" >&6; }
57829	FOUND_FREETYPE=yes
57830fi
57831            if test "x$FOUND_FREETYPE" = xyes; then
57832              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57833              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57834              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57835              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57836                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57837              fi
57838              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57839              if test "x$BUNDLE_FREETYPE" = xyes; then
57840                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57841$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57842                FOUND_FREETYPE=no
57843              else
57844                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57845$as_echo_n "checking for freetype... " >&6; }
57846                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57847$as_echo "yes (using pkg-config)" >&6; }
57848              fi
57849            fi
57850          fi
57851        fi
57852      fi
57853
57854      if test "x$FOUND_FREETYPE" != xyes; then
57855        # Check in well-known locations
57856        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57857          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57858
57859  windows_path="$FREETYPE_BASE_DIR"
57860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57861    unix_path=`$CYGPATH -u "$windows_path"`
57862    FREETYPE_BASE_DIR="$unix_path"
57863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57865    FREETYPE_BASE_DIR="$unix_path"
57866  fi
57867
57868
57869  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57870  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57871  METHOD="well-known location"
57872
57873  # Let's start with an optimistic view of the world :-)
57874  FOUND_FREETYPE=yes
57875
57876  # First look for the canonical freetype main include file ft2build.h.
57877  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57878    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57879    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57880    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57881      # Fail.
57882      FOUND_FREETYPE=no
57883    fi
57884  fi
57885
57886  if test "x$FOUND_FREETYPE" = xyes; then
57887    # Include file found, let's continue the sanity check.
57888    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57889$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57890
57891    # Reset to default value
57892    FREETYPE_BASE_NAME=freetype
57893    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57894    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57895      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57896          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57897        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57898        # for the .6 version explicitly.
57899        FREETYPE_BASE_NAME=freetype.6
57900        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57901        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57902$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57903      else
57904        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57905$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57906        FOUND_FREETYPE=no
57907      fi
57908    else
57909      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57910        # On Windows, we will need both .lib and .dll file.
57911        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57912          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57913$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57914          FOUND_FREETYPE=no
57915        fi
57916      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57917          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57918        # Found lib in isa dir, use that instead.
57919        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57920        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57921$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57922      fi
57923    fi
57924  fi
57925
57926  if test "x$FOUND_FREETYPE" = xyes; then
57927
57928  # Only process if variable expands to non-empty
57929
57930  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57931    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57932
57933  # Input might be given as Windows format, start by converting to
57934  # unix format.
57935  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57936  new_path=`$CYGPATH -u "$path"`
57937
57938  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57939  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57940  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57941  # "foo.exe" is OK but "foo" is an error.
57942  #
57943  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57944  # It is also a way to make sure we got the proper file name for the real test later on.
57945  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57946  if test "x$test_shortpath" = x; then
57947    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57948$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57949    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57950  fi
57951
57952  # Call helper function which possibly converts this using DOS-style short mode.
57953  # If so, the updated path is stored in $new_path.
57954
57955  input_path="$new_path"
57956  # Check if we need to convert this using DOS-style short mode. If the path
57957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57958  # take no chances and rewrite it.
57959  # Note: m4 eats our [], so we need to use [ and ] instead.
57960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57961  if test "x$has_forbidden_chars" != x; then
57962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57963    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57964    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57965    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57966      # Going to short mode and back again did indeed matter. Since short mode is
57967      # case insensitive, let's make it lowercase to improve readability.
57968      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57969      # Now convert it back to Unix-style (cygpath)
57970      input_path=`$CYGPATH -u "$shortmode_path"`
57971      new_path="$input_path"
57972    fi
57973  fi
57974
57975  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57976  if test "x$test_cygdrive_prefix" = x; then
57977    # As a simple fix, exclude /usr/bin since it's not a real path.
57978    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57979      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57980      # a path prefixed by /cygdrive for fixpath to work.
57981      new_path="$CYGWIN_ROOT_PATH$input_path"
57982    fi
57983  fi
57984
57985
57986  if test "x$path" != "x$new_path"; then
57987    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57988    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57989$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57990  fi
57991
57992    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57993
57994  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57995  has_colon=`$ECHO $path | $GREP ^.:`
57996  new_path="$path"
57997  if test "x$has_colon" = x; then
57998    # Not in mixed or Windows style, start by that.
57999    new_path=`cmd //c echo $path`
58000  fi
58001
58002
58003  input_path="$new_path"
58004  # Check if we need to convert this using DOS-style short mode. If the path
58005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58006  # take no chances and rewrite it.
58007  # Note: m4 eats our [], so we need to use [ and ] instead.
58008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58009  if test "x$has_forbidden_chars" != x; then
58010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58011    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58012  fi
58013
58014
58015  windows_path="$new_path"
58016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58017    unix_path=`$CYGPATH -u "$windows_path"`
58018    new_path="$unix_path"
58019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58021    new_path="$unix_path"
58022  fi
58023
58024  if test "x$path" != "x$new_path"; then
58025    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58026    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58027$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58028  fi
58029
58030  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58031  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58032
58033    else
58034      # We're on a unix platform. Hooray! :)
58035      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58036      has_space=`$ECHO "$path" | $GREP " "`
58037      if test "x$has_space" != x; then
58038        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58039$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58040        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58041      fi
58042
58043      # Use eval to expand a potential ~
58044      eval path="$path"
58045      if test ! -f "$path" && test ! -d "$path"; then
58046        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58047      fi
58048
58049      if test -d "$path"; then
58050        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58051      else
58052        dir="`$DIRNAME "$path"`"
58053        base="`$BASENAME "$path"`"
58054        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58055      fi
58056    fi
58057  fi
58058
58059
58060  # Only process if variable expands to non-empty
58061
58062  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58063    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58064
58065  # Input might be given as Windows format, start by converting to
58066  # unix format.
58067  path="$POTENTIAL_FREETYPE_LIB_PATH"
58068  new_path=`$CYGPATH -u "$path"`
58069
58070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58073  # "foo.exe" is OK but "foo" is an error.
58074  #
58075  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58076  # It is also a way to make sure we got the proper file name for the real test later on.
58077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58078  if test "x$test_shortpath" = x; then
58079    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58080$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58081    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58082  fi
58083
58084  # Call helper function which possibly converts this using DOS-style short mode.
58085  # If so, the updated path is stored in $new_path.
58086
58087  input_path="$new_path"
58088  # Check if we need to convert this using DOS-style short mode. If the path
58089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58090  # take no chances and rewrite it.
58091  # Note: m4 eats our [], so we need to use [ and ] instead.
58092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58093  if test "x$has_forbidden_chars" != x; then
58094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58095    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58096    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58097    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58098      # Going to short mode and back again did indeed matter. Since short mode is
58099      # case insensitive, let's make it lowercase to improve readability.
58100      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58101      # Now convert it back to Unix-style (cygpath)
58102      input_path=`$CYGPATH -u "$shortmode_path"`
58103      new_path="$input_path"
58104    fi
58105  fi
58106
58107  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58108  if test "x$test_cygdrive_prefix" = x; then
58109    # As a simple fix, exclude /usr/bin since it's not a real path.
58110    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58111      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58112      # a path prefixed by /cygdrive for fixpath to work.
58113      new_path="$CYGWIN_ROOT_PATH$input_path"
58114    fi
58115  fi
58116
58117
58118  if test "x$path" != "x$new_path"; then
58119    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58121$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58122  fi
58123
58124    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58125
58126  path="$POTENTIAL_FREETYPE_LIB_PATH"
58127  has_colon=`$ECHO $path | $GREP ^.:`
58128  new_path="$path"
58129  if test "x$has_colon" = x; then
58130    # Not in mixed or Windows style, start by that.
58131    new_path=`cmd //c echo $path`
58132  fi
58133
58134
58135  input_path="$new_path"
58136  # Check if we need to convert this using DOS-style short mode. If the path
58137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58138  # take no chances and rewrite it.
58139  # Note: m4 eats our [], so we need to use [ and ] instead.
58140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58141  if test "x$has_forbidden_chars" != x; then
58142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58143    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58144  fi
58145
58146
58147  windows_path="$new_path"
58148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58149    unix_path=`$CYGPATH -u "$windows_path"`
58150    new_path="$unix_path"
58151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58153    new_path="$unix_path"
58154  fi
58155
58156  if test "x$path" != "x$new_path"; then
58157    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58158    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58159$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58160  fi
58161
58162  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58163  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58164
58165    else
58166      # We're on a unix platform. Hooray! :)
58167      path="$POTENTIAL_FREETYPE_LIB_PATH"
58168      has_space=`$ECHO "$path" | $GREP " "`
58169      if test "x$has_space" != x; then
58170        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58171$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58172        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58173      fi
58174
58175      # Use eval to expand a potential ~
58176      eval path="$path"
58177      if test ! -f "$path" && test ! -d "$path"; then
58178        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58179      fi
58180
58181      if test -d "$path"; then
58182        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58183      else
58184        dir="`$DIRNAME "$path"`"
58185        base="`$BASENAME "$path"`"
58186        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58187      fi
58188    fi
58189  fi
58190
58191
58192    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58193    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58194$as_echo_n "checking for freetype includes... " >&6; }
58195    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58196$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58197    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58198    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58199$as_echo_n "checking for freetype libraries... " >&6; }
58200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58201$as_echo "$FREETYPE_LIB_PATH" >&6; }
58202  fi
58203
58204          if test "x$FOUND_FREETYPE" != xyes; then
58205            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58206
58207  windows_path="$FREETYPE_BASE_DIR"
58208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58209    unix_path=`$CYGPATH -u "$windows_path"`
58210    FREETYPE_BASE_DIR="$unix_path"
58211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58213    FREETYPE_BASE_DIR="$unix_path"
58214  fi
58215
58216
58217  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58218  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58219  METHOD="well-known location"
58220
58221  # Let's start with an optimistic view of the world :-)
58222  FOUND_FREETYPE=yes
58223
58224  # First look for the canonical freetype main include file ft2build.h.
58225  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58226    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58227    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58228    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58229      # Fail.
58230      FOUND_FREETYPE=no
58231    fi
58232  fi
58233
58234  if test "x$FOUND_FREETYPE" = xyes; then
58235    # Include file found, let's continue the sanity check.
58236    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58237$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58238
58239    # Reset to default value
58240    FREETYPE_BASE_NAME=freetype
58241    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58242    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58243      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58244          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58245        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58246        # for the .6 version explicitly.
58247        FREETYPE_BASE_NAME=freetype.6
58248        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58249        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58250$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58251      else
58252        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58253$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58254        FOUND_FREETYPE=no
58255      fi
58256    else
58257      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58258        # On Windows, we will need both .lib and .dll file.
58259        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58260          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58261$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58262          FOUND_FREETYPE=no
58263        fi
58264      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58265          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58266        # Found lib in isa dir, use that instead.
58267        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58268        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58269$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58270      fi
58271    fi
58272  fi
58273
58274  if test "x$FOUND_FREETYPE" = xyes; then
58275
58276  # Only process if variable expands to non-empty
58277
58278  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58279    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58280
58281  # Input might be given as Windows format, start by converting to
58282  # unix format.
58283  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58284  new_path=`$CYGPATH -u "$path"`
58285
58286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58289  # "foo.exe" is OK but "foo" is an error.
58290  #
58291  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58292  # It is also a way to make sure we got the proper file name for the real test later on.
58293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58294  if test "x$test_shortpath" = x; then
58295    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58296$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58297    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58298  fi
58299
58300  # Call helper function which possibly converts this using DOS-style short mode.
58301  # If so, the updated path is stored in $new_path.
58302
58303  input_path="$new_path"
58304  # Check if we need to convert this using DOS-style short mode. If the path
58305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58306  # take no chances and rewrite it.
58307  # Note: m4 eats our [], so we need to use [ and ] instead.
58308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58309  if test "x$has_forbidden_chars" != x; then
58310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58311    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58312    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58313    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58314      # Going to short mode and back again did indeed matter. Since short mode is
58315      # case insensitive, let's make it lowercase to improve readability.
58316      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58317      # Now convert it back to Unix-style (cygpath)
58318      input_path=`$CYGPATH -u "$shortmode_path"`
58319      new_path="$input_path"
58320    fi
58321  fi
58322
58323  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58324  if test "x$test_cygdrive_prefix" = x; then
58325    # As a simple fix, exclude /usr/bin since it's not a real path.
58326    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58327      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58328      # a path prefixed by /cygdrive for fixpath to work.
58329      new_path="$CYGWIN_ROOT_PATH$input_path"
58330    fi
58331  fi
58332
58333
58334  if test "x$path" != "x$new_path"; then
58335    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58337$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58338  fi
58339
58340    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58341
58342  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58343  has_colon=`$ECHO $path | $GREP ^.:`
58344  new_path="$path"
58345  if test "x$has_colon" = x; then
58346    # Not in mixed or Windows style, start by that.
58347    new_path=`cmd //c echo $path`
58348  fi
58349
58350
58351  input_path="$new_path"
58352  # Check if we need to convert this using DOS-style short mode. If the path
58353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58354  # take no chances and rewrite it.
58355  # Note: m4 eats our [], so we need to use [ and ] instead.
58356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58357  if test "x$has_forbidden_chars" != x; then
58358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58359    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58360  fi
58361
58362
58363  windows_path="$new_path"
58364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58365    unix_path=`$CYGPATH -u "$windows_path"`
58366    new_path="$unix_path"
58367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58369    new_path="$unix_path"
58370  fi
58371
58372  if test "x$path" != "x$new_path"; then
58373    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58375$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58376  fi
58377
58378  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58379  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58380
58381    else
58382      # We're on a unix platform. Hooray! :)
58383      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58384      has_space=`$ECHO "$path" | $GREP " "`
58385      if test "x$has_space" != x; then
58386        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58387$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58388        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58389      fi
58390
58391      # Use eval to expand a potential ~
58392      eval path="$path"
58393      if test ! -f "$path" && test ! -d "$path"; then
58394        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58395      fi
58396
58397      if test -d "$path"; then
58398        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58399      else
58400        dir="`$DIRNAME "$path"`"
58401        base="`$BASENAME "$path"`"
58402        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58403      fi
58404    fi
58405  fi
58406
58407
58408  # Only process if variable expands to non-empty
58409
58410  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58411    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58412
58413  # Input might be given as Windows format, start by converting to
58414  # unix format.
58415  path="$POTENTIAL_FREETYPE_LIB_PATH"
58416  new_path=`$CYGPATH -u "$path"`
58417
58418  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58419  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58420  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58421  # "foo.exe" is OK but "foo" is an error.
58422  #
58423  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58424  # It is also a way to make sure we got the proper file name for the real test later on.
58425  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58426  if test "x$test_shortpath" = x; then
58427    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58428$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58429    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58430  fi
58431
58432  # Call helper function which possibly converts this using DOS-style short mode.
58433  # If so, the updated path is stored in $new_path.
58434
58435  input_path="$new_path"
58436  # Check if we need to convert this using DOS-style short mode. If the path
58437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58438  # take no chances and rewrite it.
58439  # Note: m4 eats our [], so we need to use [ and ] instead.
58440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58441  if test "x$has_forbidden_chars" != x; then
58442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58443    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58444    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58445    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58446      # Going to short mode and back again did indeed matter. Since short mode is
58447      # case insensitive, let's make it lowercase to improve readability.
58448      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58449      # Now convert it back to Unix-style (cygpath)
58450      input_path=`$CYGPATH -u "$shortmode_path"`
58451      new_path="$input_path"
58452    fi
58453  fi
58454
58455  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58456  if test "x$test_cygdrive_prefix" = x; then
58457    # As a simple fix, exclude /usr/bin since it's not a real path.
58458    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58459      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58460      # a path prefixed by /cygdrive for fixpath to work.
58461      new_path="$CYGWIN_ROOT_PATH$input_path"
58462    fi
58463  fi
58464
58465
58466  if test "x$path" != "x$new_path"; then
58467    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58468    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58469$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58470  fi
58471
58472    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58473
58474  path="$POTENTIAL_FREETYPE_LIB_PATH"
58475  has_colon=`$ECHO $path | $GREP ^.:`
58476  new_path="$path"
58477  if test "x$has_colon" = x; then
58478    # Not in mixed or Windows style, start by that.
58479    new_path=`cmd //c echo $path`
58480  fi
58481
58482
58483  input_path="$new_path"
58484  # Check if we need to convert this using DOS-style short mode. If the path
58485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58486  # take no chances and rewrite it.
58487  # Note: m4 eats our [], so we need to use [ and ] instead.
58488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58489  if test "x$has_forbidden_chars" != x; then
58490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58491    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58492  fi
58493
58494
58495  windows_path="$new_path"
58496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58497    unix_path=`$CYGPATH -u "$windows_path"`
58498    new_path="$unix_path"
58499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58501    new_path="$unix_path"
58502  fi
58503
58504  if test "x$path" != "x$new_path"; then
58505    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58506    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58507$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58508  fi
58509
58510  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58511  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58512
58513    else
58514      # We're on a unix platform. Hooray! :)
58515      path="$POTENTIAL_FREETYPE_LIB_PATH"
58516      has_space=`$ECHO "$path" | $GREP " "`
58517      if test "x$has_space" != x; then
58518        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58519$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58520        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58521      fi
58522
58523      # Use eval to expand a potential ~
58524      eval path="$path"
58525      if test ! -f "$path" && test ! -d "$path"; then
58526        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58527      fi
58528
58529      if test -d "$path"; then
58530        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58531      else
58532        dir="`$DIRNAME "$path"`"
58533        base="`$BASENAME "$path"`"
58534        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58535      fi
58536    fi
58537  fi
58538
58539
58540    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58541    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58542$as_echo_n "checking for freetype includes... " >&6; }
58543    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58544$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58545    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58546    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58547$as_echo_n "checking for freetype libraries... " >&6; }
58548    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58549$as_echo "$FREETYPE_LIB_PATH" >&6; }
58550  fi
58551
58552          fi
58553          if test "x$FOUND_FREETYPE" != xyes; then
58554            FREETYPE_BASE_DIR="$HOME/freetype"
58555
58556  windows_path="$FREETYPE_BASE_DIR"
58557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58558    unix_path=`$CYGPATH -u "$windows_path"`
58559    FREETYPE_BASE_DIR="$unix_path"
58560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58562    FREETYPE_BASE_DIR="$unix_path"
58563  fi
58564
58565            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58566
58567  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58568  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58569  METHOD="well-known location"
58570
58571  # Let's start with an optimistic view of the world :-)
58572  FOUND_FREETYPE=yes
58573
58574  # First look for the canonical freetype main include file ft2build.h.
58575  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58576    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58577    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58578    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58579      # Fail.
58580      FOUND_FREETYPE=no
58581    fi
58582  fi
58583
58584  if test "x$FOUND_FREETYPE" = xyes; then
58585    # Include file found, let's continue the sanity check.
58586    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58587$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58588
58589    # Reset to default value
58590    FREETYPE_BASE_NAME=freetype
58591    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58592    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58593      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58594          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58595        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58596        # for the .6 version explicitly.
58597        FREETYPE_BASE_NAME=freetype.6
58598        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58599        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58600$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58601      else
58602        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58603$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58604        FOUND_FREETYPE=no
58605      fi
58606    else
58607      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58608        # On Windows, we will need both .lib and .dll file.
58609        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58610          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58611$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58612          FOUND_FREETYPE=no
58613        fi
58614      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58615          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58616        # Found lib in isa dir, use that instead.
58617        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58618        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58619$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58620      fi
58621    fi
58622  fi
58623
58624  if test "x$FOUND_FREETYPE" = xyes; then
58625
58626  # Only process if variable expands to non-empty
58627
58628  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58629    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58630
58631  # Input might be given as Windows format, start by converting to
58632  # unix format.
58633  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58634  new_path=`$CYGPATH -u "$path"`
58635
58636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58639  # "foo.exe" is OK but "foo" is an error.
58640  #
58641  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58642  # It is also a way to make sure we got the proper file name for the real test later on.
58643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58644  if test "x$test_shortpath" = x; then
58645    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58646$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58647    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58648  fi
58649
58650  # Call helper function which possibly converts this using DOS-style short mode.
58651  # If so, the updated path is stored in $new_path.
58652
58653  input_path="$new_path"
58654  # Check if we need to convert this using DOS-style short mode. If the path
58655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58656  # take no chances and rewrite it.
58657  # Note: m4 eats our [], so we need to use [ and ] instead.
58658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58659  if test "x$has_forbidden_chars" != x; then
58660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58664      # Going to short mode and back again did indeed matter. Since short mode is
58665      # case insensitive, let's make it lowercase to improve readability.
58666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58667      # Now convert it back to Unix-style (cygpath)
58668      input_path=`$CYGPATH -u "$shortmode_path"`
58669      new_path="$input_path"
58670    fi
58671  fi
58672
58673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58674  if test "x$test_cygdrive_prefix" = x; then
58675    # As a simple fix, exclude /usr/bin since it's not a real path.
58676    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58678      # a path prefixed by /cygdrive for fixpath to work.
58679      new_path="$CYGWIN_ROOT_PATH$input_path"
58680    fi
58681  fi
58682
58683
58684  if test "x$path" != "x$new_path"; then
58685    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58687$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58688  fi
58689
58690    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58691
58692  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58693  has_colon=`$ECHO $path | $GREP ^.:`
58694  new_path="$path"
58695  if test "x$has_colon" = x; then
58696    # Not in mixed or Windows style, start by that.
58697    new_path=`cmd //c echo $path`
58698  fi
58699
58700
58701  input_path="$new_path"
58702  # Check if we need to convert this using DOS-style short mode. If the path
58703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58704  # take no chances and rewrite it.
58705  # Note: m4 eats our [], so we need to use [ and ] instead.
58706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58707  if test "x$has_forbidden_chars" != x; then
58708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58709    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58710  fi
58711
58712
58713  windows_path="$new_path"
58714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58715    unix_path=`$CYGPATH -u "$windows_path"`
58716    new_path="$unix_path"
58717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58719    new_path="$unix_path"
58720  fi
58721
58722  if test "x$path" != "x$new_path"; then
58723    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58725$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58726  fi
58727
58728  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58729  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58730
58731    else
58732      # We're on a unix platform. Hooray! :)
58733      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58734      has_space=`$ECHO "$path" | $GREP " "`
58735      if test "x$has_space" != x; then
58736        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58737$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58738        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58739      fi
58740
58741      # Use eval to expand a potential ~
58742      eval path="$path"
58743      if test ! -f "$path" && test ! -d "$path"; then
58744        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58745      fi
58746
58747      if test -d "$path"; then
58748        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58749      else
58750        dir="`$DIRNAME "$path"`"
58751        base="`$BASENAME "$path"`"
58752        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58753      fi
58754    fi
58755  fi
58756
58757
58758  # Only process if variable expands to non-empty
58759
58760  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58761    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58762
58763  # Input might be given as Windows format, start by converting to
58764  # unix format.
58765  path="$POTENTIAL_FREETYPE_LIB_PATH"
58766  new_path=`$CYGPATH -u "$path"`
58767
58768  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58769  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58770  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58771  # "foo.exe" is OK but "foo" is an error.
58772  #
58773  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58774  # It is also a way to make sure we got the proper file name for the real test later on.
58775  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58776  if test "x$test_shortpath" = x; then
58777    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58778$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58779    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58780  fi
58781
58782  # Call helper function which possibly converts this using DOS-style short mode.
58783  # If so, the updated path is stored in $new_path.
58784
58785  input_path="$new_path"
58786  # Check if we need to convert this using DOS-style short mode. If the path
58787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58788  # take no chances and rewrite it.
58789  # Note: m4 eats our [], so we need to use [ and ] instead.
58790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58791  if test "x$has_forbidden_chars" != x; then
58792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58793    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58794    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58795    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58796      # Going to short mode and back again did indeed matter. Since short mode is
58797      # case insensitive, let's make it lowercase to improve readability.
58798      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58799      # Now convert it back to Unix-style (cygpath)
58800      input_path=`$CYGPATH -u "$shortmode_path"`
58801      new_path="$input_path"
58802    fi
58803  fi
58804
58805  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58806  if test "x$test_cygdrive_prefix" = x; then
58807    # As a simple fix, exclude /usr/bin since it's not a real path.
58808    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58809      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58810      # a path prefixed by /cygdrive for fixpath to work.
58811      new_path="$CYGWIN_ROOT_PATH$input_path"
58812    fi
58813  fi
58814
58815
58816  if test "x$path" != "x$new_path"; then
58817    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58819$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58820  fi
58821
58822    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58823
58824  path="$POTENTIAL_FREETYPE_LIB_PATH"
58825  has_colon=`$ECHO $path | $GREP ^.:`
58826  new_path="$path"
58827  if test "x$has_colon" = x; then
58828    # Not in mixed or Windows style, start by that.
58829    new_path=`cmd //c echo $path`
58830  fi
58831
58832
58833  input_path="$new_path"
58834  # Check if we need to convert this using DOS-style short mode. If the path
58835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58836  # take no chances and rewrite it.
58837  # Note: m4 eats our [], so we need to use [ and ] instead.
58838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58839  if test "x$has_forbidden_chars" != x; then
58840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58842  fi
58843
58844
58845  windows_path="$new_path"
58846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58847    unix_path=`$CYGPATH -u "$windows_path"`
58848    new_path="$unix_path"
58849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58851    new_path="$unix_path"
58852  fi
58853
58854  if test "x$path" != "x$new_path"; then
58855    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58857$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58858  fi
58859
58860  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58861  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58862
58863    else
58864      # We're on a unix platform. Hooray! :)
58865      path="$POTENTIAL_FREETYPE_LIB_PATH"
58866      has_space=`$ECHO "$path" | $GREP " "`
58867      if test "x$has_space" != x; then
58868        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58869$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58870        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58871      fi
58872
58873      # Use eval to expand a potential ~
58874      eval path="$path"
58875      if test ! -f "$path" && test ! -d "$path"; then
58876        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58877      fi
58878
58879      if test -d "$path"; then
58880        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58881      else
58882        dir="`$DIRNAME "$path"`"
58883        base="`$BASENAME "$path"`"
58884        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58885      fi
58886    fi
58887  fi
58888
58889
58890    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58891    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58892$as_echo_n "checking for freetype includes... " >&6; }
58893    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58894$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58895    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58896    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58897$as_echo_n "checking for freetype libraries... " >&6; }
58898    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58899$as_echo "$FREETYPE_LIB_PATH" >&6; }
58900  fi
58901
58902            else
58903
58904  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58905  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58906  METHOD="well-known location"
58907
58908  # Let's start with an optimistic view of the world :-)
58909  FOUND_FREETYPE=yes
58910
58911  # First look for the canonical freetype main include file ft2build.h.
58912  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58913    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58914    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58915    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58916      # Fail.
58917      FOUND_FREETYPE=no
58918    fi
58919  fi
58920
58921  if test "x$FOUND_FREETYPE" = xyes; then
58922    # Include file found, let's continue the sanity check.
58923    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58924$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58925
58926    # Reset to default value
58927    FREETYPE_BASE_NAME=freetype
58928    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58929    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58930      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58931          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58932        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58933        # for the .6 version explicitly.
58934        FREETYPE_BASE_NAME=freetype.6
58935        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58936        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58937$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58938      else
58939        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58940$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58941        FOUND_FREETYPE=no
58942      fi
58943    else
58944      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58945        # On Windows, we will need both .lib and .dll file.
58946        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58947          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58948$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58949          FOUND_FREETYPE=no
58950        fi
58951      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58952          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58953        # Found lib in isa dir, use that instead.
58954        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58955        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58956$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58957      fi
58958    fi
58959  fi
58960
58961  if test "x$FOUND_FREETYPE" = xyes; then
58962
58963  # Only process if variable expands to non-empty
58964
58965  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58966    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58967
58968  # Input might be given as Windows format, start by converting to
58969  # unix format.
58970  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58971  new_path=`$CYGPATH -u "$path"`
58972
58973  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58974  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58975  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58976  # "foo.exe" is OK but "foo" is an error.
58977  #
58978  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58979  # It is also a way to make sure we got the proper file name for the real test later on.
58980  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58981  if test "x$test_shortpath" = x; then
58982    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58983$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58984    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58985  fi
58986
58987  # Call helper function which possibly converts this using DOS-style short mode.
58988  # If so, the updated path is stored in $new_path.
58989
58990  input_path="$new_path"
58991  # Check if we need to convert this using DOS-style short mode. If the path
58992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58993  # take no chances and rewrite it.
58994  # Note: m4 eats our [], so we need to use [ and ] instead.
58995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58996  if test "x$has_forbidden_chars" != x; then
58997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58998    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58999    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59000    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59001      # Going to short mode and back again did indeed matter. Since short mode is
59002      # case insensitive, let's make it lowercase to improve readability.
59003      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59004      # Now convert it back to Unix-style (cygpath)
59005      input_path=`$CYGPATH -u "$shortmode_path"`
59006      new_path="$input_path"
59007    fi
59008  fi
59009
59010  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59011  if test "x$test_cygdrive_prefix" = x; then
59012    # As a simple fix, exclude /usr/bin since it's not a real path.
59013    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59014      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59015      # a path prefixed by /cygdrive for fixpath to work.
59016      new_path="$CYGWIN_ROOT_PATH$input_path"
59017    fi
59018  fi
59019
59020
59021  if test "x$path" != "x$new_path"; then
59022    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59024$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59025  fi
59026
59027    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59028
59029  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59030  has_colon=`$ECHO $path | $GREP ^.:`
59031  new_path="$path"
59032  if test "x$has_colon" = x; then
59033    # Not in mixed or Windows style, start by that.
59034    new_path=`cmd //c echo $path`
59035  fi
59036
59037
59038  input_path="$new_path"
59039  # Check if we need to convert this using DOS-style short mode. If the path
59040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59041  # take no chances and rewrite it.
59042  # Note: m4 eats our [], so we need to use [ and ] instead.
59043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59044  if test "x$has_forbidden_chars" != x; then
59045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59046    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59047  fi
59048
59049
59050  windows_path="$new_path"
59051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59052    unix_path=`$CYGPATH -u "$windows_path"`
59053    new_path="$unix_path"
59054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59056    new_path="$unix_path"
59057  fi
59058
59059  if test "x$path" != "x$new_path"; then
59060    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59062$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59063  fi
59064
59065  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59066  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59067
59068    else
59069      # We're on a unix platform. Hooray! :)
59070      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59071      has_space=`$ECHO "$path" | $GREP " "`
59072      if test "x$has_space" != x; then
59073        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59074$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59075        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59076      fi
59077
59078      # Use eval to expand a potential ~
59079      eval path="$path"
59080      if test ! -f "$path" && test ! -d "$path"; then
59081        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59082      fi
59083
59084      if test -d "$path"; then
59085        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59086      else
59087        dir="`$DIRNAME "$path"`"
59088        base="`$BASENAME "$path"`"
59089        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59090      fi
59091    fi
59092  fi
59093
59094
59095  # Only process if variable expands to non-empty
59096
59097  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59098    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59099
59100  # Input might be given as Windows format, start by converting to
59101  # unix format.
59102  path="$POTENTIAL_FREETYPE_LIB_PATH"
59103  new_path=`$CYGPATH -u "$path"`
59104
59105  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59106  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59107  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59108  # "foo.exe" is OK but "foo" is an error.
59109  #
59110  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59111  # It is also a way to make sure we got the proper file name for the real test later on.
59112  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59113  if test "x$test_shortpath" = x; then
59114    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59115$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59116    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59117  fi
59118
59119  # Call helper function which possibly converts this using DOS-style short mode.
59120  # If so, the updated path is stored in $new_path.
59121
59122  input_path="$new_path"
59123  # Check if we need to convert this using DOS-style short mode. If the path
59124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59125  # take no chances and rewrite it.
59126  # Note: m4 eats our [], so we need to use [ and ] instead.
59127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59128  if test "x$has_forbidden_chars" != x; then
59129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59130    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59131    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59132    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59133      # Going to short mode and back again did indeed matter. Since short mode is
59134      # case insensitive, let's make it lowercase to improve readability.
59135      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59136      # Now convert it back to Unix-style (cygpath)
59137      input_path=`$CYGPATH -u "$shortmode_path"`
59138      new_path="$input_path"
59139    fi
59140  fi
59141
59142  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59143  if test "x$test_cygdrive_prefix" = x; then
59144    # As a simple fix, exclude /usr/bin since it's not a real path.
59145    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59146      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59147      # a path prefixed by /cygdrive for fixpath to work.
59148      new_path="$CYGWIN_ROOT_PATH$input_path"
59149    fi
59150  fi
59151
59152
59153  if test "x$path" != "x$new_path"; then
59154    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59156$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59157  fi
59158
59159    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59160
59161  path="$POTENTIAL_FREETYPE_LIB_PATH"
59162  has_colon=`$ECHO $path | $GREP ^.:`
59163  new_path="$path"
59164  if test "x$has_colon" = x; then
59165    # Not in mixed or Windows style, start by that.
59166    new_path=`cmd //c echo $path`
59167  fi
59168
59169
59170  input_path="$new_path"
59171  # Check if we need to convert this using DOS-style short mode. If the path
59172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59173  # take no chances and rewrite it.
59174  # Note: m4 eats our [], so we need to use [ and ] instead.
59175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59176  if test "x$has_forbidden_chars" != x; then
59177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59178    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59179  fi
59180
59181
59182  windows_path="$new_path"
59183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59184    unix_path=`$CYGPATH -u "$windows_path"`
59185    new_path="$unix_path"
59186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59188    new_path="$unix_path"
59189  fi
59190
59191  if test "x$path" != "x$new_path"; then
59192    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59193    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59194$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59195  fi
59196
59197  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59198  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59199
59200    else
59201      # We're on a unix platform. Hooray! :)
59202      path="$POTENTIAL_FREETYPE_LIB_PATH"
59203      has_space=`$ECHO "$path" | $GREP " "`
59204      if test "x$has_space" != x; then
59205        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59206$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59207        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59208      fi
59209
59210      # Use eval to expand a potential ~
59211      eval path="$path"
59212      if test ! -f "$path" && test ! -d "$path"; then
59213        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59214      fi
59215
59216      if test -d "$path"; then
59217        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59218      else
59219        dir="`$DIRNAME "$path"`"
59220        base="`$BASENAME "$path"`"
59221        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59222      fi
59223    fi
59224  fi
59225
59226
59227    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59228    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59229$as_echo_n "checking for freetype includes... " >&6; }
59230    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59231$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59232    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59233    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59234$as_echo_n "checking for freetype libraries... " >&6; }
59235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59236$as_echo "$FREETYPE_LIB_PATH" >&6; }
59237  fi
59238
59239            fi
59240            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59241                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59242              # Source is available, as a last resort try to build freetype in default location
59243
59244  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59245  BUILD_FREETYPE=yes
59246
59247  # Check if the freetype sources are acessible..
59248  if ! test -d $FREETYPE_SRC_PATH; then
59249    { $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
59250$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59251    BUILD_FREETYPE=no
59252  fi
59253  # ..and contain a vc2010 project file
59254  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59255  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59256    { $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
59257$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59258    BUILD_FREETYPE=no
59259  fi
59260  # Now check if configure found a version of 'msbuild.exe'
59261  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59262    { $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
59263$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;}
59264    BUILD_FREETYPE=no
59265  fi
59266
59267  # Ready to go..
59268  if test "x$BUILD_FREETYPE" = xyes; then
59269    # msbuild requires trailing slashes for output directories
59270    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59271    freetype_lib_path_unix="$freetype_lib_path"
59272    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59273
59274  unix_path="$vcxproj_path"
59275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59276    windows_path=`$CYGPATH -m "$unix_path"`
59277    vcxproj_path="$windows_path"
59278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59279    windows_path=`cmd //c echo $unix_path`
59280    vcxproj_path="$windows_path"
59281  fi
59282
59283
59284  unix_path="$freetype_lib_path"
59285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59286    windows_path=`$CYGPATH -m "$unix_path"`
59287    freetype_lib_path="$windows_path"
59288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59289    windows_path=`cmd //c echo $unix_path`
59290    freetype_lib_path="$windows_path"
59291  fi
59292
59293
59294  unix_path="$freetype_obj_path"
59295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59296    windows_path=`$CYGPATH -m "$unix_path"`
59297    freetype_obj_path="$windows_path"
59298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59299    windows_path=`cmd //c echo $unix_path`
59300    freetype_obj_path="$windows_path"
59301  fi
59302
59303    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59304      freetype_platform=x64
59305    else
59306      freetype_platform=win32
59307    fi
59308
59309    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59310    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59311    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59312    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59313    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59314$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59315
59316    # First we try to build the freetype.dll
59317    $ECHO -e "@echo off\n"\
59318        "$MSBUILD $vcxproj_path "\
59319        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59320        "/p:Configuration=\"Release Multithreaded\" "\
59321        "/p:Platform=$freetype_platform "\
59322        "/p:ConfigurationType=DynamicLibrary "\
59323        "/p:TargetName=freetype "\
59324        "/p:OutDir=\"$freetype_lib_path\" "\
59325        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59326    cmd /c freetype.bat
59327
59328    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59329      # If that succeeds we also build freetype.lib
59330      $ECHO -e "@echo off\n"\
59331          "$MSBUILD $vcxproj_path "\
59332          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59333          "/p:Configuration=\"Release Multithreaded\" "\
59334          "/p:Platform=$freetype_platform "\
59335          "/p:ConfigurationType=StaticLibrary "\
59336          "/p:TargetName=freetype "\
59337          "/p:OutDir=\"$freetype_lib_path\" "\
59338          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59339      cmd /c freetype.bat
59340
59341      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59342        # Once we build both, lib and dll, set freetype lib and include path appropriately
59343        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59344        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59345        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59346$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59347      else
59348        BUILD_FREETYPE=no
59349      fi
59350    else
59351      BUILD_FREETYPE=no
59352    fi
59353  fi
59354
59355              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59356
59357  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59358  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59359  METHOD="well-known location"
59360
59361  # Let's start with an optimistic view of the world :-)
59362  FOUND_FREETYPE=yes
59363
59364  # First look for the canonical freetype main include file ft2build.h.
59365  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59366    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59367    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59368    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59369      # Fail.
59370      FOUND_FREETYPE=no
59371    fi
59372  fi
59373
59374  if test "x$FOUND_FREETYPE" = xyes; then
59375    # Include file found, let's continue the sanity check.
59376    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59377$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59378
59379    # Reset to default value
59380    FREETYPE_BASE_NAME=freetype
59381    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59382    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59383      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59384          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59385        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59386        # for the .6 version explicitly.
59387        FREETYPE_BASE_NAME=freetype.6
59388        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59389        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59390$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59391      else
59392        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59393$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59394        FOUND_FREETYPE=no
59395      fi
59396    else
59397      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59398        # On Windows, we will need both .lib and .dll file.
59399        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59400          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59401$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59402          FOUND_FREETYPE=no
59403        fi
59404      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59405          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59406        # Found lib in isa dir, use that instead.
59407        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59408        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59409$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59410      fi
59411    fi
59412  fi
59413
59414  if test "x$FOUND_FREETYPE" = xyes; then
59415
59416  # Only process if variable expands to non-empty
59417
59418  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59419    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59420
59421  # Input might be given as Windows format, start by converting to
59422  # unix format.
59423  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59424  new_path=`$CYGPATH -u "$path"`
59425
59426  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59427  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59428  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59429  # "foo.exe" is OK but "foo" is an error.
59430  #
59431  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59432  # It is also a way to make sure we got the proper file name for the real test later on.
59433  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59434  if test "x$test_shortpath" = x; then
59435    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59436$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59437    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59438  fi
59439
59440  # Call helper function which possibly converts this using DOS-style short mode.
59441  # If so, the updated path is stored in $new_path.
59442
59443  input_path="$new_path"
59444  # Check if we need to convert this using DOS-style short mode. If the path
59445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59446  # take no chances and rewrite it.
59447  # Note: m4 eats our [], so we need to use [ and ] instead.
59448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59449  if test "x$has_forbidden_chars" != x; then
59450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59451    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59452    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59453    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59454      # Going to short mode and back again did indeed matter. Since short mode is
59455      # case insensitive, let's make it lowercase to improve readability.
59456      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59457      # Now convert it back to Unix-style (cygpath)
59458      input_path=`$CYGPATH -u "$shortmode_path"`
59459      new_path="$input_path"
59460    fi
59461  fi
59462
59463  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59464  if test "x$test_cygdrive_prefix" = x; then
59465    # As a simple fix, exclude /usr/bin since it's not a real path.
59466    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59467      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59468      # a path prefixed by /cygdrive for fixpath to work.
59469      new_path="$CYGWIN_ROOT_PATH$input_path"
59470    fi
59471  fi
59472
59473
59474  if test "x$path" != "x$new_path"; then
59475    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59476    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59477$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59478  fi
59479
59480    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59481
59482  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59483  has_colon=`$ECHO $path | $GREP ^.:`
59484  new_path="$path"
59485  if test "x$has_colon" = x; then
59486    # Not in mixed or Windows style, start by that.
59487    new_path=`cmd //c echo $path`
59488  fi
59489
59490
59491  input_path="$new_path"
59492  # Check if we need to convert this using DOS-style short mode. If the path
59493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59494  # take no chances and rewrite it.
59495  # Note: m4 eats our [], so we need to use [ and ] instead.
59496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59497  if test "x$has_forbidden_chars" != x; then
59498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59499    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59500  fi
59501
59502
59503  windows_path="$new_path"
59504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59505    unix_path=`$CYGPATH -u "$windows_path"`
59506    new_path="$unix_path"
59507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59509    new_path="$unix_path"
59510  fi
59511
59512  if test "x$path" != "x$new_path"; then
59513    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59515$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59516  fi
59517
59518  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59519  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59520
59521    else
59522      # We're on a unix platform. Hooray! :)
59523      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59524      has_space=`$ECHO "$path" | $GREP " "`
59525      if test "x$has_space" != x; then
59526        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59527$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59528        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59529      fi
59530
59531      # Use eval to expand a potential ~
59532      eval path="$path"
59533      if test ! -f "$path" && test ! -d "$path"; then
59534        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59535      fi
59536
59537      if test -d "$path"; then
59538        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59539      else
59540        dir="`$DIRNAME "$path"`"
59541        base="`$BASENAME "$path"`"
59542        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59543      fi
59544    fi
59545  fi
59546
59547
59548  # Only process if variable expands to non-empty
59549
59550  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59551    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59552
59553  # Input might be given as Windows format, start by converting to
59554  # unix format.
59555  path="$POTENTIAL_FREETYPE_LIB_PATH"
59556  new_path=`$CYGPATH -u "$path"`
59557
59558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59561  # "foo.exe" is OK but "foo" is an error.
59562  #
59563  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59564  # It is also a way to make sure we got the proper file name for the real test later on.
59565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59566  if test "x$test_shortpath" = x; then
59567    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59568$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59569    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59570  fi
59571
59572  # Call helper function which possibly converts this using DOS-style short mode.
59573  # If so, the updated path is stored in $new_path.
59574
59575  input_path="$new_path"
59576  # Check if we need to convert this using DOS-style short mode. If the path
59577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59578  # take no chances and rewrite it.
59579  # Note: m4 eats our [], so we need to use [ and ] instead.
59580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59581  if test "x$has_forbidden_chars" != x; then
59582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59586      # Going to short mode and back again did indeed matter. Since short mode is
59587      # case insensitive, let's make it lowercase to improve readability.
59588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59589      # Now convert it back to Unix-style (cygpath)
59590      input_path=`$CYGPATH -u "$shortmode_path"`
59591      new_path="$input_path"
59592    fi
59593  fi
59594
59595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59596  if test "x$test_cygdrive_prefix" = x; then
59597    # As a simple fix, exclude /usr/bin since it's not a real path.
59598    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59600      # a path prefixed by /cygdrive for fixpath to work.
59601      new_path="$CYGWIN_ROOT_PATH$input_path"
59602    fi
59603  fi
59604
59605
59606  if test "x$path" != "x$new_path"; then
59607    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59609$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59610  fi
59611
59612    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59613
59614  path="$POTENTIAL_FREETYPE_LIB_PATH"
59615  has_colon=`$ECHO $path | $GREP ^.:`
59616  new_path="$path"
59617  if test "x$has_colon" = x; then
59618    # Not in mixed or Windows style, start by that.
59619    new_path=`cmd //c echo $path`
59620  fi
59621
59622
59623  input_path="$new_path"
59624  # Check if we need to convert this using DOS-style short mode. If the path
59625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59626  # take no chances and rewrite it.
59627  # Note: m4 eats our [], so we need to use [ and ] instead.
59628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59629  if test "x$has_forbidden_chars" != x; then
59630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59632  fi
59633
59634
59635  windows_path="$new_path"
59636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59637    unix_path=`$CYGPATH -u "$windows_path"`
59638    new_path="$unix_path"
59639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59641    new_path="$unix_path"
59642  fi
59643
59644  if test "x$path" != "x$new_path"; then
59645    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59647$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59648  fi
59649
59650  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59651  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59652
59653    else
59654      # We're on a unix platform. Hooray! :)
59655      path="$POTENTIAL_FREETYPE_LIB_PATH"
59656      has_space=`$ECHO "$path" | $GREP " "`
59657      if test "x$has_space" != x; then
59658        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59659$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59660        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59661      fi
59662
59663      # Use eval to expand a potential ~
59664      eval path="$path"
59665      if test ! -f "$path" && test ! -d "$path"; then
59666        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59667      fi
59668
59669      if test -d "$path"; then
59670        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59671      else
59672        dir="`$DIRNAME "$path"`"
59673        base="`$BASENAME "$path"`"
59674        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59675      fi
59676    fi
59677  fi
59678
59679
59680    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59681    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59682$as_echo_n "checking for freetype includes... " >&6; }
59683    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59684$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59685    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59686    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59687$as_echo_n "checking for freetype libraries... " >&6; }
59688    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59689$as_echo "$FREETYPE_LIB_PATH" >&6; }
59690  fi
59691
59692              else
59693
59694  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59695  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59696  METHOD="well-known location"
59697
59698  # Let's start with an optimistic view of the world :-)
59699  FOUND_FREETYPE=yes
59700
59701  # First look for the canonical freetype main include file ft2build.h.
59702  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59703    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59704    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59705    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59706      # Fail.
59707      FOUND_FREETYPE=no
59708    fi
59709  fi
59710
59711  if test "x$FOUND_FREETYPE" = xyes; then
59712    # Include file found, let's continue the sanity check.
59713    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59714$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59715
59716    # Reset to default value
59717    FREETYPE_BASE_NAME=freetype
59718    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59719    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59720      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59721          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59722        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59723        # for the .6 version explicitly.
59724        FREETYPE_BASE_NAME=freetype.6
59725        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59726        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59727$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59728      else
59729        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59730$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59731        FOUND_FREETYPE=no
59732      fi
59733    else
59734      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59735        # On Windows, we will need both .lib and .dll file.
59736        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59737          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59738$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59739          FOUND_FREETYPE=no
59740        fi
59741      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59742          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59743        # Found lib in isa dir, use that instead.
59744        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59745        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59746$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59747      fi
59748    fi
59749  fi
59750
59751  if test "x$FOUND_FREETYPE" = xyes; then
59752
59753  # Only process if variable expands to non-empty
59754
59755  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59756    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59757
59758  # Input might be given as Windows format, start by converting to
59759  # unix format.
59760  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59761  new_path=`$CYGPATH -u "$path"`
59762
59763  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59764  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59765  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59766  # "foo.exe" is OK but "foo" is an error.
59767  #
59768  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59769  # It is also a way to make sure we got the proper file name for the real test later on.
59770  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59771  if test "x$test_shortpath" = x; then
59772    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59773$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59774    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59775  fi
59776
59777  # Call helper function which possibly converts this using DOS-style short mode.
59778  # If so, the updated path is stored in $new_path.
59779
59780  input_path="$new_path"
59781  # Check if we need to convert this using DOS-style short mode. If the path
59782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59783  # take no chances and rewrite it.
59784  # Note: m4 eats our [], so we need to use [ and ] instead.
59785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59786  if test "x$has_forbidden_chars" != x; then
59787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59788    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59789    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59790    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59791      # Going to short mode and back again did indeed matter. Since short mode is
59792      # case insensitive, let's make it lowercase to improve readability.
59793      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59794      # Now convert it back to Unix-style (cygpath)
59795      input_path=`$CYGPATH -u "$shortmode_path"`
59796      new_path="$input_path"
59797    fi
59798  fi
59799
59800  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59801  if test "x$test_cygdrive_prefix" = x; then
59802    # As a simple fix, exclude /usr/bin since it's not a real path.
59803    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59804      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59805      # a path prefixed by /cygdrive for fixpath to work.
59806      new_path="$CYGWIN_ROOT_PATH$input_path"
59807    fi
59808  fi
59809
59810
59811  if test "x$path" != "x$new_path"; then
59812    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59813    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59814$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59815  fi
59816
59817    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59818
59819  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59820  has_colon=`$ECHO $path | $GREP ^.:`
59821  new_path="$path"
59822  if test "x$has_colon" = x; then
59823    # Not in mixed or Windows style, start by that.
59824    new_path=`cmd //c echo $path`
59825  fi
59826
59827
59828  input_path="$new_path"
59829  # Check if we need to convert this using DOS-style short mode. If the path
59830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59831  # take no chances and rewrite it.
59832  # Note: m4 eats our [], so we need to use [ and ] instead.
59833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59834  if test "x$has_forbidden_chars" != x; then
59835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59836    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59837  fi
59838
59839
59840  windows_path="$new_path"
59841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59842    unix_path=`$CYGPATH -u "$windows_path"`
59843    new_path="$unix_path"
59844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59846    new_path="$unix_path"
59847  fi
59848
59849  if test "x$path" != "x$new_path"; then
59850    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59852$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59853  fi
59854
59855  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59856  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59857
59858    else
59859      # We're on a unix platform. Hooray! :)
59860      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59861      has_space=`$ECHO "$path" | $GREP " "`
59862      if test "x$has_space" != x; then
59863        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59864$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59865        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59866      fi
59867
59868      # Use eval to expand a potential ~
59869      eval path="$path"
59870      if test ! -f "$path" && test ! -d "$path"; then
59871        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59872      fi
59873
59874      if test -d "$path"; then
59875        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59876      else
59877        dir="`$DIRNAME "$path"`"
59878        base="`$BASENAME "$path"`"
59879        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59880      fi
59881    fi
59882  fi
59883
59884
59885  # Only process if variable expands to non-empty
59886
59887  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59888    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59889
59890  # Input might be given as Windows format, start by converting to
59891  # unix format.
59892  path="$POTENTIAL_FREETYPE_LIB_PATH"
59893  new_path=`$CYGPATH -u "$path"`
59894
59895  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59896  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59897  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59898  # "foo.exe" is OK but "foo" is an error.
59899  #
59900  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59901  # It is also a way to make sure we got the proper file name for the real test later on.
59902  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59903  if test "x$test_shortpath" = x; then
59904    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59905$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59906    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59907  fi
59908
59909  # Call helper function which possibly converts this using DOS-style short mode.
59910  # If so, the updated path is stored in $new_path.
59911
59912  input_path="$new_path"
59913  # Check if we need to convert this using DOS-style short mode. If the path
59914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59915  # take no chances and rewrite it.
59916  # Note: m4 eats our [], so we need to use [ and ] instead.
59917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59918  if test "x$has_forbidden_chars" != x; then
59919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59923      # Going to short mode and back again did indeed matter. Since short mode is
59924      # case insensitive, let's make it lowercase to improve readability.
59925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59926      # Now convert it back to Unix-style (cygpath)
59927      input_path=`$CYGPATH -u "$shortmode_path"`
59928      new_path="$input_path"
59929    fi
59930  fi
59931
59932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59933  if test "x$test_cygdrive_prefix" = x; then
59934    # As a simple fix, exclude /usr/bin since it's not a real path.
59935    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59937      # a path prefixed by /cygdrive for fixpath to work.
59938      new_path="$CYGWIN_ROOT_PATH$input_path"
59939    fi
59940  fi
59941
59942
59943  if test "x$path" != "x$new_path"; then
59944    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59946$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59947  fi
59948
59949    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59950
59951  path="$POTENTIAL_FREETYPE_LIB_PATH"
59952  has_colon=`$ECHO $path | $GREP ^.:`
59953  new_path="$path"
59954  if test "x$has_colon" = x; then
59955    # Not in mixed or Windows style, start by that.
59956    new_path=`cmd //c echo $path`
59957  fi
59958
59959
59960  input_path="$new_path"
59961  # Check if we need to convert this using DOS-style short mode. If the path
59962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59963  # take no chances and rewrite it.
59964  # Note: m4 eats our [], so we need to use [ and ] instead.
59965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59966  if test "x$has_forbidden_chars" != x; then
59967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59968    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59969  fi
59970
59971
59972  windows_path="$new_path"
59973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59974    unix_path=`$CYGPATH -u "$windows_path"`
59975    new_path="$unix_path"
59976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59978    new_path="$unix_path"
59979  fi
59980
59981  if test "x$path" != "x$new_path"; then
59982    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59984$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59985  fi
59986
59987  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59988  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59989
59990    else
59991      # We're on a unix platform. Hooray! :)
59992      path="$POTENTIAL_FREETYPE_LIB_PATH"
59993      has_space=`$ECHO "$path" | $GREP " "`
59994      if test "x$has_space" != x; then
59995        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59996$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59997        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59998      fi
59999
60000      # Use eval to expand a potential ~
60001      eval path="$path"
60002      if test ! -f "$path" && test ! -d "$path"; then
60003        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60004      fi
60005
60006      if test -d "$path"; then
60007        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60008      else
60009        dir="`$DIRNAME "$path"`"
60010        base="`$BASENAME "$path"`"
60011        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60012      fi
60013    fi
60014  fi
60015
60016
60017    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60018    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60019$as_echo_n "checking for freetype includes... " >&6; }
60020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60021$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60022    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60023    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60024$as_echo_n "checking for freetype libraries... " >&6; }
60025    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60026$as_echo "$FREETYPE_LIB_PATH" >&6; }
60027  fi
60028
60029              fi
60030            fi
60031          fi
60032        else
60033          FREETYPE_BASE_DIR="$SYSROOT/usr"
60034
60035  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60036  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60037  METHOD="well-known location"
60038
60039  # Let's start with an optimistic view of the world :-)
60040  FOUND_FREETYPE=yes
60041
60042  # First look for the canonical freetype main include file ft2build.h.
60043  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60044    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60045    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60046    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60047      # Fail.
60048      FOUND_FREETYPE=no
60049    fi
60050  fi
60051
60052  if test "x$FOUND_FREETYPE" = xyes; then
60053    # Include file found, let's continue the sanity check.
60054    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60055$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60056
60057    # Reset to default value
60058    FREETYPE_BASE_NAME=freetype
60059    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60060    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60061      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60062          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60063        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60064        # for the .6 version explicitly.
60065        FREETYPE_BASE_NAME=freetype.6
60066        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60067        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60068$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60069      else
60070        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60071$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60072        FOUND_FREETYPE=no
60073      fi
60074    else
60075      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60076        # On Windows, we will need both .lib and .dll file.
60077        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60078          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60079$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60080          FOUND_FREETYPE=no
60081        fi
60082      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60083          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60084        # Found lib in isa dir, use that instead.
60085        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60086        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60087$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60088      fi
60089    fi
60090  fi
60091
60092  if test "x$FOUND_FREETYPE" = xyes; then
60093
60094  # Only process if variable expands to non-empty
60095
60096  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60097    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60098
60099  # Input might be given as Windows format, start by converting to
60100  # unix format.
60101  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60102  new_path=`$CYGPATH -u "$path"`
60103
60104  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60105  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60106  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60107  # "foo.exe" is OK but "foo" is an error.
60108  #
60109  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60110  # It is also a way to make sure we got the proper file name for the real test later on.
60111  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60112  if test "x$test_shortpath" = x; then
60113    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60114$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60115    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60116  fi
60117
60118  # Call helper function which possibly converts this using DOS-style short mode.
60119  # If so, the updated path is stored in $new_path.
60120
60121  input_path="$new_path"
60122  # Check if we need to convert this using DOS-style short mode. If the path
60123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60124  # take no chances and rewrite it.
60125  # Note: m4 eats our [], so we need to use [ and ] instead.
60126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60127  if test "x$has_forbidden_chars" != x; then
60128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60129    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60130    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60131    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60132      # Going to short mode and back again did indeed matter. Since short mode is
60133      # case insensitive, let's make it lowercase to improve readability.
60134      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60135      # Now convert it back to Unix-style (cygpath)
60136      input_path=`$CYGPATH -u "$shortmode_path"`
60137      new_path="$input_path"
60138    fi
60139  fi
60140
60141  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60142  if test "x$test_cygdrive_prefix" = x; then
60143    # As a simple fix, exclude /usr/bin since it's not a real path.
60144    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60145      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60146      # a path prefixed by /cygdrive for fixpath to work.
60147      new_path="$CYGWIN_ROOT_PATH$input_path"
60148    fi
60149  fi
60150
60151
60152  if test "x$path" != "x$new_path"; then
60153    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60154    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60155$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60156  fi
60157
60158    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60159
60160  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60161  has_colon=`$ECHO $path | $GREP ^.:`
60162  new_path="$path"
60163  if test "x$has_colon" = x; then
60164    # Not in mixed or Windows style, start by that.
60165    new_path=`cmd //c echo $path`
60166  fi
60167
60168
60169  input_path="$new_path"
60170  # Check if we need to convert this using DOS-style short mode. If the path
60171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60172  # take no chances and rewrite it.
60173  # Note: m4 eats our [], so we need to use [ and ] instead.
60174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60175  if test "x$has_forbidden_chars" != x; then
60176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60177    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60178  fi
60179
60180
60181  windows_path="$new_path"
60182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60183    unix_path=`$CYGPATH -u "$windows_path"`
60184    new_path="$unix_path"
60185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60187    new_path="$unix_path"
60188  fi
60189
60190  if test "x$path" != "x$new_path"; then
60191    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60193$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60194  fi
60195
60196  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60197  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60198
60199    else
60200      # We're on a unix platform. Hooray! :)
60201      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60202      has_space=`$ECHO "$path" | $GREP " "`
60203      if test "x$has_space" != x; then
60204        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60205$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60206        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60207      fi
60208
60209      # Use eval to expand a potential ~
60210      eval path="$path"
60211      if test ! -f "$path" && test ! -d "$path"; then
60212        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60213      fi
60214
60215      if test -d "$path"; then
60216        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60217      else
60218        dir="`$DIRNAME "$path"`"
60219        base="`$BASENAME "$path"`"
60220        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60221      fi
60222    fi
60223  fi
60224
60225
60226  # Only process if variable expands to non-empty
60227
60228  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60229    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60230
60231  # Input might be given as Windows format, start by converting to
60232  # unix format.
60233  path="$POTENTIAL_FREETYPE_LIB_PATH"
60234  new_path=`$CYGPATH -u "$path"`
60235
60236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60239  # "foo.exe" is OK but "foo" is an error.
60240  #
60241  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60242  # It is also a way to make sure we got the proper file name for the real test later on.
60243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60244  if test "x$test_shortpath" = x; then
60245    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60246$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60247    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60248  fi
60249
60250  # Call helper function which possibly converts this using DOS-style short mode.
60251  # If so, the updated path is stored in $new_path.
60252
60253  input_path="$new_path"
60254  # Check if we need to convert this using DOS-style short mode. If the path
60255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60256  # take no chances and rewrite it.
60257  # Note: m4 eats our [], so we need to use [ and ] instead.
60258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60259  if test "x$has_forbidden_chars" != x; then
60260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60264      # Going to short mode and back again did indeed matter. Since short mode is
60265      # case insensitive, let's make it lowercase to improve readability.
60266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60267      # Now convert it back to Unix-style (cygpath)
60268      input_path=`$CYGPATH -u "$shortmode_path"`
60269      new_path="$input_path"
60270    fi
60271  fi
60272
60273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60274  if test "x$test_cygdrive_prefix" = x; then
60275    # As a simple fix, exclude /usr/bin since it's not a real path.
60276    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60278      # a path prefixed by /cygdrive for fixpath to work.
60279      new_path="$CYGWIN_ROOT_PATH$input_path"
60280    fi
60281  fi
60282
60283
60284  if test "x$path" != "x$new_path"; then
60285    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60287$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60288  fi
60289
60290    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60291
60292  path="$POTENTIAL_FREETYPE_LIB_PATH"
60293  has_colon=`$ECHO $path | $GREP ^.:`
60294  new_path="$path"
60295  if test "x$has_colon" = x; then
60296    # Not in mixed or Windows style, start by that.
60297    new_path=`cmd //c echo $path`
60298  fi
60299
60300
60301  input_path="$new_path"
60302  # Check if we need to convert this using DOS-style short mode. If the path
60303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60304  # take no chances and rewrite it.
60305  # Note: m4 eats our [], so we need to use [ and ] instead.
60306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60307  if test "x$has_forbidden_chars" != x; then
60308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60309    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60310  fi
60311
60312
60313  windows_path="$new_path"
60314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60315    unix_path=`$CYGPATH -u "$windows_path"`
60316    new_path="$unix_path"
60317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60319    new_path="$unix_path"
60320  fi
60321
60322  if test "x$path" != "x$new_path"; then
60323    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60325$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60326  fi
60327
60328  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60329  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60330
60331    else
60332      # We're on a unix platform. Hooray! :)
60333      path="$POTENTIAL_FREETYPE_LIB_PATH"
60334      has_space=`$ECHO "$path" | $GREP " "`
60335      if test "x$has_space" != x; then
60336        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60337$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60338        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60339      fi
60340
60341      # Use eval to expand a potential ~
60342      eval path="$path"
60343      if test ! -f "$path" && test ! -d "$path"; then
60344        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60345      fi
60346
60347      if test -d "$path"; then
60348        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60349      else
60350        dir="`$DIRNAME "$path"`"
60351        base="`$BASENAME "$path"`"
60352        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60353      fi
60354    fi
60355  fi
60356
60357
60358    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60359    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60360$as_echo_n "checking for freetype includes... " >&6; }
60361    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60362$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60363    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60364    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60365$as_echo_n "checking for freetype libraries... " >&6; }
60366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60367$as_echo "$FREETYPE_LIB_PATH" >&6; }
60368  fi
60369
60370
60371          if test "x$FOUND_FREETYPE" != xyes; then
60372            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60373
60374  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60375  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60376  METHOD="well-known location"
60377
60378  # Let's start with an optimistic view of the world :-)
60379  FOUND_FREETYPE=yes
60380
60381  # First look for the canonical freetype main include file ft2build.h.
60382  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60383    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60384    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60385    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60386      # Fail.
60387      FOUND_FREETYPE=no
60388    fi
60389  fi
60390
60391  if test "x$FOUND_FREETYPE" = xyes; then
60392    # Include file found, let's continue the sanity check.
60393    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60394$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60395
60396    # Reset to default value
60397    FREETYPE_BASE_NAME=freetype
60398    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60399    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60400      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60401          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60402        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60403        # for the .6 version explicitly.
60404        FREETYPE_BASE_NAME=freetype.6
60405        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60406        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60407$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60408      else
60409        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60410$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60411        FOUND_FREETYPE=no
60412      fi
60413    else
60414      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60415        # On Windows, we will need both .lib and .dll file.
60416        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60417          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60418$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60419          FOUND_FREETYPE=no
60420        fi
60421      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60422          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60423        # Found lib in isa dir, use that instead.
60424        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60425        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60426$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60427      fi
60428    fi
60429  fi
60430
60431  if test "x$FOUND_FREETYPE" = xyes; then
60432
60433  # Only process if variable expands to non-empty
60434
60435  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60436    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60437
60438  # Input might be given as Windows format, start by converting to
60439  # unix format.
60440  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60441  new_path=`$CYGPATH -u "$path"`
60442
60443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60446  # "foo.exe" is OK but "foo" is an error.
60447  #
60448  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60449  # It is also a way to make sure we got the proper file name for the real test later on.
60450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60451  if test "x$test_shortpath" = x; then
60452    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60453$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60454    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60455  fi
60456
60457  # Call helper function which possibly converts this using DOS-style short mode.
60458  # If so, the updated path is stored in $new_path.
60459
60460  input_path="$new_path"
60461  # Check if we need to convert this using DOS-style short mode. If the path
60462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60463  # take no chances and rewrite it.
60464  # Note: m4 eats our [], so we need to use [ and ] instead.
60465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60466  if test "x$has_forbidden_chars" != x; then
60467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60471      # Going to short mode and back again did indeed matter. Since short mode is
60472      # case insensitive, let's make it lowercase to improve readability.
60473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60474      # Now convert it back to Unix-style (cygpath)
60475      input_path=`$CYGPATH -u "$shortmode_path"`
60476      new_path="$input_path"
60477    fi
60478  fi
60479
60480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60481  if test "x$test_cygdrive_prefix" = x; then
60482    # As a simple fix, exclude /usr/bin since it's not a real path.
60483    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60485      # a path prefixed by /cygdrive for fixpath to work.
60486      new_path="$CYGWIN_ROOT_PATH$input_path"
60487    fi
60488  fi
60489
60490
60491  if test "x$path" != "x$new_path"; then
60492    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60494$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60495  fi
60496
60497    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60498
60499  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60500  has_colon=`$ECHO $path | $GREP ^.:`
60501  new_path="$path"
60502  if test "x$has_colon" = x; then
60503    # Not in mixed or Windows style, start by that.
60504    new_path=`cmd //c echo $path`
60505  fi
60506
60507
60508  input_path="$new_path"
60509  # Check if we need to convert this using DOS-style short mode. If the path
60510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60511  # take no chances and rewrite it.
60512  # Note: m4 eats our [], so we need to use [ and ] instead.
60513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60514  if test "x$has_forbidden_chars" != x; then
60515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60516    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60517  fi
60518
60519
60520  windows_path="$new_path"
60521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60522    unix_path=`$CYGPATH -u "$windows_path"`
60523    new_path="$unix_path"
60524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60526    new_path="$unix_path"
60527  fi
60528
60529  if test "x$path" != "x$new_path"; then
60530    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60532$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60533  fi
60534
60535  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60536  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60537
60538    else
60539      # We're on a unix platform. Hooray! :)
60540      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60541      has_space=`$ECHO "$path" | $GREP " "`
60542      if test "x$has_space" != x; then
60543        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60544$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60545        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60546      fi
60547
60548      # Use eval to expand a potential ~
60549      eval path="$path"
60550      if test ! -f "$path" && test ! -d "$path"; then
60551        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60552      fi
60553
60554      if test -d "$path"; then
60555        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60556      else
60557        dir="`$DIRNAME "$path"`"
60558        base="`$BASENAME "$path"`"
60559        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60560      fi
60561    fi
60562  fi
60563
60564
60565  # Only process if variable expands to non-empty
60566
60567  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60568    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60569
60570  # Input might be given as Windows format, start by converting to
60571  # unix format.
60572  path="$POTENTIAL_FREETYPE_LIB_PATH"
60573  new_path=`$CYGPATH -u "$path"`
60574
60575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60578  # "foo.exe" is OK but "foo" is an error.
60579  #
60580  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60581  # It is also a way to make sure we got the proper file name for the real test later on.
60582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60583  if test "x$test_shortpath" = x; then
60584    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60585$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60586    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60587  fi
60588
60589  # Call helper function which possibly converts this using DOS-style short mode.
60590  # If so, the updated path is stored in $new_path.
60591
60592  input_path="$new_path"
60593  # Check if we need to convert this using DOS-style short mode. If the path
60594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60595  # take no chances and rewrite it.
60596  # Note: m4 eats our [], so we need to use [ and ] instead.
60597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60598  if test "x$has_forbidden_chars" != x; then
60599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60600    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60601    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60602    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60603      # Going to short mode and back again did indeed matter. Since short mode is
60604      # case insensitive, let's make it lowercase to improve readability.
60605      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60606      # Now convert it back to Unix-style (cygpath)
60607      input_path=`$CYGPATH -u "$shortmode_path"`
60608      new_path="$input_path"
60609    fi
60610  fi
60611
60612  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60613  if test "x$test_cygdrive_prefix" = x; then
60614    # As a simple fix, exclude /usr/bin since it's not a real path.
60615    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60616      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60617      # a path prefixed by /cygdrive for fixpath to work.
60618      new_path="$CYGWIN_ROOT_PATH$input_path"
60619    fi
60620  fi
60621
60622
60623  if test "x$path" != "x$new_path"; then
60624    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60626$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60627  fi
60628
60629    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60630
60631  path="$POTENTIAL_FREETYPE_LIB_PATH"
60632  has_colon=`$ECHO $path | $GREP ^.:`
60633  new_path="$path"
60634  if test "x$has_colon" = x; then
60635    # Not in mixed or Windows style, start by that.
60636    new_path=`cmd //c echo $path`
60637  fi
60638
60639
60640  input_path="$new_path"
60641  # Check if we need to convert this using DOS-style short mode. If the path
60642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60643  # take no chances and rewrite it.
60644  # Note: m4 eats our [], so we need to use [ and ] instead.
60645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60646  if test "x$has_forbidden_chars" != x; then
60647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60648    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60649  fi
60650
60651
60652  windows_path="$new_path"
60653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60654    unix_path=`$CYGPATH -u "$windows_path"`
60655    new_path="$unix_path"
60656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60658    new_path="$unix_path"
60659  fi
60660
60661  if test "x$path" != "x$new_path"; then
60662    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60664$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60665  fi
60666
60667  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60668  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60669
60670    else
60671      # We're on a unix platform. Hooray! :)
60672      path="$POTENTIAL_FREETYPE_LIB_PATH"
60673      has_space=`$ECHO "$path" | $GREP " "`
60674      if test "x$has_space" != x; then
60675        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60676$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60677        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60678      fi
60679
60680      # Use eval to expand a potential ~
60681      eval path="$path"
60682      if test ! -f "$path" && test ! -d "$path"; then
60683        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60684      fi
60685
60686      if test -d "$path"; then
60687        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60688      else
60689        dir="`$DIRNAME "$path"`"
60690        base="`$BASENAME "$path"`"
60691        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60692      fi
60693    fi
60694  fi
60695
60696
60697    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60698    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60699$as_echo_n "checking for freetype includes... " >&6; }
60700    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60701$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60702    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60703    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60704$as_echo_n "checking for freetype libraries... " >&6; }
60705    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60706$as_echo "$FREETYPE_LIB_PATH" >&6; }
60707  fi
60708
60709          fi
60710
60711          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60712            if test "x$FOUND_FREETYPE" != xyes; then
60713              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60714              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60715
60716  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60717  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60718  METHOD="well-known location"
60719
60720  # Let's start with an optimistic view of the world :-)
60721  FOUND_FREETYPE=yes
60722
60723  # First look for the canonical freetype main include file ft2build.h.
60724  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60725    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60726    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60727    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60728      # Fail.
60729      FOUND_FREETYPE=no
60730    fi
60731  fi
60732
60733  if test "x$FOUND_FREETYPE" = xyes; then
60734    # Include file found, let's continue the sanity check.
60735    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60736$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60737
60738    # Reset to default value
60739    FREETYPE_BASE_NAME=freetype
60740    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60741    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60742      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60743          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60744        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60745        # for the .6 version explicitly.
60746        FREETYPE_BASE_NAME=freetype.6
60747        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60748        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60749$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60750      else
60751        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60752$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60753        FOUND_FREETYPE=no
60754      fi
60755    else
60756      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60757        # On Windows, we will need both .lib and .dll file.
60758        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60759          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60760$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60761          FOUND_FREETYPE=no
60762        fi
60763      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60764          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60765        # Found lib in isa dir, use that instead.
60766        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60767        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60768$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60769      fi
60770    fi
60771  fi
60772
60773  if test "x$FOUND_FREETYPE" = xyes; then
60774
60775  # Only process if variable expands to non-empty
60776
60777  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60778    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60779
60780  # Input might be given as Windows format, start by converting to
60781  # unix format.
60782  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60783  new_path=`$CYGPATH -u "$path"`
60784
60785  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60786  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60787  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60788  # "foo.exe" is OK but "foo" is an error.
60789  #
60790  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60791  # It is also a way to make sure we got the proper file name for the real test later on.
60792  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60793  if test "x$test_shortpath" = x; then
60794    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60795$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60796    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60797  fi
60798
60799  # Call helper function which possibly converts this using DOS-style short mode.
60800  # If so, the updated path is stored in $new_path.
60801
60802  input_path="$new_path"
60803  # Check if we need to convert this using DOS-style short mode. If the path
60804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60805  # take no chances and rewrite it.
60806  # Note: m4 eats our [], so we need to use [ and ] instead.
60807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60808  if test "x$has_forbidden_chars" != x; then
60809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60810    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60811    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60812    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60813      # Going to short mode and back again did indeed matter. Since short mode is
60814      # case insensitive, let's make it lowercase to improve readability.
60815      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60816      # Now convert it back to Unix-style (cygpath)
60817      input_path=`$CYGPATH -u "$shortmode_path"`
60818      new_path="$input_path"
60819    fi
60820  fi
60821
60822  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60823  if test "x$test_cygdrive_prefix" = x; then
60824    # As a simple fix, exclude /usr/bin since it's not a real path.
60825    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60826      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60827      # a path prefixed by /cygdrive for fixpath to work.
60828      new_path="$CYGWIN_ROOT_PATH$input_path"
60829    fi
60830  fi
60831
60832
60833  if test "x$path" != "x$new_path"; then
60834    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60835    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60836$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60837  fi
60838
60839    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60840
60841  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60842  has_colon=`$ECHO $path | $GREP ^.:`
60843  new_path="$path"
60844  if test "x$has_colon" = x; then
60845    # Not in mixed or Windows style, start by that.
60846    new_path=`cmd //c echo $path`
60847  fi
60848
60849
60850  input_path="$new_path"
60851  # Check if we need to convert this using DOS-style short mode. If the path
60852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60853  # take no chances and rewrite it.
60854  # Note: m4 eats our [], so we need to use [ and ] instead.
60855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60856  if test "x$has_forbidden_chars" != x; then
60857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60858    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60859  fi
60860
60861
60862  windows_path="$new_path"
60863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60864    unix_path=`$CYGPATH -u "$windows_path"`
60865    new_path="$unix_path"
60866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60868    new_path="$unix_path"
60869  fi
60870
60871  if test "x$path" != "x$new_path"; then
60872    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60873    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60874$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60875  fi
60876
60877  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60878  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60879
60880    else
60881      # We're on a unix platform. Hooray! :)
60882      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60883      has_space=`$ECHO "$path" | $GREP " "`
60884      if test "x$has_space" != x; then
60885        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60886$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60887        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60888      fi
60889
60890      # Use eval to expand a potential ~
60891      eval path="$path"
60892      if test ! -f "$path" && test ! -d "$path"; then
60893        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60894      fi
60895
60896      if test -d "$path"; then
60897        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60898      else
60899        dir="`$DIRNAME "$path"`"
60900        base="`$BASENAME "$path"`"
60901        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60902      fi
60903    fi
60904  fi
60905
60906
60907  # Only process if variable expands to non-empty
60908
60909  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60910    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60911
60912  # Input might be given as Windows format, start by converting to
60913  # unix format.
60914  path="$POTENTIAL_FREETYPE_LIB_PATH"
60915  new_path=`$CYGPATH -u "$path"`
60916
60917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60920  # "foo.exe" is OK but "foo" is an error.
60921  #
60922  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60923  # It is also a way to make sure we got the proper file name for the real test later on.
60924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60925  if test "x$test_shortpath" = x; then
60926    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60927$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60928    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60929  fi
60930
60931  # Call helper function which possibly converts this using DOS-style short mode.
60932  # If so, the updated path is stored in $new_path.
60933
60934  input_path="$new_path"
60935  # Check if we need to convert this using DOS-style short mode. If the path
60936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60937  # take no chances and rewrite it.
60938  # Note: m4 eats our [], so we need to use [ and ] instead.
60939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60940  if test "x$has_forbidden_chars" != x; then
60941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60942    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60943    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60944    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60945      # Going to short mode and back again did indeed matter. Since short mode is
60946      # case insensitive, let's make it lowercase to improve readability.
60947      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60948      # Now convert it back to Unix-style (cygpath)
60949      input_path=`$CYGPATH -u "$shortmode_path"`
60950      new_path="$input_path"
60951    fi
60952  fi
60953
60954  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60955  if test "x$test_cygdrive_prefix" = x; then
60956    # As a simple fix, exclude /usr/bin since it's not a real path.
60957    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60958      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60959      # a path prefixed by /cygdrive for fixpath to work.
60960      new_path="$CYGWIN_ROOT_PATH$input_path"
60961    fi
60962  fi
60963
60964
60965  if test "x$path" != "x$new_path"; then
60966    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60968$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60969  fi
60970
60971    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60972
60973  path="$POTENTIAL_FREETYPE_LIB_PATH"
60974  has_colon=`$ECHO $path | $GREP ^.:`
60975  new_path="$path"
60976  if test "x$has_colon" = x; then
60977    # Not in mixed or Windows style, start by that.
60978    new_path=`cmd //c echo $path`
60979  fi
60980
60981
60982  input_path="$new_path"
60983  # Check if we need to convert this using DOS-style short mode. If the path
60984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60985  # take no chances and rewrite it.
60986  # Note: m4 eats our [], so we need to use [ and ] instead.
60987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60988  if test "x$has_forbidden_chars" != x; then
60989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60991  fi
60992
60993
60994  windows_path="$new_path"
60995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60996    unix_path=`$CYGPATH -u "$windows_path"`
60997    new_path="$unix_path"
60998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61000    new_path="$unix_path"
61001  fi
61002
61003  if test "x$path" != "x$new_path"; then
61004    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61005    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61006$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61007  fi
61008
61009  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61010  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61011
61012    else
61013      # We're on a unix platform. Hooray! :)
61014      path="$POTENTIAL_FREETYPE_LIB_PATH"
61015      has_space=`$ECHO "$path" | $GREP " "`
61016      if test "x$has_space" != x; then
61017        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61018$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61019        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61020      fi
61021
61022      # Use eval to expand a potential ~
61023      eval path="$path"
61024      if test ! -f "$path" && test ! -d "$path"; then
61025        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61026      fi
61027
61028      if test -d "$path"; then
61029        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61030      else
61031        dir="`$DIRNAME "$path"`"
61032        base="`$BASENAME "$path"`"
61033        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61034      fi
61035    fi
61036  fi
61037
61038
61039    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61040    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61041$as_echo_n "checking for freetype includes... " >&6; }
61042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61043$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61044    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61045    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61046$as_echo_n "checking for freetype libraries... " >&6; }
61047    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61048$as_echo "$FREETYPE_LIB_PATH" >&6; }
61049  fi
61050
61051            fi
61052          fi
61053
61054          if test "x$FOUND_FREETYPE" != xyes; then
61055            FREETYPE_BASE_DIR="$SYSROOT/usr"
61056            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61057
61058  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61059  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61060  METHOD="well-known location"
61061
61062  # Let's start with an optimistic view of the world :-)
61063  FOUND_FREETYPE=yes
61064
61065  # First look for the canonical freetype main include file ft2build.h.
61066  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61067    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61068    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61069    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61070      # Fail.
61071      FOUND_FREETYPE=no
61072    fi
61073  fi
61074
61075  if test "x$FOUND_FREETYPE" = xyes; then
61076    # Include file found, let's continue the sanity check.
61077    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61078$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61079
61080    # Reset to default value
61081    FREETYPE_BASE_NAME=freetype
61082    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61083    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61084      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61085          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61086        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61087        # for the .6 version explicitly.
61088        FREETYPE_BASE_NAME=freetype.6
61089        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61090        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61091$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61092      else
61093        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61094$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61095        FOUND_FREETYPE=no
61096      fi
61097    else
61098      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61099        # On Windows, we will need both .lib and .dll file.
61100        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61101          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61102$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61103          FOUND_FREETYPE=no
61104        fi
61105      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61106          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61107        # Found lib in isa dir, use that instead.
61108        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61109        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61110$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61111      fi
61112    fi
61113  fi
61114
61115  if test "x$FOUND_FREETYPE" = xyes; then
61116
61117  # Only process if variable expands to non-empty
61118
61119  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61120    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61121
61122  # Input might be given as Windows format, start by converting to
61123  # unix format.
61124  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61125  new_path=`$CYGPATH -u "$path"`
61126
61127  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61128  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61129  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61130  # "foo.exe" is OK but "foo" is an error.
61131  #
61132  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61133  # It is also a way to make sure we got the proper file name for the real test later on.
61134  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61135  if test "x$test_shortpath" = x; then
61136    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61137$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61138    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61139  fi
61140
61141  # Call helper function which possibly converts this using DOS-style short mode.
61142  # If so, the updated path is stored in $new_path.
61143
61144  input_path="$new_path"
61145  # Check if we need to convert this using DOS-style short mode. If the path
61146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61147  # take no chances and rewrite it.
61148  # Note: m4 eats our [], so we need to use [ and ] instead.
61149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61150  if test "x$has_forbidden_chars" != x; then
61151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61152    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61153    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61154    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61155      # Going to short mode and back again did indeed matter. Since short mode is
61156      # case insensitive, let's make it lowercase to improve readability.
61157      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61158      # Now convert it back to Unix-style (cygpath)
61159      input_path=`$CYGPATH -u "$shortmode_path"`
61160      new_path="$input_path"
61161    fi
61162  fi
61163
61164  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61165  if test "x$test_cygdrive_prefix" = x; then
61166    # As a simple fix, exclude /usr/bin since it's not a real path.
61167    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61168      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61169      # a path prefixed by /cygdrive for fixpath to work.
61170      new_path="$CYGWIN_ROOT_PATH$input_path"
61171    fi
61172  fi
61173
61174
61175  if test "x$path" != "x$new_path"; then
61176    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61178$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61179  fi
61180
61181    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61182
61183  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61184  has_colon=`$ECHO $path | $GREP ^.:`
61185  new_path="$path"
61186  if test "x$has_colon" = x; then
61187    # Not in mixed or Windows style, start by that.
61188    new_path=`cmd //c echo $path`
61189  fi
61190
61191
61192  input_path="$new_path"
61193  # Check if we need to convert this using DOS-style short mode. If the path
61194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61195  # take no chances and rewrite it.
61196  # Note: m4 eats our [], so we need to use [ and ] instead.
61197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61198  if test "x$has_forbidden_chars" != x; then
61199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61201  fi
61202
61203
61204  windows_path="$new_path"
61205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61206    unix_path=`$CYGPATH -u "$windows_path"`
61207    new_path="$unix_path"
61208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61210    new_path="$unix_path"
61211  fi
61212
61213  if test "x$path" != "x$new_path"; then
61214    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61216$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61217  fi
61218
61219  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61220  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61221
61222    else
61223      # We're on a unix platform. Hooray! :)
61224      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61225      has_space=`$ECHO "$path" | $GREP " "`
61226      if test "x$has_space" != x; then
61227        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61228$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61229        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61230      fi
61231
61232      # Use eval to expand a potential ~
61233      eval path="$path"
61234      if test ! -f "$path" && test ! -d "$path"; then
61235        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61236      fi
61237
61238      if test -d "$path"; then
61239        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61240      else
61241        dir="`$DIRNAME "$path"`"
61242        base="`$BASENAME "$path"`"
61243        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61244      fi
61245    fi
61246  fi
61247
61248
61249  # Only process if variable expands to non-empty
61250
61251  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61252    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61253
61254  # Input might be given as Windows format, start by converting to
61255  # unix format.
61256  path="$POTENTIAL_FREETYPE_LIB_PATH"
61257  new_path=`$CYGPATH -u "$path"`
61258
61259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61262  # "foo.exe" is OK but "foo" is an error.
61263  #
61264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61265  # It is also a way to make sure we got the proper file name for the real test later on.
61266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61267  if test "x$test_shortpath" = x; then
61268    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61269$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61270    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61271  fi
61272
61273  # Call helper function which possibly converts this using DOS-style short mode.
61274  # If so, the updated path is stored in $new_path.
61275
61276  input_path="$new_path"
61277  # Check if we need to convert this using DOS-style short mode. If the path
61278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61279  # take no chances and rewrite it.
61280  # Note: m4 eats our [], so we need to use [ and ] instead.
61281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61282  if test "x$has_forbidden_chars" != x; then
61283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61287      # Going to short mode and back again did indeed matter. Since short mode is
61288      # case insensitive, let's make it lowercase to improve readability.
61289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61290      # Now convert it back to Unix-style (cygpath)
61291      input_path=`$CYGPATH -u "$shortmode_path"`
61292      new_path="$input_path"
61293    fi
61294  fi
61295
61296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61297  if test "x$test_cygdrive_prefix" = x; then
61298    # As a simple fix, exclude /usr/bin since it's not a real path.
61299    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61301      # a path prefixed by /cygdrive for fixpath to work.
61302      new_path="$CYGWIN_ROOT_PATH$input_path"
61303    fi
61304  fi
61305
61306
61307  if test "x$path" != "x$new_path"; then
61308    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61310$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61311  fi
61312
61313    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61314
61315  path="$POTENTIAL_FREETYPE_LIB_PATH"
61316  has_colon=`$ECHO $path | $GREP ^.:`
61317  new_path="$path"
61318  if test "x$has_colon" = x; then
61319    # Not in mixed or Windows style, start by that.
61320    new_path=`cmd //c echo $path`
61321  fi
61322
61323
61324  input_path="$new_path"
61325  # Check if we need to convert this using DOS-style short mode. If the path
61326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61327  # take no chances and rewrite it.
61328  # Note: m4 eats our [], so we need to use [ and ] instead.
61329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61330  if test "x$has_forbidden_chars" != x; then
61331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61333  fi
61334
61335
61336  windows_path="$new_path"
61337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61338    unix_path=`$CYGPATH -u "$windows_path"`
61339    new_path="$unix_path"
61340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61342    new_path="$unix_path"
61343  fi
61344
61345  if test "x$path" != "x$new_path"; then
61346    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61348$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61349  fi
61350
61351  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61352  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61353
61354    else
61355      # We're on a unix platform. Hooray! :)
61356      path="$POTENTIAL_FREETYPE_LIB_PATH"
61357      has_space=`$ECHO "$path" | $GREP " "`
61358      if test "x$has_space" != x; then
61359        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61360$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61361        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61362      fi
61363
61364      # Use eval to expand a potential ~
61365      eval path="$path"
61366      if test ! -f "$path" && test ! -d "$path"; then
61367        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61368      fi
61369
61370      if test -d "$path"; then
61371        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61372      else
61373        dir="`$DIRNAME "$path"`"
61374        base="`$BASENAME "$path"`"
61375        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61376      fi
61377    fi
61378  fi
61379
61380
61381    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61382    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61383$as_echo_n "checking for freetype includes... " >&6; }
61384    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61385$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61386    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61388$as_echo_n "checking for freetype libraries... " >&6; }
61389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61390$as_echo "$FREETYPE_LIB_PATH" >&6; }
61391  fi
61392
61393            else
61394
61395  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61396  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61397  METHOD="well-known location"
61398
61399  # Let's start with an optimistic view of the world :-)
61400  FOUND_FREETYPE=yes
61401
61402  # First look for the canonical freetype main include file ft2build.h.
61403  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61404    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61405    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61406    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61407      # Fail.
61408      FOUND_FREETYPE=no
61409    fi
61410  fi
61411
61412  if test "x$FOUND_FREETYPE" = xyes; then
61413    # Include file found, let's continue the sanity check.
61414    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61415$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61416
61417    # Reset to default value
61418    FREETYPE_BASE_NAME=freetype
61419    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61420    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61421      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61422          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61423        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61424        # for the .6 version explicitly.
61425        FREETYPE_BASE_NAME=freetype.6
61426        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61427        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61428$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61429      else
61430        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61431$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61432        FOUND_FREETYPE=no
61433      fi
61434    else
61435      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61436        # On Windows, we will need both .lib and .dll file.
61437        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61438          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61439$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61440          FOUND_FREETYPE=no
61441        fi
61442      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61443          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61444        # Found lib in isa dir, use that instead.
61445        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61446        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61447$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61448      fi
61449    fi
61450  fi
61451
61452  if test "x$FOUND_FREETYPE" = xyes; then
61453
61454  # Only process if variable expands to non-empty
61455
61456  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61457    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61458
61459  # Input might be given as Windows format, start by converting to
61460  # unix format.
61461  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61462  new_path=`$CYGPATH -u "$path"`
61463
61464  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61465  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61466  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61467  # "foo.exe" is OK but "foo" is an error.
61468  #
61469  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61470  # It is also a way to make sure we got the proper file name for the real test later on.
61471  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61472  if test "x$test_shortpath" = x; then
61473    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61474$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61475    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61476  fi
61477
61478  # Call helper function which possibly converts this using DOS-style short mode.
61479  # If so, the updated path is stored in $new_path.
61480
61481  input_path="$new_path"
61482  # Check if we need to convert this using DOS-style short mode. If the path
61483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61484  # take no chances and rewrite it.
61485  # Note: m4 eats our [], so we need to use [ and ] instead.
61486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61487  if test "x$has_forbidden_chars" != x; then
61488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61489    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61490    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61491    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61492      # Going to short mode and back again did indeed matter. Since short mode is
61493      # case insensitive, let's make it lowercase to improve readability.
61494      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61495      # Now convert it back to Unix-style (cygpath)
61496      input_path=`$CYGPATH -u "$shortmode_path"`
61497      new_path="$input_path"
61498    fi
61499  fi
61500
61501  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61502  if test "x$test_cygdrive_prefix" = x; then
61503    # As a simple fix, exclude /usr/bin since it's not a real path.
61504    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61505      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61506      # a path prefixed by /cygdrive for fixpath to work.
61507      new_path="$CYGWIN_ROOT_PATH$input_path"
61508    fi
61509  fi
61510
61511
61512  if test "x$path" != "x$new_path"; then
61513    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61515$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61516  fi
61517
61518    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61519
61520  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61521  has_colon=`$ECHO $path | $GREP ^.:`
61522  new_path="$path"
61523  if test "x$has_colon" = x; then
61524    # Not in mixed or Windows style, start by that.
61525    new_path=`cmd //c echo $path`
61526  fi
61527
61528
61529  input_path="$new_path"
61530  # Check if we need to convert this using DOS-style short mode. If the path
61531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61532  # take no chances and rewrite it.
61533  # Note: m4 eats our [], so we need to use [ and ] instead.
61534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61535  if test "x$has_forbidden_chars" != x; then
61536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61537    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61538  fi
61539
61540
61541  windows_path="$new_path"
61542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61543    unix_path=`$CYGPATH -u "$windows_path"`
61544    new_path="$unix_path"
61545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61547    new_path="$unix_path"
61548  fi
61549
61550  if test "x$path" != "x$new_path"; then
61551    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61553$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61554  fi
61555
61556  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61557  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61558
61559    else
61560      # We're on a unix platform. Hooray! :)
61561      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61562      has_space=`$ECHO "$path" | $GREP " "`
61563      if test "x$has_space" != x; then
61564        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61565$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61566        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61567      fi
61568
61569      # Use eval to expand a potential ~
61570      eval path="$path"
61571      if test ! -f "$path" && test ! -d "$path"; then
61572        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61573      fi
61574
61575      if test -d "$path"; then
61576        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61577      else
61578        dir="`$DIRNAME "$path"`"
61579        base="`$BASENAME "$path"`"
61580        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61581      fi
61582    fi
61583  fi
61584
61585
61586  # Only process if variable expands to non-empty
61587
61588  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61589    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61590
61591  # Input might be given as Windows format, start by converting to
61592  # unix format.
61593  path="$POTENTIAL_FREETYPE_LIB_PATH"
61594  new_path=`$CYGPATH -u "$path"`
61595
61596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61599  # "foo.exe" is OK but "foo" is an error.
61600  #
61601  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61602  # It is also a way to make sure we got the proper file name for the real test later on.
61603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61604  if test "x$test_shortpath" = x; then
61605    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61606$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61607    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61608  fi
61609
61610  # Call helper function which possibly converts this using DOS-style short mode.
61611  # If so, the updated path is stored in $new_path.
61612
61613  input_path="$new_path"
61614  # Check if we need to convert this using DOS-style short mode. If the path
61615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61616  # take no chances and rewrite it.
61617  # Note: m4 eats our [], so we need to use [ and ] instead.
61618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61619  if test "x$has_forbidden_chars" != x; then
61620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61624      # Going to short mode and back again did indeed matter. Since short mode is
61625      # case insensitive, let's make it lowercase to improve readability.
61626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61627      # Now convert it back to Unix-style (cygpath)
61628      input_path=`$CYGPATH -u "$shortmode_path"`
61629      new_path="$input_path"
61630    fi
61631  fi
61632
61633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61634  if test "x$test_cygdrive_prefix" = x; then
61635    # As a simple fix, exclude /usr/bin since it's not a real path.
61636    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61638      # a path prefixed by /cygdrive for fixpath to work.
61639      new_path="$CYGWIN_ROOT_PATH$input_path"
61640    fi
61641  fi
61642
61643
61644  if test "x$path" != "x$new_path"; then
61645    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61647$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61648  fi
61649
61650    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61651
61652  path="$POTENTIAL_FREETYPE_LIB_PATH"
61653  has_colon=`$ECHO $path | $GREP ^.:`
61654  new_path="$path"
61655  if test "x$has_colon" = x; then
61656    # Not in mixed or Windows style, start by that.
61657    new_path=`cmd //c echo $path`
61658  fi
61659
61660
61661  input_path="$new_path"
61662  # Check if we need to convert this using DOS-style short mode. If the path
61663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61664  # take no chances and rewrite it.
61665  # Note: m4 eats our [], so we need to use [ and ] instead.
61666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61667  if test "x$has_forbidden_chars" != x; then
61668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61669    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61670  fi
61671
61672
61673  windows_path="$new_path"
61674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61675    unix_path=`$CYGPATH -u "$windows_path"`
61676    new_path="$unix_path"
61677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61679    new_path="$unix_path"
61680  fi
61681
61682  if test "x$path" != "x$new_path"; then
61683    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61685$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61686  fi
61687
61688  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61689  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61690
61691    else
61692      # We're on a unix platform. Hooray! :)
61693      path="$POTENTIAL_FREETYPE_LIB_PATH"
61694      has_space=`$ECHO "$path" | $GREP " "`
61695      if test "x$has_space" != x; then
61696        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61697$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61698        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61699      fi
61700
61701      # Use eval to expand a potential ~
61702      eval path="$path"
61703      if test ! -f "$path" && test ! -d "$path"; then
61704        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61705      fi
61706
61707      if test -d "$path"; then
61708        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61709      else
61710        dir="`$DIRNAME "$path"`"
61711        base="`$BASENAME "$path"`"
61712        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61713      fi
61714    fi
61715  fi
61716
61717
61718    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61719    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61720$as_echo_n "checking for freetype includes... " >&6; }
61721    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61722$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61723    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61724    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61725$as_echo_n "checking for freetype libraries... " >&6; }
61726    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61727$as_echo "$FREETYPE_LIB_PATH" >&6; }
61728  fi
61729
61730              if test "x$FOUND_FREETYPE" != xyes; then
61731
61732  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61733  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61734  METHOD="well-known location"
61735
61736  # Let's start with an optimistic view of the world :-)
61737  FOUND_FREETYPE=yes
61738
61739  # First look for the canonical freetype main include file ft2build.h.
61740  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61741    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61742    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61743    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61744      # Fail.
61745      FOUND_FREETYPE=no
61746    fi
61747  fi
61748
61749  if test "x$FOUND_FREETYPE" = xyes; then
61750    # Include file found, let's continue the sanity check.
61751    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61752$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61753
61754    # Reset to default value
61755    FREETYPE_BASE_NAME=freetype
61756    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61757    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61758      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61759          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61760        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61761        # for the .6 version explicitly.
61762        FREETYPE_BASE_NAME=freetype.6
61763        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61764        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61765$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61766      else
61767        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61768$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61769        FOUND_FREETYPE=no
61770      fi
61771    else
61772      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61773        # On Windows, we will need both .lib and .dll file.
61774        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61775          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61776$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61777          FOUND_FREETYPE=no
61778        fi
61779      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61780          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61781        # Found lib in isa dir, use that instead.
61782        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61783        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61784$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61785      fi
61786    fi
61787  fi
61788
61789  if test "x$FOUND_FREETYPE" = xyes; then
61790
61791  # Only process if variable expands to non-empty
61792
61793  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61794    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61795
61796  # Input might be given as Windows format, start by converting to
61797  # unix format.
61798  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61799  new_path=`$CYGPATH -u "$path"`
61800
61801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61804  # "foo.exe" is OK but "foo" is an error.
61805  #
61806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61807  # It is also a way to make sure we got the proper file name for the real test later on.
61808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61809  if test "x$test_shortpath" = x; then
61810    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61811$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61812    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61813  fi
61814
61815  # Call helper function which possibly converts this using DOS-style short mode.
61816  # If so, the updated path is stored in $new_path.
61817
61818  input_path="$new_path"
61819  # Check if we need to convert this using DOS-style short mode. If the path
61820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61821  # take no chances and rewrite it.
61822  # Note: m4 eats our [], so we need to use [ and ] instead.
61823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61824  if test "x$has_forbidden_chars" != x; then
61825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61829      # Going to short mode and back again did indeed matter. Since short mode is
61830      # case insensitive, let's make it lowercase to improve readability.
61831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61832      # Now convert it back to Unix-style (cygpath)
61833      input_path=`$CYGPATH -u "$shortmode_path"`
61834      new_path="$input_path"
61835    fi
61836  fi
61837
61838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61839  if test "x$test_cygdrive_prefix" = x; then
61840    # As a simple fix, exclude /usr/bin since it's not a real path.
61841    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61843      # a path prefixed by /cygdrive for fixpath to work.
61844      new_path="$CYGWIN_ROOT_PATH$input_path"
61845    fi
61846  fi
61847
61848
61849  if test "x$path" != "x$new_path"; then
61850    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61852$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61853  fi
61854
61855    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61856
61857  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61858  has_colon=`$ECHO $path | $GREP ^.:`
61859  new_path="$path"
61860  if test "x$has_colon" = x; then
61861    # Not in mixed or Windows style, start by that.
61862    new_path=`cmd //c echo $path`
61863  fi
61864
61865
61866  input_path="$new_path"
61867  # Check if we need to convert this using DOS-style short mode. If the path
61868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61869  # take no chances and rewrite it.
61870  # Note: m4 eats our [], so we need to use [ and ] instead.
61871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61872  if test "x$has_forbidden_chars" != x; then
61873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61875  fi
61876
61877
61878  windows_path="$new_path"
61879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61880    unix_path=`$CYGPATH -u "$windows_path"`
61881    new_path="$unix_path"
61882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61884    new_path="$unix_path"
61885  fi
61886
61887  if test "x$path" != "x$new_path"; then
61888    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61890$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61891  fi
61892
61893  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61894  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61895
61896    else
61897      # We're on a unix platform. Hooray! :)
61898      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61899      has_space=`$ECHO "$path" | $GREP " "`
61900      if test "x$has_space" != x; then
61901        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61902$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61903        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61904      fi
61905
61906      # Use eval to expand a potential ~
61907      eval path="$path"
61908      if test ! -f "$path" && test ! -d "$path"; then
61909        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61910      fi
61911
61912      if test -d "$path"; then
61913        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61914      else
61915        dir="`$DIRNAME "$path"`"
61916        base="`$BASENAME "$path"`"
61917        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61918      fi
61919    fi
61920  fi
61921
61922
61923  # Only process if variable expands to non-empty
61924
61925  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61926    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61927
61928  # Input might be given as Windows format, start by converting to
61929  # unix format.
61930  path="$POTENTIAL_FREETYPE_LIB_PATH"
61931  new_path=`$CYGPATH -u "$path"`
61932
61933  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61934  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61935  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61936  # "foo.exe" is OK but "foo" is an error.
61937  #
61938  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61939  # It is also a way to make sure we got the proper file name for the real test later on.
61940  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61941  if test "x$test_shortpath" = x; then
61942    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61943$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61944    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61945  fi
61946
61947  # Call helper function which possibly converts this using DOS-style short mode.
61948  # If so, the updated path is stored in $new_path.
61949
61950  input_path="$new_path"
61951  # Check if we need to convert this using DOS-style short mode. If the path
61952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61953  # take no chances and rewrite it.
61954  # Note: m4 eats our [], so we need to use [ and ] instead.
61955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61956  if test "x$has_forbidden_chars" != x; then
61957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61958    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61959    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61960    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61961      # Going to short mode and back again did indeed matter. Since short mode is
61962      # case insensitive, let's make it lowercase to improve readability.
61963      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61964      # Now convert it back to Unix-style (cygpath)
61965      input_path=`$CYGPATH -u "$shortmode_path"`
61966      new_path="$input_path"
61967    fi
61968  fi
61969
61970  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61971  if test "x$test_cygdrive_prefix" = x; then
61972    # As a simple fix, exclude /usr/bin since it's not a real path.
61973    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61974      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61975      # a path prefixed by /cygdrive for fixpath to work.
61976      new_path="$CYGWIN_ROOT_PATH$input_path"
61977    fi
61978  fi
61979
61980
61981  if test "x$path" != "x$new_path"; then
61982    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61984$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61985  fi
61986
61987    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61988
61989  path="$POTENTIAL_FREETYPE_LIB_PATH"
61990  has_colon=`$ECHO $path | $GREP ^.:`
61991  new_path="$path"
61992  if test "x$has_colon" = x; then
61993    # Not in mixed or Windows style, start by that.
61994    new_path=`cmd //c echo $path`
61995  fi
61996
61997
61998  input_path="$new_path"
61999  # Check if we need to convert this using DOS-style short mode. If the path
62000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62001  # take no chances and rewrite it.
62002  # Note: m4 eats our [], so we need to use [ and ] instead.
62003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62004  if test "x$has_forbidden_chars" != x; then
62005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62007  fi
62008
62009
62010  windows_path="$new_path"
62011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62012    unix_path=`$CYGPATH -u "$windows_path"`
62013    new_path="$unix_path"
62014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62016    new_path="$unix_path"
62017  fi
62018
62019  if test "x$path" != "x$new_path"; then
62020    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62022$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62023  fi
62024
62025  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62026  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62027
62028    else
62029      # We're on a unix platform. Hooray! :)
62030      path="$POTENTIAL_FREETYPE_LIB_PATH"
62031      has_space=`$ECHO "$path" | $GREP " "`
62032      if test "x$has_space" != x; then
62033        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62034$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62035        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62036      fi
62037
62038      # Use eval to expand a potential ~
62039      eval path="$path"
62040      if test ! -f "$path" && test ! -d "$path"; then
62041        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62042      fi
62043
62044      if test -d "$path"; then
62045        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62046      else
62047        dir="`$DIRNAME "$path"`"
62048        base="`$BASENAME "$path"`"
62049        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62050      fi
62051    fi
62052  fi
62053
62054
62055    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62056    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62057$as_echo_n "checking for freetype includes... " >&6; }
62058    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62059$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62060    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62061    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62062$as_echo_n "checking for freetype libraries... " >&6; }
62063    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62064$as_echo "$FREETYPE_LIB_PATH" >&6; }
62065  fi
62066
62067              fi
62068            fi
62069          fi
62070        fi
62071      fi # end check in well-known locations
62072
62073      if test "x$FOUND_FREETYPE" != xyes; then
62074
62075  # Print a helpful message on how to acquire the necessary build dependency.
62076  # freetype is the help tag: freetype, cups, alsa etc
62077  MISSING_DEPENDENCY=freetype
62078
62079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62080    cygwin_help $MISSING_DEPENDENCY
62081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62082    msys_help $MISSING_DEPENDENCY
62083  else
62084    PKGHANDLER_COMMAND=
62085
62086    case $PKGHANDLER in
62087      apt-get)
62088        apt_help     $MISSING_DEPENDENCY ;;
62089      yum)
62090        yum_help     $MISSING_DEPENDENCY ;;
62091      port)
62092        port_help    $MISSING_DEPENDENCY ;;
62093      pkgutil)
62094        pkgutil_help $MISSING_DEPENDENCY ;;
62095      pkgadd)
62096        pkgadd_help  $MISSING_DEPENDENCY ;;
62097    esac
62098
62099    if test "x$PKGHANDLER_COMMAND" != x; then
62100      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62101    fi
62102  fi
62103
62104        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62105      fi
62106    fi # end user specified settings
62107
62108    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62109    if test "x$FREETYPE_CFLAGS" = x; then
62110
62111  # Only process if variable expands to non-empty
62112
62113  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62114    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62115
62116  # Input might be given as Windows format, start by converting to
62117  # unix format.
62118  path="$FREETYPE_INCLUDE_PATH"
62119  new_path=`$CYGPATH -u "$path"`
62120
62121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62124  # "foo.exe" is OK but "foo" is an error.
62125  #
62126  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62127  # It is also a way to make sure we got the proper file name for the real test later on.
62128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62129  if test "x$test_shortpath" = x; then
62130    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62131$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62132    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62133  fi
62134
62135  # Call helper function which possibly converts this using DOS-style short mode.
62136  # If so, the updated path is stored in $new_path.
62137
62138  input_path="$new_path"
62139  # Check if we need to convert this using DOS-style short mode. If the path
62140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62141  # take no chances and rewrite it.
62142  # Note: m4 eats our [], so we need to use [ and ] instead.
62143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62144  if test "x$has_forbidden_chars" != x; then
62145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62146    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62147    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62148    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62149      # Going to short mode and back again did indeed matter. Since short mode is
62150      # case insensitive, let's make it lowercase to improve readability.
62151      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62152      # Now convert it back to Unix-style (cygpath)
62153      input_path=`$CYGPATH -u "$shortmode_path"`
62154      new_path="$input_path"
62155    fi
62156  fi
62157
62158  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62159  if test "x$test_cygdrive_prefix" = x; then
62160    # As a simple fix, exclude /usr/bin since it's not a real path.
62161    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62162      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62163      # a path prefixed by /cygdrive for fixpath to work.
62164      new_path="$CYGWIN_ROOT_PATH$input_path"
62165    fi
62166  fi
62167
62168
62169  if test "x$path" != "x$new_path"; then
62170    FREETYPE_INCLUDE_PATH="$new_path"
62171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62172$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62173  fi
62174
62175    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62176
62177  path="$FREETYPE_INCLUDE_PATH"
62178  has_colon=`$ECHO $path | $GREP ^.:`
62179  new_path="$path"
62180  if test "x$has_colon" = x; then
62181    # Not in mixed or Windows style, start by that.
62182    new_path=`cmd //c echo $path`
62183  fi
62184
62185
62186  input_path="$new_path"
62187  # Check if we need to convert this using DOS-style short mode. If the path
62188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62189  # take no chances and rewrite it.
62190  # Note: m4 eats our [], so we need to use [ and ] instead.
62191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62192  if test "x$has_forbidden_chars" != x; then
62193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62195  fi
62196
62197
62198  windows_path="$new_path"
62199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62200    unix_path=`$CYGPATH -u "$windows_path"`
62201    new_path="$unix_path"
62202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62204    new_path="$unix_path"
62205  fi
62206
62207  if test "x$path" != "x$new_path"; then
62208    FREETYPE_INCLUDE_PATH="$new_path"
62209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62210$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62211  fi
62212
62213  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62214  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62215
62216    else
62217      # We're on a unix platform. Hooray! :)
62218      path="$FREETYPE_INCLUDE_PATH"
62219      has_space=`$ECHO "$path" | $GREP " "`
62220      if test "x$has_space" != x; then
62221        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62222$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62223        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62224      fi
62225
62226      # Use eval to expand a potential ~
62227      eval path="$path"
62228      if test ! -f "$path" && test ! -d "$path"; then
62229        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62230      fi
62231
62232      if test -d "$path"; then
62233        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62234      else
62235        dir="`$DIRNAME "$path"`"
62236        base="`$BASENAME "$path"`"
62237        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62238      fi
62239    fi
62240  fi
62241
62242      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62243        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62244      else
62245        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62246      fi
62247    fi
62248
62249    if test "x$FREETYPE_LIBS" = x; then
62250
62251  # Only process if variable expands to non-empty
62252
62253  if test "x$FREETYPE_LIB_PATH" != x; then
62254    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62255
62256  # Input might be given as Windows format, start by converting to
62257  # unix format.
62258  path="$FREETYPE_LIB_PATH"
62259  new_path=`$CYGPATH -u "$path"`
62260
62261  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62262  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62263  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62264  # "foo.exe" is OK but "foo" is an error.
62265  #
62266  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62267  # It is also a way to make sure we got the proper file name for the real test later on.
62268  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62269  if test "x$test_shortpath" = x; then
62270    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62271$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62272    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62273  fi
62274
62275  # Call helper function which possibly converts this using DOS-style short mode.
62276  # If so, the updated path is stored in $new_path.
62277
62278  input_path="$new_path"
62279  # Check if we need to convert this using DOS-style short mode. If the path
62280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62281  # take no chances and rewrite it.
62282  # Note: m4 eats our [], so we need to use [ and ] instead.
62283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62284  if test "x$has_forbidden_chars" != x; then
62285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62286    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62287    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62288    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62289      # Going to short mode and back again did indeed matter. Since short mode is
62290      # case insensitive, let's make it lowercase to improve readability.
62291      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62292      # Now convert it back to Unix-style (cygpath)
62293      input_path=`$CYGPATH -u "$shortmode_path"`
62294      new_path="$input_path"
62295    fi
62296  fi
62297
62298  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62299  if test "x$test_cygdrive_prefix" = x; then
62300    # As a simple fix, exclude /usr/bin since it's not a real path.
62301    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62302      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62303      # a path prefixed by /cygdrive for fixpath to work.
62304      new_path="$CYGWIN_ROOT_PATH$input_path"
62305    fi
62306  fi
62307
62308
62309  if test "x$path" != "x$new_path"; then
62310    FREETYPE_LIB_PATH="$new_path"
62311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62312$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62313  fi
62314
62315    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62316
62317  path="$FREETYPE_LIB_PATH"
62318  has_colon=`$ECHO $path | $GREP ^.:`
62319  new_path="$path"
62320  if test "x$has_colon" = x; then
62321    # Not in mixed or Windows style, start by that.
62322    new_path=`cmd //c echo $path`
62323  fi
62324
62325
62326  input_path="$new_path"
62327  # Check if we need to convert this using DOS-style short mode. If the path
62328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62329  # take no chances and rewrite it.
62330  # Note: m4 eats our [], so we need to use [ and ] instead.
62331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62332  if test "x$has_forbidden_chars" != x; then
62333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62334    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62335  fi
62336
62337
62338  windows_path="$new_path"
62339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62340    unix_path=`$CYGPATH -u "$windows_path"`
62341    new_path="$unix_path"
62342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62344    new_path="$unix_path"
62345  fi
62346
62347  if test "x$path" != "x$new_path"; then
62348    FREETYPE_LIB_PATH="$new_path"
62349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62350$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62351  fi
62352
62353  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62354  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62355
62356    else
62357      # We're on a unix platform. Hooray! :)
62358      path="$FREETYPE_LIB_PATH"
62359      has_space=`$ECHO "$path" | $GREP " "`
62360      if test "x$has_space" != x; then
62361        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62362$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62363        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62364      fi
62365
62366      # Use eval to expand a potential ~
62367      eval path="$path"
62368      if test ! -f "$path" && test ! -d "$path"; then
62369        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62370      fi
62371
62372      if test -d "$path"; then
62373        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62374      else
62375        dir="`$DIRNAME "$path"`"
62376        base="`$BASENAME "$path"`"
62377        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62378      fi
62379    fi
62380  fi
62381
62382      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62383        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62384      else
62385        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62386      fi
62387    fi
62388
62389    # Try to compile it
62390    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62391$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62392    ac_ext=cpp
62393ac_cpp='$CXXCPP $CPPFLAGS'
62394ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62395ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62396ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62397
62398    PREV_CXXCFLAGS="$CXXFLAGS"
62399    PREV_LIBS="$LIBS"
62400    PREV_CXX="$CXX"
62401    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62402    LIBS="$LIBS $FREETYPE_LIBS"
62403    CXX="$FIXPATH $CXX"
62404    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62405/* end confdefs.h.  */
62406
62407          #include<ft2build.h>
62408          #include FT_FREETYPE_H
62409          int main () {
62410            FT_Init_FreeType(NULL);
62411            return 0;
62412          }
62413
62414_ACEOF
62415if ac_fn_cxx_try_link "$LINENO"; then :
62416
62417          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62418$as_echo "yes" >&6; }
62419
62420else
62421
62422          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62423$as_echo "no" >&6; }
62424          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62425$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62426          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62427$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62428
62429
62430  # Print a helpful message on how to acquire the necessary build dependency.
62431  # freetype is the help tag: freetype, cups, alsa etc
62432  MISSING_DEPENDENCY=freetype
62433
62434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62435    cygwin_help $MISSING_DEPENDENCY
62436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62437    msys_help $MISSING_DEPENDENCY
62438  else
62439    PKGHANDLER_COMMAND=
62440
62441    case $PKGHANDLER in
62442      apt-get)
62443        apt_help     $MISSING_DEPENDENCY ;;
62444      yum)
62445        yum_help     $MISSING_DEPENDENCY ;;
62446      port)
62447        port_help    $MISSING_DEPENDENCY ;;
62448      pkgutil)
62449        pkgutil_help $MISSING_DEPENDENCY ;;
62450      pkgadd)
62451        pkgadd_help  $MISSING_DEPENDENCY ;;
62452    esac
62453
62454    if test "x$PKGHANDLER_COMMAND" != x; then
62455      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62456    fi
62457  fi
62458
62459
62460          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62461
62462
62463fi
62464rm -f core conftest.err conftest.$ac_objext \
62465    conftest$ac_exeext conftest.$ac_ext
62466    CXXCFLAGS="$PREV_CXXFLAGS"
62467    LIBS="$PREV_LIBS"
62468    CXX="$PREV_CXX"
62469    ac_ext=cpp
62470ac_cpp='$CXXCPP $CPPFLAGS'
62471ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62472ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62473ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62474
62475
62476    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62477$as_echo_n "checking if we should bundle freetype... " >&6; }
62478    if test "x$BUNDLE_FREETYPE" = xyes; then
62479      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62480    fi
62481    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62482$as_echo "$BUNDLE_FREETYPE" >&6; }
62483
62484  fi # end freetype needed
62485
62486
62487
62488
62489
62490
62491
62492# Check whether --with-alsa was given.
62493if test "${with_alsa+set}" = set; then :
62494  withval=$with_alsa;
62495fi
62496
62497
62498# Check whether --with-alsa-include was given.
62499if test "${with_alsa_include+set}" = set; then :
62500  withval=$with_alsa_include;
62501fi
62502
62503
62504# Check whether --with-alsa-lib was given.
62505if test "${with_alsa_lib+set}" = set; then :
62506  withval=$with_alsa_lib;
62507fi
62508
62509
62510  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62511    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62512        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62513        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62514      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62515$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62516    fi
62517    ALSA_CFLAGS=
62518    ALSA_LIBS=
62519  else
62520    ALSA_FOUND=no
62521
62522    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62523      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62524    fi
62525
62526    if test "x${with_alsa}" != x; then
62527      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62528      ALSA_CFLAGS="-I${with_alsa}/include"
62529      ALSA_FOUND=yes
62530    fi
62531    if test "x${with_alsa_include}" != x; then
62532      ALSA_CFLAGS="-I${with_alsa_include}"
62533      ALSA_FOUND=yes
62534    fi
62535    if test "x${with_alsa_lib}" != x; then
62536      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62537      ALSA_FOUND=yes
62538    fi
62539    # Do not try pkg-config if we have a sysroot set.
62540    if test "x$SYSROOT" = x; then
62541      if test "x$ALSA_FOUND" = xno; then
62542
62543pkg_failed=no
62544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62545$as_echo_n "checking for ALSA... " >&6; }
62546
62547if test -n "$ALSA_CFLAGS"; then
62548    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62549 elif test -n "$PKG_CONFIG"; then
62550    if test -n "$PKG_CONFIG" && \
62551    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62552  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62553  ac_status=$?
62554  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62555  test $ac_status = 0; }; then
62556  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62557else
62558  pkg_failed=yes
62559fi
62560 else
62561    pkg_failed=untried
62562fi
62563if test -n "$ALSA_LIBS"; then
62564    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62565 elif test -n "$PKG_CONFIG"; then
62566    if test -n "$PKG_CONFIG" && \
62567    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62568  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62569  ac_status=$?
62570  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62571  test $ac_status = 0; }; then
62572  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62573else
62574  pkg_failed=yes
62575fi
62576 else
62577    pkg_failed=untried
62578fi
62579
62580
62581
62582if test $pkg_failed = yes; then
62583
62584if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62585        _pkg_short_errors_supported=yes
62586else
62587        _pkg_short_errors_supported=no
62588fi
62589        if test $_pkg_short_errors_supported = yes; then
62590	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62591        else
62592	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62593        fi
62594	# Put the nasty error message in config.log where it belongs
62595	echo "$ALSA_PKG_ERRORS" >&5
62596
62597	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62598$as_echo "no" >&6; }
62599                ALSA_FOUND=no
62600elif test $pkg_failed = untried; then
62601	ALSA_FOUND=no
62602else
62603	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62604	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62605        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62606$as_echo "yes" >&6; }
62607	ALSA_FOUND=yes
62608fi
62609      fi
62610    fi
62611    if test "x$ALSA_FOUND" = xno; then
62612      for ac_header in alsa/asoundlib.h
62613do :
62614  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62615if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62616  cat >>confdefs.h <<_ACEOF
62617#define HAVE_ALSA_ASOUNDLIB_H 1
62618_ACEOF
62619
62620            ALSA_FOUND=yes
62621            ALSA_CFLAGS=-Iignoreme
62622            ALSA_LIBS=-lasound
62623            DEFAULT_ALSA=yes
62624
62625else
62626  ALSA_FOUND=no
62627
62628fi
62629
62630done
62631
62632    fi
62633    if test "x$ALSA_FOUND" = xno; then
62634
62635  # Print a helpful message on how to acquire the necessary build dependency.
62636  # alsa is the help tag: freetype, cups, alsa etc
62637  MISSING_DEPENDENCY=alsa
62638
62639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62640    cygwin_help $MISSING_DEPENDENCY
62641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62642    msys_help $MISSING_DEPENDENCY
62643  else
62644    PKGHANDLER_COMMAND=
62645
62646    case $PKGHANDLER in
62647      apt-get)
62648        apt_help     $MISSING_DEPENDENCY ;;
62649      yum)
62650        yum_help     $MISSING_DEPENDENCY ;;
62651      port)
62652        port_help    $MISSING_DEPENDENCY ;;
62653      pkgutil)
62654        pkgutil_help $MISSING_DEPENDENCY ;;
62655      pkgadd)
62656        pkgadd_help  $MISSING_DEPENDENCY ;;
62657    esac
62658
62659    if test "x$PKGHANDLER_COMMAND" != x; then
62660      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62661    fi
62662  fi
62663
62664      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62665    fi
62666  fi
62667
62668
62669
62670
62671
62672
62673# Check whether --with-libffi was given.
62674if test "${with_libffi+set}" = set; then :
62675  withval=$with_libffi;
62676fi
62677
62678
62679# Check whether --with-libffi-include was given.
62680if test "${with_libffi_include+set}" = set; then :
62681  withval=$with_libffi_include;
62682fi
62683
62684
62685# Check whether --with-libffi-lib was given.
62686if test "${with_libffi_lib+set}" = set; then :
62687  withval=$with_libffi_lib;
62688fi
62689
62690
62691  if test "x$NEEDS_LIB_FFI" = xfalse; then
62692    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62693        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62694        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62695      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62696$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62697    fi
62698    LIBFFI_CFLAGS=
62699    LIBFFI_LIBS=
62700  else
62701    LIBFFI_FOUND=no
62702
62703    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62704      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62705    fi
62706
62707    if test "x${with_libffi}" != x; then
62708      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62709      LIBFFI_CFLAGS="-I${with_libffi}/include"
62710      LIBFFI_FOUND=yes
62711    fi
62712    if test "x${with_libffi_include}" != x; then
62713      LIBFFI_CFLAGS="-I${with_libffi_include}"
62714      LIBFFI_FOUND=yes
62715    fi
62716    if test "x${with_libffi_lib}" != x; then
62717      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62718      LIBFFI_FOUND=yes
62719    fi
62720    # Do not try pkg-config if we have a sysroot set.
62721    if test "x$SYSROOT" = x; then
62722      if test "x$LIBFFI_FOUND" = xno; then
62723        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62724
62725pkg_failed=no
62726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62727$as_echo_n "checking for LIBFFI... " >&6; }
62728
62729if test -n "$LIBFFI_CFLAGS"; then
62730    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62731 elif test -n "$PKG_CONFIG"; then
62732    if test -n "$PKG_CONFIG" && \
62733    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62734  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62735  ac_status=$?
62736  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62737  test $ac_status = 0; }; then
62738  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62739else
62740  pkg_failed=yes
62741fi
62742 else
62743    pkg_failed=untried
62744fi
62745if test -n "$LIBFFI_LIBS"; then
62746    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62747 elif test -n "$PKG_CONFIG"; then
62748    if test -n "$PKG_CONFIG" && \
62749    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62750  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62751  ac_status=$?
62752  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62753  test $ac_status = 0; }; then
62754  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62755else
62756  pkg_failed=yes
62757fi
62758 else
62759    pkg_failed=untried
62760fi
62761
62762
62763
62764if test $pkg_failed = yes; then
62765
62766if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62767        _pkg_short_errors_supported=yes
62768else
62769        _pkg_short_errors_supported=no
62770fi
62771        if test $_pkg_short_errors_supported = yes; then
62772	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62773        else
62774	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62775        fi
62776	# Put the nasty error message in config.log where it belongs
62777	echo "$LIBFFI_PKG_ERRORS" >&5
62778
62779	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62780$as_echo "no" >&6; }
62781                LIBFFI_FOUND=no
62782elif test $pkg_failed = untried; then
62783	LIBFFI_FOUND=no
62784else
62785	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62786	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62787        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62788$as_echo "yes" >&6; }
62789	LIBFFI_FOUND=yes
62790fi
62791      fi
62792    fi
62793    if test "x$LIBFFI_FOUND" = xno; then
62794      for ac_header in ffi.h
62795do :
62796  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62797if test "x$ac_cv_header_ffi_h" = xyes; then :
62798  cat >>confdefs.h <<_ACEOF
62799#define HAVE_FFI_H 1
62800_ACEOF
62801
62802            LIBFFI_FOUND=yes
62803            LIBFFI_CFLAGS=
62804            LIBFFI_LIBS=-lffi
62805
62806else
62807  LIBFFI_FOUND=no
62808
62809fi
62810
62811done
62812
62813    fi
62814    if test "x$LIBFFI_FOUND" = xno; then
62815
62816  # Print a helpful message on how to acquire the necessary build dependency.
62817  # ffi is the help tag: freetype, cups, alsa etc
62818  MISSING_DEPENDENCY=ffi
62819
62820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62821    cygwin_help $MISSING_DEPENDENCY
62822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62823    msys_help $MISSING_DEPENDENCY
62824  else
62825    PKGHANDLER_COMMAND=
62826
62827    case $PKGHANDLER in
62828      apt-get)
62829        apt_help     $MISSING_DEPENDENCY ;;
62830      yum)
62831        yum_help     $MISSING_DEPENDENCY ;;
62832      port)
62833        port_help    $MISSING_DEPENDENCY ;;
62834      pkgutil)
62835        pkgutil_help $MISSING_DEPENDENCY ;;
62836      pkgadd)
62837        pkgadd_help  $MISSING_DEPENDENCY ;;
62838    esac
62839
62840    if test "x$PKGHANDLER_COMMAND" != x; then
62841      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62842    fi
62843  fi
62844
62845      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62846    fi
62847
62848    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62849$as_echo_n "checking if libffi works... " >&6; }
62850    ac_ext=c
62851ac_cpp='$CPP $CPPFLAGS'
62852ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62853ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62854ac_compiler_gnu=$ac_cv_c_compiler_gnu
62855
62856    OLD_CFLAGS="$CFLAGS"
62857    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62858    OLD_LIBS="$LIBS"
62859    LIBS="$LIBS $LIBFFI_LIBS"
62860    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62861/* end confdefs.h.  */
62862#include <ffi.h>
62863int
62864main ()
62865{
62866
62867          ffi_call(NULL, NULL, NULL, NULL);
62868          return 0;
62869
62870  ;
62871  return 0;
62872}
62873_ACEOF
62874if ac_fn_c_try_link "$LINENO"; then :
62875  LIBFFI_WORKS=yes
62876else
62877  LIBFFI_WORKS=no
62878
62879fi
62880rm -f core conftest.err conftest.$ac_objext \
62881    conftest$ac_exeext conftest.$ac_ext
62882    CFLAGS="$OLD_CFLAGS"
62883    LIBS="$OLD_LIBS"
62884    ac_ext=cpp
62885ac_cpp='$CXXCPP $CPPFLAGS'
62886ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62887ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62888ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62889
62890    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62891$as_echo "$LIBFFI_WORKS" >&6; }
62892
62893    if test "x$LIBFFI_WORKS" = xno; then
62894
62895  # Print a helpful message on how to acquire the necessary build dependency.
62896  # ffi is the help tag: freetype, cups, alsa etc
62897  MISSING_DEPENDENCY=ffi
62898
62899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62900    cygwin_help $MISSING_DEPENDENCY
62901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62902    msys_help $MISSING_DEPENDENCY
62903  else
62904    PKGHANDLER_COMMAND=
62905
62906    case $PKGHANDLER in
62907      apt-get)
62908        apt_help     $MISSING_DEPENDENCY ;;
62909      yum)
62910        yum_help     $MISSING_DEPENDENCY ;;
62911      port)
62912        port_help    $MISSING_DEPENDENCY ;;
62913      pkgutil)
62914        pkgutil_help $MISSING_DEPENDENCY ;;
62915      pkgadd)
62916        pkgadd_help  $MISSING_DEPENDENCY ;;
62917    esac
62918
62919    if test "x$PKGHANDLER_COMMAND" != x; then
62920      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62921    fi
62922  fi
62923
62924      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62925    fi
62926  fi
62927
62928
62929
62930
62931
62932  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
62933    # Extract the first word of "llvm-config", so it can be a program name with args.
62934set dummy llvm-config; ac_word=$2
62935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62936$as_echo_n "checking for $ac_word... " >&6; }
62937if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
62938  $as_echo_n "(cached) " >&6
62939else
62940  if test -n "$LLVM_CONFIG"; then
62941  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
62942else
62943as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62944for as_dir in $PATH
62945do
62946  IFS=$as_save_IFS
62947  test -z "$as_dir" && as_dir=.
62948    for ac_exec_ext in '' $ac_executable_extensions; do
62949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62950    ac_cv_prog_LLVM_CONFIG="llvm-config"
62951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62952    break 2
62953  fi
62954done
62955  done
62956IFS=$as_save_IFS
62957
62958fi
62959fi
62960LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
62961if test -n "$LLVM_CONFIG"; then
62962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
62963$as_echo "$LLVM_CONFIG" >&6; }
62964else
62965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62966$as_echo "no" >&6; }
62967fi
62968
62969
62970
62971    if test "x$LLVM_CONFIG" != xllvm-config; then
62972      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
62973    fi
62974
62975    llvm_components="jit mcjit engine nativecodegen native"
62976    unset LLVM_CFLAGS
62977    for flag in $("$LLVM_CONFIG" --cxxflags); do
62978      if echo "${flag}" | grep -q '^-[ID]'; then
62979        if test "${flag}" != "-D_DEBUG" ; then
62980          if test "${LLVM_CFLAGS}" != "" ; then
62981            LLVM_CFLAGS="${LLVM_CFLAGS} "
62982          fi
62983          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
62984        fi
62985      fi
62986    done
62987    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
62988    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
62989
62990    unset LLVM_LDFLAGS
62991    for flag in $("${LLVM_CONFIG}" --ldflags); do
62992      if echo "${flag}" | grep -q '^-L'; then
62993        if test "${LLVM_LDFLAGS}" != ""; then
62994          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
62995        fi
62996        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
62997      fi
62998    done
62999
63000    unset LLVM_LIBS
63001    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63002      if echo "${flag}" | grep -q '^-l'; then
63003        if test "${LLVM_LIBS}" != ""; then
63004          LLVM_LIBS="${LLVM_LIBS} "
63005        fi
63006        LLVM_LIBS="${LLVM_LIBS}${flag}"
63007      fi
63008    done
63009
63010    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63011    # always properly detect -ltinfo
63012    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63013
63014
63015
63016
63017  fi
63018
63019
63020
63021# Check whether --with-libjpeg was given.
63022if test "${with_libjpeg+set}" = set; then :
63023  withval=$with_libjpeg;
63024fi
63025
63026
63027  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63028$as_echo_n "checking for which libjpeg to use... " >&6; }
63029  # default is bundled
63030  DEFAULT_LIBJPEG=bundled
63031  # if user didn't specify, use DEFAULT_LIBJPEG
63032  if test "x${with_libjpeg}" = "x"; then
63033    with_libjpeg=${DEFAULT_LIBJPEG}
63034  fi
63035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63036$as_echo "${with_libjpeg}" >&6; }
63037
63038  if test "x${with_libjpeg}" = "xbundled"; then
63039    USE_EXTERNAL_LIBJPEG=false
63040  elif test "x${with_libjpeg}" = "xsystem"; then
63041    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63042if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63043
63044else
63045   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63046fi
63047
63048
63049    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63050$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63051if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63052  $as_echo_n "(cached) " >&6
63053else
63054  ac_check_lib_save_LIBS=$LIBS
63055LIBS="-ljpeg  $LIBS"
63056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63057/* end confdefs.h.  */
63058
63059/* Override any GCC internal prototype to avoid an error.
63060   Use char because int might match the return type of a GCC
63061   builtin and then its argument prototype would still apply.  */
63062#ifdef __cplusplus
63063extern "C"
63064#endif
63065char jpeg_CreateDecompress ();
63066int
63067main ()
63068{
63069return jpeg_CreateDecompress ();
63070  ;
63071  return 0;
63072}
63073_ACEOF
63074if ac_fn_cxx_try_link "$LINENO"; then :
63075  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63076else
63077  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63078fi
63079rm -f core conftest.err conftest.$ac_objext \
63080    conftest$ac_exeext conftest.$ac_ext
63081LIBS=$ac_check_lib_save_LIBS
63082fi
63083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63084$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63085if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63086  cat >>confdefs.h <<_ACEOF
63087#define HAVE_LIBJPEG 1
63088_ACEOF
63089
63090  LIBS="-ljpeg $LIBS"
63091
63092else
63093   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63094fi
63095
63096
63097    USE_EXTERNAL_LIBJPEG=true
63098  else
63099    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63100  fi
63101
63102
63103
63104
63105
63106# Check whether --with-giflib was given.
63107if test "${with_giflib+set}" = set; then :
63108  withval=$with_giflib;
63109fi
63110
63111
63112  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63113$as_echo_n "checking for which giflib to use... " >&6; }
63114  # default is bundled
63115  DEFAULT_GIFLIB=bundled
63116  # if user didn't specify, use DEFAULT_GIFLIB
63117  if test "x${with_giflib}" = "x"; then
63118    with_giflib=${DEFAULT_GIFLIB}
63119  fi
63120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63121$as_echo "${with_giflib}" >&6; }
63122
63123  if test "x${with_giflib}" = "xbundled"; then
63124    USE_EXTERNAL_LIBGIF=false
63125  elif test "x${with_giflib}" = "xsystem"; then
63126    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63127if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63128
63129else
63130   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63131fi
63132
63133
63134    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63135$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63136if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63137  $as_echo_n "(cached) " >&6
63138else
63139  ac_check_lib_save_LIBS=$LIBS
63140LIBS="-lgif  $LIBS"
63141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63142/* end confdefs.h.  */
63143
63144/* Override any GCC internal prototype to avoid an error.
63145   Use char because int might match the return type of a GCC
63146   builtin and then its argument prototype would still apply.  */
63147#ifdef __cplusplus
63148extern "C"
63149#endif
63150char DGifGetCode ();
63151int
63152main ()
63153{
63154return DGifGetCode ();
63155  ;
63156  return 0;
63157}
63158_ACEOF
63159if ac_fn_cxx_try_link "$LINENO"; then :
63160  ac_cv_lib_gif_DGifGetCode=yes
63161else
63162  ac_cv_lib_gif_DGifGetCode=no
63163fi
63164rm -f core conftest.err conftest.$ac_objext \
63165    conftest$ac_exeext conftest.$ac_ext
63166LIBS=$ac_check_lib_save_LIBS
63167fi
63168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63169$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63170if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63171  cat >>confdefs.h <<_ACEOF
63172#define HAVE_LIBGIF 1
63173_ACEOF
63174
63175  LIBS="-lgif $LIBS"
63176
63177else
63178   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63179fi
63180
63181
63182    USE_EXTERNAL_LIBGIF=true
63183  else
63184    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63185  fi
63186
63187
63188
63189
63190
63191# Check whether --with-libpng was given.
63192if test "${with_libpng+set}" = set; then :
63193  withval=$with_libpng;
63194fi
63195
63196
63197  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63198$as_echo_n "checking for which libpng to use... " >&6; }
63199
63200  # default is bundled
63201  DEFAULT_LIBPNG=bundled
63202  # if user didn't specify, use DEFAULT_LIBPNG
63203  if test "x${with_libpng}" = "x"; then
63204      with_libpng=${DEFAULT_LIBPNG}
63205  fi
63206
63207  if test "x${with_libpng}" = "xbundled"; then
63208      USE_EXTERNAL_LIBPNG=false
63209      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63210$as_echo "bundled" >&6; }
63211  elif test "x${with_libpng}" = "xsystem"; then
63212
63213pkg_failed=no
63214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63215$as_echo_n "checking for PNG... " >&6; }
63216
63217if test -n "$PNG_CFLAGS"; then
63218    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63219 elif test -n "$PKG_CONFIG"; then
63220    if test -n "$PKG_CONFIG" && \
63221    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63222  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63223  ac_status=$?
63224  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63225  test $ac_status = 0; }; then
63226  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63227else
63228  pkg_failed=yes
63229fi
63230 else
63231    pkg_failed=untried
63232fi
63233if test -n "$PNG_LIBS"; then
63234    pkg_cv_PNG_LIBS="$PNG_LIBS"
63235 elif test -n "$PKG_CONFIG"; then
63236    if test -n "$PKG_CONFIG" && \
63237    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63238  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63239  ac_status=$?
63240  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63241  test $ac_status = 0; }; then
63242  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63243else
63244  pkg_failed=yes
63245fi
63246 else
63247    pkg_failed=untried
63248fi
63249
63250
63251
63252if test $pkg_failed = yes; then
63253
63254if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63255        _pkg_short_errors_supported=yes
63256else
63257        _pkg_short_errors_supported=no
63258fi
63259        if test $_pkg_short_errors_supported = yes; then
63260	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63261        else
63262	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63263        fi
63264	# Put the nasty error message in config.log where it belongs
63265	echo "$PNG_PKG_ERRORS" >&5
63266
63267	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63268$as_echo "no" >&6; }
63269                 LIBPNG_FOUND=no
63270elif test $pkg_failed = untried; then
63271	 LIBPNG_FOUND=no
63272else
63273	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63274	PNG_LIBS=$pkg_cv_PNG_LIBS
63275        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63276$as_echo "yes" >&6; }
63277	 LIBPNG_FOUND=yes
63278fi
63279      if test "x${LIBPNG_FOUND}" = "xyes"; then
63280          USE_EXTERNAL_LIBPNG=true
63281          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63282$as_echo "system" >&6; }
63283      else
63284          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63285$as_echo "system not found" >&6; }
63286          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63287      fi
63288  else
63289      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63290  fi
63291
63292
63293
63294
63295
63296# Check whether --with-zlib was given.
63297if test "${with_zlib+set}" = set; then :
63298  withval=$with_zlib;
63299fi
63300
63301
63302  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63303$as_echo_n "checking for compress in -lz... " >&6; }
63304if ${ac_cv_lib_z_compress+:} false; then :
63305  $as_echo_n "(cached) " >&6
63306else
63307  ac_check_lib_save_LIBS=$LIBS
63308LIBS="-lz  $LIBS"
63309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63310/* end confdefs.h.  */
63311
63312/* Override any GCC internal prototype to avoid an error.
63313   Use char because int might match the return type of a GCC
63314   builtin and then its argument prototype would still apply.  */
63315#ifdef __cplusplus
63316extern "C"
63317#endif
63318char compress ();
63319int
63320main ()
63321{
63322return compress ();
63323  ;
63324  return 0;
63325}
63326_ACEOF
63327if ac_fn_cxx_try_link "$LINENO"; then :
63328  ac_cv_lib_z_compress=yes
63329else
63330  ac_cv_lib_z_compress=no
63331fi
63332rm -f core conftest.err conftest.$ac_objext \
63333    conftest$ac_exeext conftest.$ac_ext
63334LIBS=$ac_check_lib_save_LIBS
63335fi
63336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63337$as_echo "$ac_cv_lib_z_compress" >&6; }
63338if test "x$ac_cv_lib_z_compress" = xyes; then :
63339   ZLIB_FOUND=yes
63340else
63341   ZLIB_FOUND=no
63342fi
63343
63344
63345  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63346$as_echo_n "checking for which zlib to use... " >&6; }
63347
63348  DEFAULT_ZLIB=system
63349  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63350    # On windows default is bundled...on others default is system
63351    DEFAULT_ZLIB=bundled
63352  fi
63353
63354  if test "x${ZLIB_FOUND}" != "xyes"; then
63355    # If we don't find any system...set default to bundled
63356    DEFAULT_ZLIB=bundled
63357  fi
63358
63359  # If user didn't specify, use DEFAULT_ZLIB
63360  if test "x${with_zlib}" = "x"; then
63361    with_zlib=${DEFAULT_ZLIB}
63362  fi
63363
63364  if test "x${with_zlib}" = "xbundled"; then
63365    USE_EXTERNAL_LIBZ=false
63366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63367$as_echo "bundled" >&6; }
63368  elif test "x${with_zlib}" = "xsystem"; then
63369    if test "x${ZLIB_FOUND}" = "xyes"; then
63370      USE_EXTERNAL_LIBZ=true
63371      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63372$as_echo "system" >&6; }
63373    else
63374      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63375$as_echo "system not found" >&6; }
63376      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63377    fi
63378  else
63379    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63380  fi
63381
63382
63383
63384
63385
63386# Check whether --with-lcms was given.
63387if test "${with_lcms+set}" = set; then :
63388  withval=$with_lcms;
63389fi
63390
63391
63392  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63393$as_echo_n "checking for which lcms to use... " >&6; }
63394
63395  DEFAULT_LCMS=bundled
63396  # If user didn't specify, use DEFAULT_LCMS
63397  if test "x${with_lcms}" = "x"; then
63398      with_lcms=${DEFAULT_LCMS}
63399  fi
63400
63401  if test "x${with_lcms}" = "xbundled"; then
63402    USE_EXTERNAL_LCMS=false
63403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63404$as_echo "bundled" >&6; }
63405  elif test "x${with_lcms}" = "xsystem"; then
63406    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63407$as_echo "system" >&6; }
63408
63409pkg_failed=no
63410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63411$as_echo_n "checking for LCMS... " >&6; }
63412
63413if test -n "$LCMS_CFLAGS"; then
63414    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63415 elif test -n "$PKG_CONFIG"; then
63416    if test -n "$PKG_CONFIG" && \
63417    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63418  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63419  ac_status=$?
63420  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63421  test $ac_status = 0; }; then
63422  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63423else
63424  pkg_failed=yes
63425fi
63426 else
63427    pkg_failed=untried
63428fi
63429if test -n "$LCMS_LIBS"; then
63430    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63431 elif test -n "$PKG_CONFIG"; then
63432    if test -n "$PKG_CONFIG" && \
63433    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63434  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63435  ac_status=$?
63436  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63437  test $ac_status = 0; }; then
63438  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63439else
63440  pkg_failed=yes
63441fi
63442 else
63443    pkg_failed=untried
63444fi
63445
63446
63447
63448if test $pkg_failed = yes; then
63449
63450if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63451        _pkg_short_errors_supported=yes
63452else
63453        _pkg_short_errors_supported=no
63454fi
63455        if test $_pkg_short_errors_supported = yes; then
63456	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63457        else
63458	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63459        fi
63460	# Put the nasty error message in config.log where it belongs
63461	echo "$LCMS_PKG_ERRORS" >&5
63462
63463	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63464$as_echo "no" >&6; }
63465                LCMS_FOUND=no
63466elif test $pkg_failed = untried; then
63467	LCMS_FOUND=no
63468else
63469	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63470	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63471        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63472$as_echo "yes" >&6; }
63473	LCMS_FOUND=yes
63474fi
63475    if test "x${LCMS_FOUND}" = "xyes"; then
63476      USE_EXTERNAL_LCMS=true
63477    else
63478      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63479    fi
63480  else
63481    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63482  fi
63483
63484
63485
63486
63487
63488
63489
63490
63491
63492
63493
63494  # Setup libm (the maths library)
63495  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63497$as_echo_n "checking for cos in -lm... " >&6; }
63498if ${ac_cv_lib_m_cos+:} false; then :
63499  $as_echo_n "(cached) " >&6
63500else
63501  ac_check_lib_save_LIBS=$LIBS
63502LIBS="-lm  $LIBS"
63503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63504/* end confdefs.h.  */
63505
63506/* Override any GCC internal prototype to avoid an error.
63507   Use char because int might match the return type of a GCC
63508   builtin and then its argument prototype would still apply.  */
63509#ifdef __cplusplus
63510extern "C"
63511#endif
63512char cos ();
63513int
63514main ()
63515{
63516return cos ();
63517  ;
63518  return 0;
63519}
63520_ACEOF
63521if ac_fn_cxx_try_link "$LINENO"; then :
63522  ac_cv_lib_m_cos=yes
63523else
63524  ac_cv_lib_m_cos=no
63525fi
63526rm -f core conftest.err conftest.$ac_objext \
63527    conftest$ac_exeext conftest.$ac_ext
63528LIBS=$ac_check_lib_save_LIBS
63529fi
63530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63531$as_echo "$ac_cv_lib_m_cos" >&6; }
63532if test "x$ac_cv_lib_m_cos" = xyes; then :
63533  cat >>confdefs.h <<_ACEOF
63534#define HAVE_LIBM 1
63535_ACEOF
63536
63537  LIBS="-lm $LIBS"
63538
63539else
63540
63541        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63542$as_echo "$as_me: Maths library was not found" >&6;}
63543
63544fi
63545
63546    LIBM="-lm"
63547  else
63548    LIBM=""
63549  fi
63550
63551
63552  # Setup libdl (for dynamic library loading)
63553  save_LIBS="$LIBS"
63554  LIBS=""
63555  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63556$as_echo_n "checking for dlopen in -ldl... " >&6; }
63557if ${ac_cv_lib_dl_dlopen+:} false; then :
63558  $as_echo_n "(cached) " >&6
63559else
63560  ac_check_lib_save_LIBS=$LIBS
63561LIBS="-ldl  $LIBS"
63562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63563/* end confdefs.h.  */
63564
63565/* Override any GCC internal prototype to avoid an error.
63566   Use char because int might match the return type of a GCC
63567   builtin and then its argument prototype would still apply.  */
63568#ifdef __cplusplus
63569extern "C"
63570#endif
63571char dlopen ();
63572int
63573main ()
63574{
63575return dlopen ();
63576  ;
63577  return 0;
63578}
63579_ACEOF
63580if ac_fn_cxx_try_link "$LINENO"; then :
63581  ac_cv_lib_dl_dlopen=yes
63582else
63583  ac_cv_lib_dl_dlopen=no
63584fi
63585rm -f core conftest.err conftest.$ac_objext \
63586    conftest$ac_exeext conftest.$ac_ext
63587LIBS=$ac_check_lib_save_LIBS
63588fi
63589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63590$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63591if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63592  cat >>confdefs.h <<_ACEOF
63593#define HAVE_LIBDL 1
63594_ACEOF
63595
63596  LIBS="-ldl $LIBS"
63597
63598fi
63599
63600  LIBDL="$LIBS"
63601
63602  LIBS="$save_LIBS"
63603
63604  # Deprecated libraries, keep the flags for backwards compatibility
63605  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63606
63607
63608# Check whether --with-dxsdk was given.
63609if test "${with_dxsdk+set}" = set; then :
63610  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63611$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63612fi
63613
63614
63615
63616
63617# Check whether --with-dxsdk-lib was given.
63618if test "${with_dxsdk_lib+set}" = set; then :
63619  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63620$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63621fi
63622
63623
63624
63625
63626# Check whether --with-dxsdk-include was given.
63627if test "${with_dxsdk_include+set}" = set; then :
63628  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63629$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63630fi
63631
63632
63633  fi
63634
63635  # Control if libzip can use mmap. Available for purposes of overriding.
63636  LIBZIP_CAN_USE_MMAP=true
63637
63638
63639
63640  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63641    # Find the root of the Solaris Studio installation from the compiler path
63642    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63643    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63644    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63645$as_echo_n "checking for libstlport.so.1... " >&6; }
63646    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63647      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63648      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63649    fi
63650    if test -f "$STLPORT_LIB"; then
63651      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63652$as_echo "yes, $STLPORT_LIB" >&6; }
63653
63654  # Only process if variable expands to non-empty
63655
63656  if test "x$STLPORT_LIB" != x; then
63657    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63658
63659  # Input might be given as Windows format, start by converting to
63660  # unix format.
63661  path="$STLPORT_LIB"
63662  new_path=`$CYGPATH -u "$path"`
63663
63664  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63665  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63666  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63667  # "foo.exe" is OK but "foo" is an error.
63668  #
63669  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63670  # It is also a way to make sure we got the proper file name for the real test later on.
63671  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63672  if test "x$test_shortpath" = x; then
63673    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63674$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63675    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63676  fi
63677
63678  # Call helper function which possibly converts this using DOS-style short mode.
63679  # If so, the updated path is stored in $new_path.
63680
63681  input_path="$new_path"
63682  # Check if we need to convert this using DOS-style short mode. If the path
63683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63684  # take no chances and rewrite it.
63685  # Note: m4 eats our [], so we need to use [ and ] instead.
63686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63687  if test "x$has_forbidden_chars" != x; then
63688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63689    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63690    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63691    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63692      # Going to short mode and back again did indeed matter. Since short mode is
63693      # case insensitive, let's make it lowercase to improve readability.
63694      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63695      # Now convert it back to Unix-style (cygpath)
63696      input_path=`$CYGPATH -u "$shortmode_path"`
63697      new_path="$input_path"
63698    fi
63699  fi
63700
63701  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63702  if test "x$test_cygdrive_prefix" = x; then
63703    # As a simple fix, exclude /usr/bin since it's not a real path.
63704    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63705      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63706      # a path prefixed by /cygdrive for fixpath to work.
63707      new_path="$CYGWIN_ROOT_PATH$input_path"
63708    fi
63709  fi
63710
63711
63712  if test "x$path" != "x$new_path"; then
63713    STLPORT_LIB="$new_path"
63714    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63715$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63716  fi
63717
63718    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63719
63720  path="$STLPORT_LIB"
63721  has_colon=`$ECHO $path | $GREP ^.:`
63722  new_path="$path"
63723  if test "x$has_colon" = x; then
63724    # Not in mixed or Windows style, start by that.
63725    new_path=`cmd //c echo $path`
63726  fi
63727
63728
63729  input_path="$new_path"
63730  # Check if we need to convert this using DOS-style short mode. If the path
63731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63732  # take no chances and rewrite it.
63733  # Note: m4 eats our [], so we need to use [ and ] instead.
63734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63735  if test "x$has_forbidden_chars" != x; then
63736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63737    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63738  fi
63739
63740
63741  windows_path="$new_path"
63742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63743    unix_path=`$CYGPATH -u "$windows_path"`
63744    new_path="$unix_path"
63745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63747    new_path="$unix_path"
63748  fi
63749
63750  if test "x$path" != "x$new_path"; then
63751    STLPORT_LIB="$new_path"
63752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63753$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63754  fi
63755
63756  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63757  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63758
63759    else
63760      # We're on a unix platform. Hooray! :)
63761      path="$STLPORT_LIB"
63762      has_space=`$ECHO "$path" | $GREP " "`
63763      if test "x$has_space" != x; then
63764        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63765$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63766        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63767      fi
63768
63769      # Use eval to expand a potential ~
63770      eval path="$path"
63771      if test ! -f "$path" && test ! -d "$path"; then
63772        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63773      fi
63774
63775      if test -d "$path"; then
63776        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63777      else
63778        dir="`$DIRNAME "$path"`"
63779        base="`$BASENAME "$path"`"
63780        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63781      fi
63782    fi
63783  fi
63784
63785    else
63786      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63787$as_echo "no, not found at $STLPORT_LIB" >&6; }
63788      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63789    fi
63790
63791  fi
63792
63793
63794
63795
63796
63797
63798
63799
63800
63801
63802
63803
63804
63805
63806###############################################################################
63807#
63808# We need to do some final tweaking, when everything else is done.
63809#
63810###############################################################################
63811
63812
63813  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63814$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63815
63816  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63817    ENABLE_INTREE_EC=yes
63818    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63819$as_echo "yes" >&6; }
63820  else
63821    ENABLE_INTREE_EC=no
63822    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63823$as_echo "no" >&6; }
63824  fi
63825
63826
63827
63828
63829  # Check whether --enable-jtreg-failure-handler was given.
63830if test "${enable_jtreg_failure_handler+set}" = set; then :
63831  enableval=$enable_jtreg_failure_handler;
63832fi
63833
63834
63835  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63836$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63837
63838  if test "x$enable_jtreg_failure_handler" = "xyes"; then
63839    if test "x$JT_HOME" = "x"; then
63840      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63841    else
63842      BUILD_FAILURE_HANDLER=true
63843      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63844$as_echo "yes, forced" >&6; }
63845    fi
63846  elif test "x$enable_jtreg_failure_handler" = "xno"; then
63847    BUILD_FAILURE_HANDLER=false
63848    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63849$as_echo "no, forced" >&6; }
63850  elif test "x$enable_jtreg_failure_handler" = "xauto" \
63851      || test "x$enable_jtreg_failure_handler" = "x"; then
63852    if test "x$JT_HOME" = "x"; then
63853      BUILD_FAILURE_HANDLER=false
63854      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63855$as_echo "no, missing jtreg" >&6; }
63856    else
63857      BUILD_FAILURE_HANDLER=true
63858      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63859$as_echo "yes, jtreg present" >&6; }
63860    fi
63861  else
63862    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63863  fi
63864
63865
63866
63867
63868  # Check whether --enable-generate-classlist was given.
63869if test "${enable_generate_classlist+set}" = set; then :
63870  enableval=$enable_generate_classlist;
63871fi
63872
63873
63874  # Check if it's likely that it's possible to generate the classlist. Depending
63875  # on exact jvm configuration it could be possible anyway.
63876  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
63877    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
63878  else
63879    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
63880  fi
63881
63882  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
63883$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
63884  if test "x$enable_generate_classlist" = "xyes"; then
63885    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63886$as_echo "yes, forced" >&6; }
63887    ENABLE_GENERATE_CLASSLIST="true"
63888    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
63889      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
63890$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
63891    fi
63892  elif test "x$enable_generate_classlist" = "xno"; then
63893    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63894$as_echo "no, forced" >&6; }
63895    ENABLE_GENERATE_CLASSLIST="false"
63896  elif test "x$enable_generate_classlist" = "x"; then
63897    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
63898      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63899$as_echo "yes" >&6; }
63900      ENABLE_GENERATE_CLASSLIST="true"
63901    else
63902      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63903$as_echo "no" >&6; }
63904      ENABLE_GENERATE_CLASSLIST="false"
63905    fi
63906  else
63907    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
63908  fi
63909
63910
63911
63912
63913###############################################################################
63914#
63915# Configure parts of the build that only affect the build performance,
63916# not the result.
63917#
63918###############################################################################
63919
63920
63921  # How many cores do we have on this build system?
63922
63923# Check whether --with-num-cores was given.
63924if test "${with_num_cores+set}" = set; then :
63925  withval=$with_num_cores;
63926fi
63927
63928  if test "x$with_num_cores" = x; then
63929    # The number of cores were not specified, try to probe them.
63930
63931  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63932$as_echo_n "checking for number of cores... " >&6; }
63933  NUM_CORES=1
63934  FOUND_CORES=no
63935
63936  if test -f /proc/cpuinfo; then
63937    # Looks like a Linux (or cygwin) system
63938    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63939    FOUND_CORES=yes
63940  elif test -x /usr/sbin/psrinfo; then
63941    # Looks like a Solaris system
63942    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63943    FOUND_CORES=yes
63944  elif test -x /usr/sbin/sysctl; then
63945    # Looks like a MacOSX system
63946    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63947    FOUND_CORES=yes
63948  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63949    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63950    FOUND_CORES=yes
63951  elif test -n "$NUMBER_OF_PROCESSORS"; then
63952    # On windows, look in the env
63953    NUM_CORES=$NUMBER_OF_PROCESSORS
63954    FOUND_CORES=yes
63955  fi
63956
63957  if test "x$FOUND_CORES" = xyes; then
63958    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63959$as_echo "$NUM_CORES" >&6; }
63960  else
63961    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63962$as_echo "could not detect number of cores, defaulting to 1" >&6; }
63963    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63964$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63965  fi
63966
63967  else
63968    NUM_CORES=$with_num_cores
63969  fi
63970
63971
63972
63973  # How much memory do we have on this build system?
63974
63975# Check whether --with-memory-size was given.
63976if test "${with_memory_size+set}" = set; then :
63977  withval=$with_memory_size;
63978fi
63979
63980  if test "x$with_memory_size" = x; then
63981    # The memory size was not specified, try to probe it.
63982
63983  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
63984$as_echo_n "checking for memory size... " >&6; }
63985  # Default to 1024 MB
63986  MEMORY_SIZE=1024
63987  FOUND_MEM=no
63988
63989  if test -f /proc/meminfo; then
63990    # Looks like a Linux (or cygwin) system
63991    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
63992    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
63993    FOUND_MEM=yes
63994  elif test -x /usr/sbin/prtconf; then
63995    # Looks like a Solaris or AIX system
63996    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
63997    FOUND_MEM=yes
63998  elif test -x /usr/sbin/sysctl; then
63999    # Looks like a MacOSX system
64000    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64001    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64002    FOUND_MEM=yes
64003  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64004    # Windows, but without cygwin
64005    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64006    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64007    FOUND_MEM=yes
64008  fi
64009
64010  if test "x$FOUND_MEM" = xyes; then
64011    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64012$as_echo "$MEMORY_SIZE MB" >&6; }
64013  else
64014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64015$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64016    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64017$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64018  fi
64019
64020  else
64021    MEMORY_SIZE=$with_memory_size
64022  fi
64023
64024
64025
64026  # Provide a decent default number of parallel jobs for make depending on
64027  # number of cores, amount of memory and machine architecture.
64028
64029# Check whether --with-jobs was given.
64030if test "${with_jobs+set}" = set; then :
64031  withval=$with_jobs;
64032fi
64033
64034  if test "x$with_jobs" = x; then
64035    # Number of jobs was not specified, calculate.
64036    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64037$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64038    # Approximate memory in GB.
64039    memory_gb=`expr $MEMORY_SIZE / 1024`
64040    # Pick the lowest of memory in gb and number of cores.
64041    if test "$memory_gb" -lt "$NUM_CORES"; then
64042      JOBS="$memory_gb"
64043    else
64044      JOBS="$NUM_CORES"
64045    fi
64046    if test "$JOBS" -eq "0"; then
64047      JOBS=1
64048    fi
64049    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64050$as_echo "$JOBS" >&6; }
64051  else
64052    JOBS=$with_jobs
64053  fi
64054
64055
64056
64057  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64058
64059# Check whether --with-test-jobs was given.
64060if test "${with_test_jobs+set}" = set; then :
64061  withval=$with_test_jobs;
64062fi
64063
64064  if test "x$with_test_jobs" = x; then
64065      TEST_JOBS=0
64066  else
64067      TEST_JOBS=$with_test_jobs
64068  fi
64069
64070
64071
64072# Setup arguments for the boot jdk (after cores and memory have been setup)
64073
64074  ##############################################################################
64075  #
64076  # Specify jvm options for anything that is run with the Boot JDK.
64077  # Not all JVM:s accept the same arguments on the command line.
64078  #
64079
64080# Check whether --with-boot-jdk-jvmargs was given.
64081if test "${with_boot_jdk_jvmargs+set}" = set; then :
64082  withval=$with_boot_jdk_jvmargs;
64083fi
64084
64085
64086  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64087$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64088
64089  # Disable special log output when a debug build is used as Boot JDK...
64090
64091  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64092  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64093  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64094  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64095  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64096  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64097    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64098    JVM_ARG_OK=true
64099  else
64100    $ECHO "Arg failed:" >&5
64101    $ECHO "$OUTPUT" >&5
64102    JVM_ARG_OK=false
64103  fi
64104
64105
64106  # Force en-US environment
64107
64108  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64109  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64110  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64111  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64112  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64113  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64114    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64115    JVM_ARG_OK=true
64116  else
64117    $ECHO "Arg failed:" >&5
64118    $ECHO "$OUTPUT" >&5
64119    JVM_ARG_OK=false
64120  fi
64121
64122
64123  # Apply user provided options.
64124
64125  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64126  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64127  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64128  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64129  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64130  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64131    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64132    JVM_ARG_OK=true
64133  else
64134    $ECHO "Arg failed:" >&5
64135    $ECHO "$OUTPUT" >&5
64136    JVM_ARG_OK=false
64137  fi
64138
64139
64140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64141$as_echo "$boot_jdk_jvmargs" >&6; }
64142
64143  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64144  JAVA_FLAGS=$boot_jdk_jvmargs
64145
64146
64147
64148  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64149$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64150
64151  # Starting amount of heap memory.
64152
64153  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64154  $ECHO "Command: $JAVA -Xms64M -version" >&5
64155  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64156  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64157  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64158  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64159    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64160    JVM_ARG_OK=true
64161  else
64162    $ECHO "Arg failed:" >&5
64163    $ECHO "$OUTPUT" >&5
64164    JVM_ARG_OK=false
64165  fi
64166
64167  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64168
64169  # Maximum amount of heap memory and stack size.
64170  JVM_HEAP_LIMIT_32="1024"
64171  # Running a 64 bit JVM allows for and requires a bigger heap
64172  JVM_HEAP_LIMIT_64="1600"
64173  STACK_SIZE_32=768
64174  STACK_SIZE_64=1536
64175  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64176  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64177    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64178  fi
64179  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64180    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64181  fi
64182  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64183    JVM_HEAP_LIMIT_32=512
64184    JVM_HEAP_LIMIT_64=512
64185  fi
64186
64187  if test "x$BOOT_JDK_BITS" = "x32"; then
64188    STACK_SIZE=$STACK_SIZE_32
64189    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64190  else
64191    STACK_SIZE=$STACK_SIZE_64
64192    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64193  fi
64194
64195  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64196  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64197  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64198  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64199  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64200  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64201    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64202    JVM_ARG_OK=true
64203  else
64204    $ECHO "Arg failed:" >&5
64205    $ECHO "$OUTPUT" >&5
64206    JVM_ARG_OK=false
64207  fi
64208
64209
64210  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64211  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64212  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64213  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64214  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64215  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64216    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64217    JVM_ARG_OK=true
64218  else
64219    $ECHO "Arg failed:" >&5
64220    $ECHO "$OUTPUT" >&5
64221    JVM_ARG_OK=false
64222  fi
64223
64224
64225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64226$as_echo "$boot_jdk_jvmargs_big" >&6; }
64227
64228  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64229
64230
64231  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64232    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64233    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64234  else
64235    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64236    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64237  fi
64238  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64239  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64241$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64243$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64244
64245
64246  # By default, the main javac compilations use big
64247  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64248
64249
64250  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64251$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64252
64253  # Use serial gc for small short lived tools if possible
64254
64255  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64256  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64257  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64258  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64259  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64260  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64261    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64262    JVM_ARG_OK=true
64263  else
64264    $ECHO "Arg failed:" >&5
64265    $ECHO "$OUTPUT" >&5
64266    JVM_ARG_OK=false
64267  fi
64268
64269
64270  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64271  $ECHO "Command: $JAVA -Xms32M -version" >&5
64272  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64273  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64274  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64275  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64276    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64277    JVM_ARG_OK=true
64278  else
64279    $ECHO "Arg failed:" >&5
64280    $ECHO "$OUTPUT" >&5
64281    JVM_ARG_OK=false
64282  fi
64283
64284
64285  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64286  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64287  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64288  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64289  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64290  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64291    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64292    JVM_ARG_OK=true
64293  else
64294    $ECHO "Arg failed:" >&5
64295    $ECHO "$OUTPUT" >&5
64296    JVM_ARG_OK=false
64297  fi
64298
64299
64300  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64301  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64302  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64303  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64304  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64305  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64306    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64307    JVM_ARG_OK=true
64308  else
64309    $ECHO "Arg failed:" >&5
64310    $ECHO "$OUTPUT" >&5
64311    JVM_ARG_OK=false
64312  fi
64313
64314
64315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64316$as_echo "$boot_jdk_jvmargs_small" >&6; }
64317
64318  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64319
64320
64321  JAVA_TOOL_FLAGS_SMALL=""
64322  for f in $JAVA_FLAGS_SMALL; do
64323    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64324  done
64325
64326
64327
64328# Setup smart javac (after cores and memory have been setup)
64329
64330
64331# Check whether --with-sjavac-server-java was given.
64332if test "${with_sjavac_server_java+set}" = set; then :
64333  withval=$with_sjavac_server_java;
64334fi
64335
64336
64337  if test "x$with_sjavac_server_java" != x; then
64338    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64339    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64340    if test "x$FOUND_VERSION" = x; then
64341      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64342    fi
64343  else
64344    SJAVAC_SERVER_JAVA="$JAVA"
64345  fi
64346
64347
64348  if test "$MEMORY_SIZE" -gt "3000"; then
64349
64350  $ECHO "Check if jvm arg is ok: -d64" >&5
64351  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64352  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64353  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64354  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64355  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64356    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64357    JVM_ARG_OK=true
64358  else
64359    $ECHO "Arg failed:" >&5
64360    $ECHO "$OUTPUT" >&5
64361    JVM_ARG_OK=false
64362  fi
64363
64364    if test "$JVM_ARG_OK" = true; then
64365      JVM_64BIT=true
64366      JVM_ARG_OK=false
64367    fi
64368  fi
64369
64370  MX_VALUE=`expr $MEMORY_SIZE / 2`
64371  if test "$JVM_64BIT" = true; then
64372    # Set ms lower than mx since more than one instance of the server might
64373    # get launched at the same time before they figure out which instance won.
64374    MS_VALUE=512
64375    if test "$MX_VALUE" -gt "2048"; then
64376      MX_VALUE=2048
64377    fi
64378  else
64379    MS_VALUE=256
64380    if test "$MX_VALUE" -gt "1500"; then
64381      MX_VALUE=1500
64382    fi
64383  fi
64384  if test "$MX_VALUE" -lt "512"; then
64385    MX_VALUE=512
64386  fi
64387
64388  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64389  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64390  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64391  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64392  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64393  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64394    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64395    JVM_ARG_OK=true
64396  else
64397    $ECHO "Arg failed:" >&5
64398    $ECHO "$OUTPUT" >&5
64399    JVM_ARG_OK=false
64400  fi
64401
64402
64403
64404  # Check whether --enable-sjavac was given.
64405if test "${enable_sjavac+set}" = set; then :
64406  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64407else
64408  ENABLE_SJAVAC="no"
64409fi
64410
64411  if test "x$JVM_ARG_OK" = "xfalse"; then
64412    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64413$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64414    ENABLE_SJAVAC="no"
64415  fi
64416  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64417$as_echo_n "checking whether to use sjavac... " >&6; }
64418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64419$as_echo "$ENABLE_SJAVAC" >&6; }
64420
64421
64422  # Check whether --enable-javac-server was given.
64423if test "${enable_javac_server+set}" = set; then :
64424  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64425else
64426  ENABLE_JAVAC_SERVER="yes"
64427fi
64428
64429  if test "x$JVM_ARG_OK" = "xfalse"; then
64430    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64431$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64432    ENABLE_JAVAC_SERVER="no"
64433  fi
64434  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64435$as_echo_n "checking whether to use javac server... " >&6; }
64436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64437$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64438
64439
64440  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64441    # When using a server javac, the small client instances do not need much
64442    # resources.
64443    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64444  fi
64445
64446
64447# Setup use of icecc if requested
64448
64449  # Check whether --enable-icecc was given.
64450if test "${enable_icecc+set}" = set; then :
64451  enableval=$enable_icecc;
64452fi
64453
64454
64455  if test "x${enable_icecc}" = "xyes"; then
64456
64457
64458
64459  # Publish this variable in the help.
64460
64461
64462  if [ -z "${ICECC_CMD+x}" ]; then
64463    # The variable is not set by user, try to locate tool using the code snippet
64464    for ac_prog in icecc
64465do
64466  # Extract the first word of "$ac_prog", so it can be a program name with args.
64467set dummy $ac_prog; ac_word=$2
64468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64469$as_echo_n "checking for $ac_word... " >&6; }
64470if ${ac_cv_path_ICECC_CMD+:} false; then :
64471  $as_echo_n "(cached) " >&6
64472else
64473  case $ICECC_CMD in
64474  [\\/]* | ?:[\\/]*)
64475  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64476  ;;
64477  *)
64478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64479for as_dir in $PATH
64480do
64481  IFS=$as_save_IFS
64482  test -z "$as_dir" && as_dir=.
64483    for ac_exec_ext in '' $ac_executable_extensions; do
64484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64485    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64487    break 2
64488  fi
64489done
64490  done
64491IFS=$as_save_IFS
64492
64493  ;;
64494esac
64495fi
64496ICECC_CMD=$ac_cv_path_ICECC_CMD
64497if test -n "$ICECC_CMD"; then
64498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64499$as_echo "$ICECC_CMD" >&6; }
64500else
64501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64502$as_echo "no" >&6; }
64503fi
64504
64505
64506  test -n "$ICECC_CMD" && break
64507done
64508
64509  else
64510    # The variable is set, but is it from the command line or the environment?
64511
64512    # Try to remove the string !ICECC_CMD! from our list.
64513    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64514    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64515      # If it failed, the variable was not from the command line. Ignore it,
64516      # but warn the user (except for BASH, which is always set by the calling BASH).
64517      if test "xICECC_CMD" != xBASH; then
64518        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64519$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64520      fi
64521      # Try to locate tool using the code snippet
64522      for ac_prog in icecc
64523do
64524  # Extract the first word of "$ac_prog", so it can be a program name with args.
64525set dummy $ac_prog; ac_word=$2
64526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64527$as_echo_n "checking for $ac_word... " >&6; }
64528if ${ac_cv_path_ICECC_CMD+:} false; then :
64529  $as_echo_n "(cached) " >&6
64530else
64531  case $ICECC_CMD in
64532  [\\/]* | ?:[\\/]*)
64533  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64534  ;;
64535  *)
64536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64537for as_dir in $PATH
64538do
64539  IFS=$as_save_IFS
64540  test -z "$as_dir" && as_dir=.
64541    for ac_exec_ext in '' $ac_executable_extensions; do
64542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64543    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64545    break 2
64546  fi
64547done
64548  done
64549IFS=$as_save_IFS
64550
64551  ;;
64552esac
64553fi
64554ICECC_CMD=$ac_cv_path_ICECC_CMD
64555if test -n "$ICECC_CMD"; then
64556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64557$as_echo "$ICECC_CMD" >&6; }
64558else
64559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64560$as_echo "no" >&6; }
64561fi
64562
64563
64564  test -n "$ICECC_CMD" && break
64565done
64566
64567    else
64568      # If it succeeded, then it was overridden by the user. We will use it
64569      # for the tool.
64570
64571      # First remove it from the list of overridden variables, so we can test
64572      # for unknown variables in the end.
64573      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64574
64575      # Check if we try to supply an empty value
64576      if test "x$ICECC_CMD" = x; then
64577        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64578$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64579        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64580$as_echo_n "checking for ICECC_CMD... " >&6; }
64581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64582$as_echo "disabled" >&6; }
64583      else
64584        # Check if the provided tool contains a complete path.
64585        tool_specified="$ICECC_CMD"
64586        tool_basename="${tool_specified##*/}"
64587        if test "x$tool_basename" = "x$tool_specified"; then
64588          # A command without a complete path is provided, search $PATH.
64589          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64590$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64591          # Extract the first word of "$tool_basename", so it can be a program name with args.
64592set dummy $tool_basename; ac_word=$2
64593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64594$as_echo_n "checking for $ac_word... " >&6; }
64595if ${ac_cv_path_ICECC_CMD+:} false; then :
64596  $as_echo_n "(cached) " >&6
64597else
64598  case $ICECC_CMD in
64599  [\\/]* | ?:[\\/]*)
64600  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64601  ;;
64602  *)
64603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64604for as_dir in $PATH
64605do
64606  IFS=$as_save_IFS
64607  test -z "$as_dir" && as_dir=.
64608    for ac_exec_ext in '' $ac_executable_extensions; do
64609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64610    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64612    break 2
64613  fi
64614done
64615  done
64616IFS=$as_save_IFS
64617
64618  ;;
64619esac
64620fi
64621ICECC_CMD=$ac_cv_path_ICECC_CMD
64622if test -n "$ICECC_CMD"; then
64623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64624$as_echo "$ICECC_CMD" >&6; }
64625else
64626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64627$as_echo "no" >&6; }
64628fi
64629
64630
64631          if test "x$ICECC_CMD" = x; then
64632            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64633          fi
64634        else
64635          # Otherwise we believe it is a complete path. Use it as it is.
64636          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64637$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64638          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64639$as_echo_n "checking for ICECC_CMD... " >&6; }
64640          if test ! -x "$tool_specified"; then
64641            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64642$as_echo "not found" >&6; }
64643            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64644          fi
64645          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64646$as_echo "$tool_specified" >&6; }
64647        fi
64648      fi
64649    fi
64650
64651  fi
64652
64653
64654
64655  if test "x$ICECC_CMD" = x; then
64656    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64657  fi
64658
64659
64660    old_path="$PATH"
64661
64662    # Look for icecc-create-env in some known places
64663    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64664
64665
64666
64667  # Publish this variable in the help.
64668
64669
64670  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64671    # The variable is not set by user, try to locate tool using the code snippet
64672    for ac_prog in icecc-create-env
64673do
64674  # Extract the first word of "$ac_prog", so it can be a program name with args.
64675set dummy $ac_prog; ac_word=$2
64676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64677$as_echo_n "checking for $ac_word... " >&6; }
64678if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64679  $as_echo_n "(cached) " >&6
64680else
64681  case $ICECC_CREATE_ENV in
64682  [\\/]* | ?:[\\/]*)
64683  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64684  ;;
64685  *)
64686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64687for as_dir in $PATH
64688do
64689  IFS=$as_save_IFS
64690  test -z "$as_dir" && as_dir=.
64691    for ac_exec_ext in '' $ac_executable_extensions; do
64692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64693    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64695    break 2
64696  fi
64697done
64698  done
64699IFS=$as_save_IFS
64700
64701  ;;
64702esac
64703fi
64704ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64705if test -n "$ICECC_CREATE_ENV"; then
64706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64707$as_echo "$ICECC_CREATE_ENV" >&6; }
64708else
64709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64710$as_echo "no" >&6; }
64711fi
64712
64713
64714  test -n "$ICECC_CREATE_ENV" && break
64715done
64716
64717  else
64718    # The variable is set, but is it from the command line or the environment?
64719
64720    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64721    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64722    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64723      # If it failed, the variable was not from the command line. Ignore it,
64724      # but warn the user (except for BASH, which is always set by the calling BASH).
64725      if test "xICECC_CREATE_ENV" != xBASH; then
64726        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64727$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64728      fi
64729      # Try to locate tool using the code snippet
64730      for ac_prog in icecc-create-env
64731do
64732  # Extract the first word of "$ac_prog", so it can be a program name with args.
64733set dummy $ac_prog; ac_word=$2
64734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64735$as_echo_n "checking for $ac_word... " >&6; }
64736if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64737  $as_echo_n "(cached) " >&6
64738else
64739  case $ICECC_CREATE_ENV in
64740  [\\/]* | ?:[\\/]*)
64741  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64742  ;;
64743  *)
64744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64745for as_dir in $PATH
64746do
64747  IFS=$as_save_IFS
64748  test -z "$as_dir" && as_dir=.
64749    for ac_exec_ext in '' $ac_executable_extensions; do
64750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64751    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64753    break 2
64754  fi
64755done
64756  done
64757IFS=$as_save_IFS
64758
64759  ;;
64760esac
64761fi
64762ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64763if test -n "$ICECC_CREATE_ENV"; then
64764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64765$as_echo "$ICECC_CREATE_ENV" >&6; }
64766else
64767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64768$as_echo "no" >&6; }
64769fi
64770
64771
64772  test -n "$ICECC_CREATE_ENV" && break
64773done
64774
64775    else
64776      # If it succeeded, then it was overridden by the user. We will use it
64777      # for the tool.
64778
64779      # First remove it from the list of overridden variables, so we can test
64780      # for unknown variables in the end.
64781      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64782
64783      # Check if we try to supply an empty value
64784      if test "x$ICECC_CREATE_ENV" = x; then
64785        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64786$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64787        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64788$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64790$as_echo "disabled" >&6; }
64791      else
64792        # Check if the provided tool contains a complete path.
64793        tool_specified="$ICECC_CREATE_ENV"
64794        tool_basename="${tool_specified##*/}"
64795        if test "x$tool_basename" = "x$tool_specified"; then
64796          # A command without a complete path is provided, search $PATH.
64797          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64798$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64799          # Extract the first word of "$tool_basename", so it can be a program name with args.
64800set dummy $tool_basename; ac_word=$2
64801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64802$as_echo_n "checking for $ac_word... " >&6; }
64803if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64804  $as_echo_n "(cached) " >&6
64805else
64806  case $ICECC_CREATE_ENV in
64807  [\\/]* | ?:[\\/]*)
64808  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64809  ;;
64810  *)
64811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64812for as_dir in $PATH
64813do
64814  IFS=$as_save_IFS
64815  test -z "$as_dir" && as_dir=.
64816    for ac_exec_ext in '' $ac_executable_extensions; do
64817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64818    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64820    break 2
64821  fi
64822done
64823  done
64824IFS=$as_save_IFS
64825
64826  ;;
64827esac
64828fi
64829ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64830if test -n "$ICECC_CREATE_ENV"; then
64831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64832$as_echo "$ICECC_CREATE_ENV" >&6; }
64833else
64834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64835$as_echo "no" >&6; }
64836fi
64837
64838
64839          if test "x$ICECC_CREATE_ENV" = x; then
64840            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64841          fi
64842        else
64843          # Otherwise we believe it is a complete path. Use it as it is.
64844          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64845$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64846          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64847$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64848          if test ! -x "$tool_specified"; then
64849            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64850$as_echo "not found" >&6; }
64851            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64852          fi
64853          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64854$as_echo "$tool_specified" >&6; }
64855        fi
64856      fi
64857    fi
64858
64859  fi
64860
64861
64862
64863  if test "x$ICECC_CREATE_ENV" = x; then
64864    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64865  fi
64866
64867
64868    # Use icecc-create-env to create a minimal compilation environment that can
64869    # be sent to the other hosts in the icecream cluster.
64870    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64871    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64872    # Older versions of icecc does not have the --gcc parameter
64873    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64874      icecc_gcc_arg="--gcc"
64875    fi
64876    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64877
64878  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64879      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64880          ${icecc_create_env_log} 2>&1 )
64881  if test "$?" != "0"; then
64882    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64883$as_echo "$as_me: icecc-create-env output:" >&6;}
64884    cat \
64885          ${icecc_create_env_log}
64886    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64887  fi
64888
64889    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64890      # For clang, the icecc compilerwrapper is needed. It usually resides next
64891      # to icecc-create-env.
64892
64893
64894
64895  # Publish this variable in the help.
64896
64897
64898  if [ -z "${ICECC_WRAPPER+x}" ]; then
64899    # The variable is not set by user, try to locate tool using the code snippet
64900    for ac_prog in compilerwrapper
64901do
64902  # Extract the first word of "$ac_prog", so it can be a program name with args.
64903set dummy $ac_prog; ac_word=$2
64904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64905$as_echo_n "checking for $ac_word... " >&6; }
64906if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64907  $as_echo_n "(cached) " >&6
64908else
64909  case $ICECC_WRAPPER in
64910  [\\/]* | ?:[\\/]*)
64911  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64912  ;;
64913  *)
64914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64915for as_dir in $PATH
64916do
64917  IFS=$as_save_IFS
64918  test -z "$as_dir" && as_dir=.
64919    for ac_exec_ext in '' $ac_executable_extensions; do
64920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64921    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64923    break 2
64924  fi
64925done
64926  done
64927IFS=$as_save_IFS
64928
64929  ;;
64930esac
64931fi
64932ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64933if test -n "$ICECC_WRAPPER"; then
64934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64935$as_echo "$ICECC_WRAPPER" >&6; }
64936else
64937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64938$as_echo "no" >&6; }
64939fi
64940
64941
64942  test -n "$ICECC_WRAPPER" && break
64943done
64944
64945  else
64946    # The variable is set, but is it from the command line or the environment?
64947
64948    # Try to remove the string !ICECC_WRAPPER! from our list.
64949    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64950    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64951      # If it failed, the variable was not from the command line. Ignore it,
64952      # but warn the user (except for BASH, which is always set by the calling BASH).
64953      if test "xICECC_WRAPPER" != xBASH; then
64954        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64955$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64956      fi
64957      # Try to locate tool using the code snippet
64958      for ac_prog in compilerwrapper
64959do
64960  # Extract the first word of "$ac_prog", so it can be a program name with args.
64961set dummy $ac_prog; ac_word=$2
64962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64963$as_echo_n "checking for $ac_word... " >&6; }
64964if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64965  $as_echo_n "(cached) " >&6
64966else
64967  case $ICECC_WRAPPER in
64968  [\\/]* | ?:[\\/]*)
64969  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64970  ;;
64971  *)
64972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64973for as_dir in $PATH
64974do
64975  IFS=$as_save_IFS
64976  test -z "$as_dir" && as_dir=.
64977    for ac_exec_ext in '' $ac_executable_extensions; do
64978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64979    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64981    break 2
64982  fi
64983done
64984  done
64985IFS=$as_save_IFS
64986
64987  ;;
64988esac
64989fi
64990ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64991if test -n "$ICECC_WRAPPER"; then
64992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64993$as_echo "$ICECC_WRAPPER" >&6; }
64994else
64995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64996$as_echo "no" >&6; }
64997fi
64998
64999
65000  test -n "$ICECC_WRAPPER" && break
65001done
65002
65003    else
65004      # If it succeeded, then it was overridden by the user. We will use it
65005      # for the tool.
65006
65007      # First remove it from the list of overridden variables, so we can test
65008      # for unknown variables in the end.
65009      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65010
65011      # Check if we try to supply an empty value
65012      if test "x$ICECC_WRAPPER" = x; then
65013        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65014$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65015        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65016$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65017        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65018$as_echo "disabled" >&6; }
65019      else
65020        # Check if the provided tool contains a complete path.
65021        tool_specified="$ICECC_WRAPPER"
65022        tool_basename="${tool_specified##*/}"
65023        if test "x$tool_basename" = "x$tool_specified"; then
65024          # A command without a complete path is provided, search $PATH.
65025          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65026$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65027          # Extract the first word of "$tool_basename", so it can be a program name with args.
65028set dummy $tool_basename; ac_word=$2
65029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65030$as_echo_n "checking for $ac_word... " >&6; }
65031if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65032  $as_echo_n "(cached) " >&6
65033else
65034  case $ICECC_WRAPPER in
65035  [\\/]* | ?:[\\/]*)
65036  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65037  ;;
65038  *)
65039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65040for as_dir in $PATH
65041do
65042  IFS=$as_save_IFS
65043  test -z "$as_dir" && as_dir=.
65044    for ac_exec_ext in '' $ac_executable_extensions; do
65045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65046    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65048    break 2
65049  fi
65050done
65051  done
65052IFS=$as_save_IFS
65053
65054  ;;
65055esac
65056fi
65057ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65058if test -n "$ICECC_WRAPPER"; then
65059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65060$as_echo "$ICECC_WRAPPER" >&6; }
65061else
65062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65063$as_echo "no" >&6; }
65064fi
65065
65066
65067          if test "x$ICECC_WRAPPER" = x; then
65068            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65069          fi
65070        else
65071          # Otherwise we believe it is a complete path. Use it as it is.
65072          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65073$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65074          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65075$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65076          if test ! -x "$tool_specified"; then
65077            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65078$as_echo "not found" >&6; }
65079            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65080          fi
65081          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65082$as_echo "$tool_specified" >&6; }
65083        fi
65084      fi
65085    fi
65086
65087  fi
65088
65089
65090
65091  if test "x$ICECC_WRAPPER" = x; then
65092    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65093  fi
65094
65095
65096
65097  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65098      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65099  if test "$?" != "0"; then
65100    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65101$as_echo "$as_me: icecc-create-env output:" >&6;}
65102    cat ${icecc_create_env_log}
65103    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65104  fi
65105
65106    else
65107      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65108    fi
65109    PATH="$old_path"
65110    # The bundle with the compiler gets a name based on checksums. Parse log file
65111    # to find it.
65112    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65113    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65114    if test ! -f ${ICECC_ENV_BUNDLE}; then
65115      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65116    fi
65117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65118$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65119    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65120$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65121    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65122
65123    if test "x${COMPILE_TYPE}" = "xcross"; then
65124      # If cross compiling, create a separate env package for the build compiler
65125      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65126      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65127      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65128
65129  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65130      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65131            ${icecc_create_env_log_build} 2>&1 )
65132  if test "$?" != "0"; then
65133    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65134$as_echo "$as_me: icecc-create-env output:" >&6;}
65135    cat \
65136            ${icecc_create_env_log_build}
65137    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65138  fi
65139
65140      elif test "x${BUILD_CC##*/}" = "xclang"; then
65141
65142  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65143      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65144  if test "$?" != "0"; then
65145    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65146$as_echo "$as_me: icecc-create-env output:" >&6;}
65147    cat ${icecc_create_env_log_build}
65148    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65149  fi
65150
65151      else
65152        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65153      fi
65154      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65155      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65156      if test ! -f ${ICECC_ENV_BUNDLE}; then
65157        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65158      fi
65159      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65160$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65161      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65162$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65163      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65164          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65165    else
65166      BUILD_ICECC="${ICECC}"
65167    fi
65168
65169
65170  fi
65171
65172
65173# Can the C/C++ compiler use precompiled headers?
65174
65175
65176  ###############################################################################
65177  #
65178  # Can the C/C++ compiler use precompiled headers?
65179  #
65180  # Check whether --enable-precompiled-headers was given.
65181if test "${enable_precompiled_headers+set}" = set; then :
65182  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65183else
65184  ENABLE_PRECOMPH=yes
65185fi
65186
65187
65188  USE_PRECOMPILED_HEADER=1
65189  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65190$as_echo_n "checking If precompiled header is enabled... " >&6; }
65191  if test "x$ENABLE_PRECOMPH" = xno; then
65192    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65193$as_echo "no, forced" >&6; }
65194    USE_PRECOMPILED_HEADER=0
65195  elif test "x$ICECC" != "x"; then
65196    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65197$as_echo "no, does not work effectively with icecc" >&6; }
65198    USE_PRECOMPILED_HEADER=0
65199  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65201$as_echo "no, does not work with Solaris Studio" >&6; }
65202    USE_PRECOMPILED_HEADER=0
65203  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65204    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65205$as_echo "no, does not work with xlc" >&6; }
65206    USE_PRECOMPILED_HEADER=0
65207  else
65208    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65209$as_echo "yes" >&6; }
65210  fi
65211
65212  if test "x$ENABLE_PRECOMPH" = xyes; then
65213    # Check that the compiler actually supports precomp headers.
65214    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65215      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65216$as_echo_n "checking that precompiled headers work... " >&6; }
65217      echo "int alfa();" > conftest.h
65218      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65219      if test ! -f conftest.hpp.gch; then
65220        USE_PRECOMPILED_HEADER=0
65221        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65222$as_echo "no" >&6; }
65223      else
65224        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65225$as_echo "yes" >&6; }
65226      fi
65227      $RM conftest.h conftest.hpp.gch
65228    fi
65229  fi
65230
65231
65232
65233
65234# Setup use of ccache, if available
65235
65236  # Check whether --enable-ccache was given.
65237if test "${enable_ccache+set}" = set; then :
65238  enableval=$enable_ccache;
65239fi
65240
65241
65242  CCACHE=
65243  CCACHE_STATUS=
65244  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65245$as_echo_n "checking is ccache enabled... " >&6; }
65246  if test "x$enable_ccache" = xyes; then
65247    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65248      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65249$as_echo "yes" >&6; }
65250      OLD_PATH="$PATH"
65251      if test "x$TOOLCHAIN_PATH" != x; then
65252        PATH=$TOOLCHAIN_PATH:$PATH
65253      fi
65254
65255
65256
65257  # Publish this variable in the help.
65258
65259
65260  if [ -z "${CCACHE+x}" ]; then
65261    # The variable is not set by user, try to locate tool using the code snippet
65262    for ac_prog in ccache
65263do
65264  # Extract the first word of "$ac_prog", so it can be a program name with args.
65265set dummy $ac_prog; ac_word=$2
65266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65267$as_echo_n "checking for $ac_word... " >&6; }
65268if ${ac_cv_path_CCACHE+:} false; then :
65269  $as_echo_n "(cached) " >&6
65270else
65271  case $CCACHE in
65272  [\\/]* | ?:[\\/]*)
65273  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65274  ;;
65275  *)
65276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65277for as_dir in $PATH
65278do
65279  IFS=$as_save_IFS
65280  test -z "$as_dir" && as_dir=.
65281    for ac_exec_ext in '' $ac_executable_extensions; do
65282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65283    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65285    break 2
65286  fi
65287done
65288  done
65289IFS=$as_save_IFS
65290
65291  ;;
65292esac
65293fi
65294CCACHE=$ac_cv_path_CCACHE
65295if test -n "$CCACHE"; then
65296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65297$as_echo "$CCACHE" >&6; }
65298else
65299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65300$as_echo "no" >&6; }
65301fi
65302
65303
65304  test -n "$CCACHE" && break
65305done
65306
65307  else
65308    # The variable is set, but is it from the command line or the environment?
65309
65310    # Try to remove the string !CCACHE! from our list.
65311    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65312    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65313      # If it failed, the variable was not from the command line. Ignore it,
65314      # but warn the user (except for BASH, which is always set by the calling BASH).
65315      if test "xCCACHE" != xBASH; then
65316        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65317$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65318      fi
65319      # Try to locate tool using the code snippet
65320      for ac_prog in ccache
65321do
65322  # Extract the first word of "$ac_prog", so it can be a program name with args.
65323set dummy $ac_prog; ac_word=$2
65324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65325$as_echo_n "checking for $ac_word... " >&6; }
65326if ${ac_cv_path_CCACHE+:} false; then :
65327  $as_echo_n "(cached) " >&6
65328else
65329  case $CCACHE in
65330  [\\/]* | ?:[\\/]*)
65331  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65332  ;;
65333  *)
65334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65335for as_dir in $PATH
65336do
65337  IFS=$as_save_IFS
65338  test -z "$as_dir" && as_dir=.
65339    for ac_exec_ext in '' $ac_executable_extensions; do
65340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65341    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65343    break 2
65344  fi
65345done
65346  done
65347IFS=$as_save_IFS
65348
65349  ;;
65350esac
65351fi
65352CCACHE=$ac_cv_path_CCACHE
65353if test -n "$CCACHE"; then
65354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65355$as_echo "$CCACHE" >&6; }
65356else
65357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65358$as_echo "no" >&6; }
65359fi
65360
65361
65362  test -n "$CCACHE" && break
65363done
65364
65365    else
65366      # If it succeeded, then it was overridden by the user. We will use it
65367      # for the tool.
65368
65369      # First remove it from the list of overridden variables, so we can test
65370      # for unknown variables in the end.
65371      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65372
65373      # Check if we try to supply an empty value
65374      if test "x$CCACHE" = x; then
65375        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65376$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65377        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65378$as_echo_n "checking for CCACHE... " >&6; }
65379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65380$as_echo "disabled" >&6; }
65381      else
65382        # Check if the provided tool contains a complete path.
65383        tool_specified="$CCACHE"
65384        tool_basename="${tool_specified##*/}"
65385        if test "x$tool_basename" = "x$tool_specified"; then
65386          # A command without a complete path is provided, search $PATH.
65387          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65388$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65389          # Extract the first word of "$tool_basename", so it can be a program name with args.
65390set dummy $tool_basename; ac_word=$2
65391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65392$as_echo_n "checking for $ac_word... " >&6; }
65393if ${ac_cv_path_CCACHE+:} false; then :
65394  $as_echo_n "(cached) " >&6
65395else
65396  case $CCACHE in
65397  [\\/]* | ?:[\\/]*)
65398  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65399  ;;
65400  *)
65401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65402for as_dir in $PATH
65403do
65404  IFS=$as_save_IFS
65405  test -z "$as_dir" && as_dir=.
65406    for ac_exec_ext in '' $ac_executable_extensions; do
65407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65408    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65410    break 2
65411  fi
65412done
65413  done
65414IFS=$as_save_IFS
65415
65416  ;;
65417esac
65418fi
65419CCACHE=$ac_cv_path_CCACHE
65420if test -n "$CCACHE"; then
65421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65422$as_echo "$CCACHE" >&6; }
65423else
65424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65425$as_echo "no" >&6; }
65426fi
65427
65428
65429          if test "x$CCACHE" = x; then
65430            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65431          fi
65432        else
65433          # Otherwise we believe it is a complete path. Use it as it is.
65434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65435$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65436          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65437$as_echo_n "checking for CCACHE... " >&6; }
65438          if test ! -x "$tool_specified"; then
65439            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65440$as_echo "not found" >&6; }
65441            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65442          fi
65443          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65444$as_echo "$tool_specified" >&6; }
65445        fi
65446      fi
65447    fi
65448
65449  fi
65450
65451
65452
65453  if test "x$CCACHE" = x; then
65454    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65455  fi
65456
65457
65458      PATH="$OLD_PATH"
65459      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65460      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65461    else
65462      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65463$as_echo "no" >&6; }
65464      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65465$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65466    fi
65467  elif test "x$enable_ccache" = xno; then
65468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65469$as_echo "no, explicitly disabled" >&6; }
65470    CCACHE_STATUS="Disabled"
65471  elif test "x$enable_ccache" = x; then
65472    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65473$as_echo "no" >&6; }
65474  else
65475    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65476$as_echo "unknown" >&6; }
65477    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65478  fi
65479
65480
65481
65482# Check whether --with-ccache-dir was given.
65483if test "${with_ccache_dir+set}" = set; then :
65484  withval=$with_ccache_dir;
65485fi
65486
65487
65488  if test "x$with_ccache_dir" != x; then
65489    # When using a non home ccache directory, assume the use is to share ccache files
65490    # with other users. Thus change the umask.
65491    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65492    if test "x$CCACHE" = x; then
65493      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65494$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65495    fi
65496  fi
65497
65498  if test "x$CCACHE" != x; then
65499
65500  if test "x$CCACHE" != x; then
65501    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65502      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65503          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65504      if test "x$HAS_BAD_CCACHE" != "x"; then
65505        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65506      fi
65507      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65508$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65509      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65510      PUSHED_FLAGS="$CXXFLAGS"
65511      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65512      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65513/* end confdefs.h.  */
65514
65515int
65516main ()
65517{
65518
65519  ;
65520  return 0;
65521}
65522_ACEOF
65523if ac_fn_cxx_try_compile "$LINENO"; then :
65524  CC_KNOWS_CCACHE_TRICK=yes
65525else
65526  CC_KNOWS_CCACHE_TRICK=no
65527fi
65528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65529      CXXFLAGS="$PUSHED_FLAGS"
65530      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65531        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65532$as_echo "yes" >&6; }
65533        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65534
65535        CCACHE_SLOPPINESS=pch_defines,time_macros
65536      else
65537        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65538$as_echo "no" >&6; }
65539        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65540      fi
65541    fi
65542
65543    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65544        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65545
65546    if test "x$SET_CCACHE_DIR" != x; then
65547      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65548      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65549    fi
65550  fi
65551
65552  fi
65553
65554
65555###############################################################################
65556#
65557# And now the finish...
65558#
65559###############################################################################
65560
65561# Check for some common pitfalls
65562
65563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65564    file_to_test="$SRC_ROOT/LICENSE"
65565    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65566      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
65567    fi
65568  fi
65569
65570
65571  # Did user specify any unknown variables?
65572
65573  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65574    # Replace the separating ! with spaces before presenting for end user.
65575    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65576    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65577$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65578  fi
65579
65580
65581  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65582$as_echo_n "checking if build directory is on local disk... " >&6; }
65583
65584  # df -l lists only local disks; if the given directory is not found then
65585  # a non-zero exit code is given
65586  if test "x$DF" = x; then
65587    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65588      # msys does not have df; use Windows "net use" instead.
65589      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65590      if test "x$IS_NETWORK_DISK" = x; then
65591        OUTPUT_DIR_IS_LOCAL="yes"
65592      else
65593        OUTPUT_DIR_IS_LOCAL="no"
65594      fi
65595    else
65596      # No df here, say it's local
65597      OUTPUT_DIR_IS_LOCAL="yes"
65598    fi
65599  else
65600    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65601      OUTPUT_DIR_IS_LOCAL="yes"
65602    else
65603      OUTPUT_DIR_IS_LOCAL="no"
65604    fi
65605  fi
65606
65607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65608$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65609
65610
65611
65612  # Check if the user has any old-style ALT_ variables set.
65613  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65614
65615  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65616  # Since we can't properly handle the dependencies for this, warn the user about the situation
65617  if test -e $OUTPUT_ROOT/spec.gmk; then
65618    IS_RECONFIGURE=yes
65619  else
65620    IS_RECONFIGURE=no
65621  fi
65622
65623
65624# At the end, call the custom hook. (Dummy macro if no custom sources available)
65625
65626
65627# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65628
65629  # Keep feature lists sorted and free of duplicates
65630  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65631  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65632  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65633  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65634  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65635  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65636  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65637
65638  # Validate features
65639  for variant in $JVM_VARIANTS; do
65640    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65641$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65642    features_var_name=JVM_FEATURES_$variant
65643    JVM_FEATURES_TO_TEST=${!features_var_name}
65644    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65645$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65646    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65647    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65648    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65649    if test "x$INVALID_FEATURES" != x; then
65650      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65651    fi
65652  done
65653
65654
65655# We're messing a bit with internal autoconf variables to put the config.status
65656# in the output directory instead of the current directory.
65657CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65658
65659# Create the actual output files. Now the main work of configure is done.
65660cat >confcache <<\_ACEOF
65661# This file is a shell script that caches the results of configure
65662# tests run on this system so they can be shared between configure
65663# scripts and configure runs, see configure's option --config-cache.
65664# It is not useful on other systems.  If it contains results you don't
65665# want to keep, you may remove or edit it.
65666#
65667# config.status only pays attention to the cache file if you give it
65668# the --recheck option to rerun configure.
65669#
65670# `ac_cv_env_foo' variables (set or unset) will be overridden when
65671# loading this file, other *unset* `ac_cv_foo' will be assigned the
65672# following values.
65673
65674_ACEOF
65675
65676# The following way of writing the cache mishandles newlines in values,
65677# but we know of no workaround that is simple, portable, and efficient.
65678# So, we kill variables containing newlines.
65679# Ultrix sh set writes to stderr and can't be redirected directly,
65680# and sets the high bit in the cache file unless we assign to the vars.
65681(
65682  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65683    eval ac_val=\$$ac_var
65684    case $ac_val in #(
65685    *${as_nl}*)
65686      case $ac_var in #(
65687      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65688$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65689      esac
65690      case $ac_var in #(
65691      _ | IFS | as_nl) ;; #(
65692      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65693      *) { eval $ac_var=; unset $ac_var;} ;;
65694      esac ;;
65695    esac
65696  done
65697
65698  (set) 2>&1 |
65699    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65700    *${as_nl}ac_space=\ *)
65701      # `set' does not quote correctly, so add quotes: double-quote
65702      # substitution turns \\\\ into \\, and sed turns \\ into \.
65703      sed -n \
65704	"s/'/'\\\\''/g;
65705	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65706      ;; #(
65707    *)
65708      # `set' quotes correctly as required by POSIX, so do not add quotes.
65709      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65710      ;;
65711    esac |
65712    sort
65713) |
65714  sed '
65715     /^ac_cv_env_/b end
65716     t clear
65717     :clear
65718     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65719     t end
65720     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65721     :end' >>confcache
65722if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65723  if test -w "$cache_file"; then
65724    if test "x$cache_file" != "x/dev/null"; then
65725      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65726$as_echo "$as_me: updating cache $cache_file" >&6;}
65727      if test ! -f "$cache_file" || test -h "$cache_file"; then
65728	cat confcache >"$cache_file"
65729      else
65730        case $cache_file in #(
65731        */* | ?:*)
65732	  mv -f confcache "$cache_file"$$ &&
65733	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65734        *)
65735	  mv -f confcache "$cache_file" ;;
65736	esac
65737      fi
65738    fi
65739  else
65740    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65741$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65742  fi
65743fi
65744rm -f confcache
65745
65746test "x$prefix" = xNONE && prefix=$ac_default_prefix
65747# Let make expand exec_prefix.
65748test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65749
65750# Transform confdefs.h into DEFS.
65751# Protect against shell expansion while executing Makefile rules.
65752# Protect against Makefile macro expansion.
65753#
65754# If the first sed substitution is executed (which looks for macros that
65755# take arguments), then branch to the quote section.  Otherwise,
65756# look for a macro that doesn't take arguments.
65757ac_script='
65758:mline
65759/\\$/{
65760 N
65761 s,\\\n,,
65762 b mline
65763}
65764t clear
65765:clear
65766s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65767t quote
65768s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65769t quote
65770b any
65771:quote
65772s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65773s/\[/\\&/g
65774s/\]/\\&/g
65775s/\$/$$/g
65776H
65777:any
65778${
65779	g
65780	s/^\n//
65781	s/\n/ /g
65782	p
65783}
65784'
65785DEFS=`sed -n "$ac_script" confdefs.h`
65786
65787
65788ac_libobjs=
65789ac_ltlibobjs=
65790U=
65791for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65792  # 1. Remove the extension, and $U if already installed.
65793  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65794  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65795  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65796  #    will be set to the directory where LIBOBJS objects are built.
65797  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65798  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65799done
65800LIBOBJS=$ac_libobjs
65801
65802LTLIBOBJS=$ac_ltlibobjs
65803
65804
65805
65806: "${CONFIG_STATUS=./config.status}"
65807ac_write_fail=0
65808ac_clean_files_save=$ac_clean_files
65809ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65810{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65811$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65812as_write_fail=0
65813cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65814#! $SHELL
65815# Generated by $as_me.
65816# Run this file to recreate the current configuration.
65817# Compiler output produced by configure, useful for debugging
65818# configure, is in config.log if it exists.
65819
65820debug=false
65821ac_cs_recheck=false
65822ac_cs_silent=false
65823
65824SHELL=\${CONFIG_SHELL-$SHELL}
65825export SHELL
65826_ASEOF
65827cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65828## -------------------- ##
65829## M4sh Initialization. ##
65830## -------------------- ##
65831
65832# Be more Bourne compatible
65833DUALCASE=1; export DUALCASE # for MKS sh
65834if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65835  emulate sh
65836  NULLCMD=:
65837  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65838  # is contrary to our usage.  Disable this feature.
65839  alias -g '${1+"$@"}'='"$@"'
65840  setopt NO_GLOB_SUBST
65841else
65842  case `(set -o) 2>/dev/null` in #(
65843  *posix*) :
65844    set -o posix ;; #(
65845  *) :
65846     ;;
65847esac
65848fi
65849
65850
65851as_nl='
65852'
65853export as_nl
65854# Printing a long string crashes Solaris 7 /usr/bin/printf.
65855as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65856as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65857as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65858# Prefer a ksh shell builtin over an external printf program on Solaris,
65859# but without wasting forks for bash or zsh.
65860if test -z "$BASH_VERSION$ZSH_VERSION" \
65861    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65862  as_echo='print -r --'
65863  as_echo_n='print -rn --'
65864elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65865  as_echo='printf %s\n'
65866  as_echo_n='printf %s'
65867else
65868  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65869    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65870    as_echo_n='/usr/ucb/echo -n'
65871  else
65872    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65873    as_echo_n_body='eval
65874      arg=$1;
65875      case $arg in #(
65876      *"$as_nl"*)
65877	expr "X$arg" : "X\\(.*\\)$as_nl";
65878	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65879      esac;
65880      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65881    '
65882    export as_echo_n_body
65883    as_echo_n='sh -c $as_echo_n_body as_echo'
65884  fi
65885  export as_echo_body
65886  as_echo='sh -c $as_echo_body as_echo'
65887fi
65888
65889# The user is always right.
65890if test "${PATH_SEPARATOR+set}" != set; then
65891  PATH_SEPARATOR=:
65892  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65893    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65894      PATH_SEPARATOR=';'
65895  }
65896fi
65897
65898
65899# IFS
65900# We need space, tab and new line, in precisely that order.  Quoting is
65901# there to prevent editors from complaining about space-tab.
65902# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65903# splitting by setting IFS to empty value.)
65904IFS=" ""	$as_nl"
65905
65906# Find who we are.  Look in the path if we contain no directory separator.
65907as_myself=
65908case $0 in #((
65909  *[\\/]* ) as_myself=$0 ;;
65910  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65911for as_dir in $PATH
65912do
65913  IFS=$as_save_IFS
65914  test -z "$as_dir" && as_dir=.
65915    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65916  done
65917IFS=$as_save_IFS
65918
65919     ;;
65920esac
65921# We did not find ourselves, most probably we were run as `sh COMMAND'
65922# in which case we are not to be found in the path.
65923if test "x$as_myself" = x; then
65924  as_myself=$0
65925fi
65926if test ! -f "$as_myself"; then
65927  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65928  exit 1
65929fi
65930
65931# Unset variables that we do not need and which cause bugs (e.g. in
65932# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65933# suppresses any "Segmentation fault" message there.  '((' could
65934# trigger a bug in pdksh 5.2.14.
65935for as_var in BASH_ENV ENV MAIL MAILPATH
65936do eval test x\${$as_var+set} = xset \
65937  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65938done
65939PS1='$ '
65940PS2='> '
65941PS4='+ '
65942
65943# NLS nuisances.
65944LC_ALL=C
65945export LC_ALL
65946LANGUAGE=C
65947export LANGUAGE
65948
65949# CDPATH.
65950(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65951
65952
65953# as_fn_error STATUS ERROR [LINENO LOG_FD]
65954# ----------------------------------------
65955# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65956# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65957# script with STATUS, using 1 if that was 0.
65958as_fn_error ()
65959{
65960  as_status=$1; test $as_status -eq 0 && as_status=1
65961  if test "$4"; then
65962    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65963    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65964  fi
65965  $as_echo "$as_me: error: $2" >&2
65966  as_fn_exit $as_status
65967} # as_fn_error
65968
65969
65970# as_fn_set_status STATUS
65971# -----------------------
65972# Set $? to STATUS, without forking.
65973as_fn_set_status ()
65974{
65975  return $1
65976} # as_fn_set_status
65977
65978# as_fn_exit STATUS
65979# -----------------
65980# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
65981as_fn_exit ()
65982{
65983  set +e
65984  as_fn_set_status $1
65985  exit $1
65986} # as_fn_exit
65987
65988# as_fn_unset VAR
65989# ---------------
65990# Portably unset VAR.
65991as_fn_unset ()
65992{
65993  { eval $1=; unset $1;}
65994}
65995as_unset=as_fn_unset
65996# as_fn_append VAR VALUE
65997# ----------------------
65998# Append the text in VALUE to the end of the definition contained in VAR. Take
65999# advantage of any shell optimizations that allow amortized linear growth over
66000# repeated appends, instead of the typical quadratic growth present in naive
66001# implementations.
66002if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66003  eval 'as_fn_append ()
66004  {
66005    eval $1+=\$2
66006  }'
66007else
66008  as_fn_append ()
66009  {
66010    eval $1=\$$1\$2
66011  }
66012fi # as_fn_append
66013
66014# as_fn_arith ARG...
66015# ------------------
66016# Perform arithmetic evaluation on the ARGs, and store the result in the
66017# global $as_val. Take advantage of shells that can avoid forks. The arguments
66018# must be portable across $(()) and expr.
66019if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66020  eval 'as_fn_arith ()
66021  {
66022    as_val=$(( $* ))
66023  }'
66024else
66025  as_fn_arith ()
66026  {
66027    as_val=`expr "$@" || test $? -eq 1`
66028  }
66029fi # as_fn_arith
66030
66031
66032if expr a : '\(a\)' >/dev/null 2>&1 &&
66033   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66034  as_expr=expr
66035else
66036  as_expr=false
66037fi
66038
66039if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66040  as_basename=basename
66041else
66042  as_basename=false
66043fi
66044
66045if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66046  as_dirname=dirname
66047else
66048  as_dirname=false
66049fi
66050
66051as_me=`$as_basename -- "$0" ||
66052$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66053	 X"$0" : 'X\(//\)$' \| \
66054	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66055$as_echo X/"$0" |
66056    sed '/^.*\/\([^/][^/]*\)\/*$/{
66057	    s//\1/
66058	    q
66059	  }
66060	  /^X\/\(\/\/\)$/{
66061	    s//\1/
66062	    q
66063	  }
66064	  /^X\/\(\/\).*/{
66065	    s//\1/
66066	    q
66067	  }
66068	  s/.*/./; q'`
66069
66070# Avoid depending upon Character Ranges.
66071as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66072as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66073as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66074as_cr_digits='0123456789'
66075as_cr_alnum=$as_cr_Letters$as_cr_digits
66076
66077ECHO_C= ECHO_N= ECHO_T=
66078case `echo -n x` in #(((((
66079-n*)
66080  case `echo 'xy\c'` in
66081  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66082  xy)  ECHO_C='\c';;
66083  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66084       ECHO_T='	';;
66085  esac;;
66086*)
66087  ECHO_N='-n';;
66088esac
66089
66090rm -f conf$$ conf$$.exe conf$$.file
66091if test -d conf$$.dir; then
66092  rm -f conf$$.dir/conf$$.file
66093else
66094  rm -f conf$$.dir
66095  mkdir conf$$.dir 2>/dev/null
66096fi
66097if (echo >conf$$.file) 2>/dev/null; then
66098  if ln -s conf$$.file conf$$ 2>/dev/null; then
66099    as_ln_s='ln -s'
66100    # ... but there are two gotchas:
66101    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66102    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66103    # In both cases, we have to default to `cp -pR'.
66104    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66105      as_ln_s='cp -pR'
66106  elif ln conf$$.file conf$$ 2>/dev/null; then
66107    as_ln_s=ln
66108  else
66109    as_ln_s='cp -pR'
66110  fi
66111else
66112  as_ln_s='cp -pR'
66113fi
66114rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66115rmdir conf$$.dir 2>/dev/null
66116
66117
66118# as_fn_mkdir_p
66119# -------------
66120# Create "$as_dir" as a directory, including parents if necessary.
66121as_fn_mkdir_p ()
66122{
66123
66124  case $as_dir in #(
66125  -*) as_dir=./$as_dir;;
66126  esac
66127  test -d "$as_dir" || eval $as_mkdir_p || {
66128    as_dirs=
66129    while :; do
66130      case $as_dir in #(
66131      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66132      *) as_qdir=$as_dir;;
66133      esac
66134      as_dirs="'$as_qdir' $as_dirs"
66135      as_dir=`$as_dirname -- "$as_dir" ||
66136$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66137	 X"$as_dir" : 'X\(//\)[^/]' \| \
66138	 X"$as_dir" : 'X\(//\)$' \| \
66139	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66140$as_echo X"$as_dir" |
66141    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66142	    s//\1/
66143	    q
66144	  }
66145	  /^X\(\/\/\)[^/].*/{
66146	    s//\1/
66147	    q
66148	  }
66149	  /^X\(\/\/\)$/{
66150	    s//\1/
66151	    q
66152	  }
66153	  /^X\(\/\).*/{
66154	    s//\1/
66155	    q
66156	  }
66157	  s/.*/./; q'`
66158      test -d "$as_dir" && break
66159    done
66160    test -z "$as_dirs" || eval "mkdir $as_dirs"
66161  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66162
66163
66164} # as_fn_mkdir_p
66165if mkdir -p . 2>/dev/null; then
66166  as_mkdir_p='mkdir -p "$as_dir"'
66167else
66168  test -d ./-p && rmdir ./-p
66169  as_mkdir_p=false
66170fi
66171
66172
66173# as_fn_executable_p FILE
66174# -----------------------
66175# Test if FILE is an executable regular file.
66176as_fn_executable_p ()
66177{
66178  test -f "$1" && test -x "$1"
66179} # as_fn_executable_p
66180as_test_x='test -x'
66181as_executable_p=as_fn_executable_p
66182
66183# Sed expression to map a string onto a valid CPP name.
66184as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66185
66186# Sed expression to map a string onto a valid variable name.
66187as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66188
66189
66190exec 6>&1
66191## ----------------------------------- ##
66192## Main body of $CONFIG_STATUS script. ##
66193## ----------------------------------- ##
66194_ASEOF
66195test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66196
66197cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66198# Save the log message, to keep $0 and so on meaningful, and to
66199# report actual input values of CONFIG_FILES etc. instead of their
66200# values after options handling.
66201ac_log="
66202This file was extended by OpenJDK $as_me jdk9, which was
66203generated by GNU Autoconf 2.69.  Invocation command line was
66204
66205  CONFIG_FILES    = $CONFIG_FILES
66206  CONFIG_HEADERS  = $CONFIG_HEADERS
66207  CONFIG_LINKS    = $CONFIG_LINKS
66208  CONFIG_COMMANDS = $CONFIG_COMMANDS
66209  $ $0 $@
66210
66211on `(hostname || uname -n) 2>/dev/null | sed 1q`
66212"
66213
66214_ACEOF
66215
66216case $ac_config_files in *"
66217"*) set x $ac_config_files; shift; ac_config_files=$*;;
66218esac
66219
66220
66221
66222cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66223# Files that config.status was made for.
66224config_files="$ac_config_files"
66225
66226_ACEOF
66227
66228cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66229ac_cs_usage="\
66230\`$as_me' instantiates files and other configuration actions
66231from templates according to the current configuration.  Unless the files
66232and actions are specified as TAGs, all are instantiated by default.
66233
66234Usage: $0 [OPTION]... [TAG]...
66235
66236  -h, --help       print this help, then exit
66237  -V, --version    print version number and configuration settings, then exit
66238      --config     print configuration, then exit
66239  -q, --quiet, --silent
66240                   do not print progress messages
66241  -d, --debug      don't remove temporary files
66242      --recheck    update $as_me by reconfiguring in the same conditions
66243      --file=FILE[:TEMPLATE]
66244                   instantiate the configuration file FILE
66245
66246Configuration files:
66247$config_files
66248
66249Report bugs to <build-dev@openjdk.java.net>.
66250OpenJDK home page: <http://openjdk.java.net>."
66251
66252_ACEOF
66253cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66254ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66255ac_cs_version="\\
66256OpenJDK config.status jdk9
66257configured by $0, generated by GNU Autoconf 2.69,
66258  with options \\"\$ac_cs_config\\"
66259
66260Copyright (C) 2012 Free Software Foundation, Inc.
66261This config.status script is free software; the Free Software Foundation
66262gives unlimited permission to copy, distribute and modify it."
66263
66264ac_pwd='$ac_pwd'
66265srcdir='$srcdir'
66266AWK='$AWK'
66267test -n "\$AWK" || AWK=awk
66268_ACEOF
66269
66270cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66271# The default lists apply if the user does not specify any file.
66272ac_need_defaults=:
66273while test $# != 0
66274do
66275  case $1 in
66276  --*=?*)
66277    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66278    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66279    ac_shift=:
66280    ;;
66281  --*=)
66282    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66283    ac_optarg=
66284    ac_shift=:
66285    ;;
66286  *)
66287    ac_option=$1
66288    ac_optarg=$2
66289    ac_shift=shift
66290    ;;
66291  esac
66292
66293  case $ac_option in
66294  # Handling of the options.
66295  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66296    ac_cs_recheck=: ;;
66297  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66298    $as_echo "$ac_cs_version"; exit ;;
66299  --config | --confi | --conf | --con | --co | --c )
66300    $as_echo "$ac_cs_config"; exit ;;
66301  --debug | --debu | --deb | --de | --d | -d )
66302    debug=: ;;
66303  --file | --fil | --fi | --f )
66304    $ac_shift
66305    case $ac_optarg in
66306    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66307    '') as_fn_error $? "missing file argument" ;;
66308    esac
66309    as_fn_append CONFIG_FILES " '$ac_optarg'"
66310    ac_need_defaults=false;;
66311  --he | --h |  --help | --hel | -h )
66312    $as_echo "$ac_cs_usage"; exit ;;
66313  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66314  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66315    ac_cs_silent=: ;;
66316
66317  # This is an error.
66318  -*) as_fn_error $? "unrecognized option: \`$1'
66319Try \`$0 --help' for more information." ;;
66320
66321  *) as_fn_append ac_config_targets " $1"
66322     ac_need_defaults=false ;;
66323
66324  esac
66325  shift
66326done
66327
66328ac_configure_extra_args=
66329
66330if $ac_cs_silent; then
66331  exec 6>/dev/null
66332  ac_configure_extra_args="$ac_configure_extra_args --silent"
66333fi
66334
66335_ACEOF
66336cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66337if \$ac_cs_recheck; then
66338  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66339  shift
66340  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66341  CONFIG_SHELL='$SHELL'
66342  export CONFIG_SHELL
66343  exec "\$@"
66344fi
66345
66346_ACEOF
66347cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66348exec 5>>config.log
66349{
66350  echo
66351  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66352## Running $as_me. ##
66353_ASBOX
66354  $as_echo "$ac_log"
66355} >&5
66356
66357_ACEOF
66358cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66359_ACEOF
66360
66361cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66362
66363# Handling of arguments.
66364for ac_config_target in $ac_config_targets
66365do
66366  case $ac_config_target in
66367    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66368    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66369    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66370    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66371    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66372
66373  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66374  esac
66375done
66376
66377
66378# If the user did not use the arguments to specify the items to instantiate,
66379# then the envvar interface is used.  Set only those that are not.
66380# We use the long form for the default assignment because of an extremely
66381# bizarre bug on SunOS 4.1.3.
66382if $ac_need_defaults; then
66383  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66384fi
66385
66386# Have a temporary directory for convenience.  Make it in the build tree
66387# simply because there is no reason against having it here, and in addition,
66388# creating and moving files from /tmp can sometimes cause problems.
66389# Hook for its removal unless debugging.
66390# Note that there is a small window in which the directory will not be cleaned:
66391# after its creation but before its name has been assigned to `$tmp'.
66392$debug ||
66393{
66394  tmp= ac_tmp=
66395  trap 'exit_status=$?
66396  : "${ac_tmp:=$tmp}"
66397  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66398' 0
66399  trap 'as_fn_exit 1' 1 2 13 15
66400}
66401# Create a (secure) tmp directory for tmp files.
66402
66403{
66404  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66405  test -d "$tmp"
66406}  ||
66407{
66408  tmp=./conf$$-$RANDOM
66409  (umask 077 && mkdir "$tmp")
66410} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66411ac_tmp=$tmp
66412
66413# Set up the scripts for CONFIG_FILES section.
66414# No need to generate them if there are no CONFIG_FILES.
66415# This happens for instance with `./config.status config.h'.
66416if test -n "$CONFIG_FILES"; then
66417
66418
66419ac_cr=`echo X | tr X '\015'`
66420# On cygwin, bash can eat \r inside `` if the user requested igncr.
66421# But we know of no other shell where ac_cr would be empty at this
66422# point, so we can use a bashism as a fallback.
66423if test "x$ac_cr" = x; then
66424  eval ac_cr=\$\'\\r\'
66425fi
66426ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66427if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66428  ac_cs_awk_cr='\\r'
66429else
66430  ac_cs_awk_cr=$ac_cr
66431fi
66432
66433echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66434_ACEOF
66435
66436
66437{
66438  echo "cat >conf$$subs.awk <<_ACEOF" &&
66439  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66440  echo "_ACEOF"
66441} >conf$$subs.sh ||
66442  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66443ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66444ac_delim='%!_!# '
66445for ac_last_try in false false false false false :; do
66446  . ./conf$$subs.sh ||
66447    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66448
66449  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66450  if test $ac_delim_n = $ac_delim_num; then
66451    break
66452  elif $ac_last_try; then
66453    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66454  else
66455    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66456  fi
66457done
66458rm -f conf$$subs.sh
66459
66460cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66461cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66462_ACEOF
66463sed -n '
66464h
66465s/^/S["/; s/!.*/"]=/
66466p
66467g
66468s/^[^!]*!//
66469:repl
66470t repl
66471s/'"$ac_delim"'$//
66472t delim
66473:nl
66474h
66475s/\(.\{148\}\)..*/\1/
66476t more1
66477s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66478p
66479n
66480b repl
66481:more1
66482s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66483p
66484g
66485s/.\{148\}//
66486t nl
66487:delim
66488h
66489s/\(.\{148\}\)..*/\1/
66490t more2
66491s/["\\]/\\&/g; s/^/"/; s/$/"/
66492p
66493b
66494:more2
66495s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66496p
66497g
66498s/.\{148\}//
66499t delim
66500' <conf$$subs.awk | sed '
66501/^[^""]/{
66502  N
66503  s/\n//
66504}
66505' >>$CONFIG_STATUS || ac_write_fail=1
66506rm -f conf$$subs.awk
66507cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66508_ACAWK
66509cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66510  for (key in S) S_is_set[key] = 1
66511  FS = ""
66512
66513}
66514{
66515  line = $ 0
66516  nfields = split(line, field, "@")
66517  substed = 0
66518  len = length(field[1])
66519  for (i = 2; i < nfields; i++) {
66520    key = field[i]
66521    keylen = length(key)
66522    if (S_is_set[key]) {
66523      value = S[key]
66524      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66525      len += length(value) + length(field[++i])
66526      substed = 1
66527    } else
66528      len += 1 + keylen
66529  }
66530
66531  print line
66532}
66533
66534_ACAWK
66535_ACEOF
66536cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66537if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66538  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66539else
66540  cat
66541fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66542  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66543_ACEOF
66544
66545# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66546# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66547# trailing colons and then remove the whole line if VPATH becomes empty
66548# (actually we leave an empty line to preserve line numbers).
66549if test "x$srcdir" = x.; then
66550  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66551h
66552s///
66553s/^/:/
66554s/[	 ]*$/:/
66555s/:\$(srcdir):/:/g
66556s/:\${srcdir}:/:/g
66557s/:@srcdir@:/:/g
66558s/^:*//
66559s/:*$//
66560x
66561s/\(=[	 ]*\).*/\1/
66562G
66563s/\n//
66564s/^[^=]*=[	 ]*$//
66565}'
66566fi
66567
66568cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66569fi # test -n "$CONFIG_FILES"
66570
66571
66572eval set X "  :F $CONFIG_FILES      "
66573shift
66574for ac_tag
66575do
66576  case $ac_tag in
66577  :[FHLC]) ac_mode=$ac_tag; continue;;
66578  esac
66579  case $ac_mode$ac_tag in
66580  :[FHL]*:*);;
66581  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66582  :[FH]-) ac_tag=-:-;;
66583  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66584  esac
66585  ac_save_IFS=$IFS
66586  IFS=:
66587  set x $ac_tag
66588  IFS=$ac_save_IFS
66589  shift
66590  ac_file=$1
66591  shift
66592
66593  case $ac_mode in
66594  :L) ac_source=$1;;
66595  :[FH])
66596    ac_file_inputs=
66597    for ac_f
66598    do
66599      case $ac_f in
66600      -) ac_f="$ac_tmp/stdin";;
66601      *) # Look for the file first in the build tree, then in the source tree
66602	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66603	 # because $ac_f cannot contain `:'.
66604	 test -f "$ac_f" ||
66605	   case $ac_f in
66606	   [\\/$]*) false;;
66607	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66608	   esac ||
66609	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66610      esac
66611      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66612      as_fn_append ac_file_inputs " '$ac_f'"
66613    done
66614
66615    # Let's still pretend it is `configure' which instantiates (i.e., don't
66616    # use $as_me), people would be surprised to read:
66617    #    /* config.h.  Generated by config.status.  */
66618    configure_input='Generated from '`
66619	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66620	`' by configure.'
66621    if test x"$ac_file" != x-; then
66622      configure_input="$ac_file.  $configure_input"
66623      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66624$as_echo "$as_me: creating $ac_file" >&6;}
66625    fi
66626    # Neutralize special characters interpreted by sed in replacement strings.
66627    case $configure_input in #(
66628    *\&* | *\|* | *\\* )
66629       ac_sed_conf_input=`$as_echo "$configure_input" |
66630       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66631    *) ac_sed_conf_input=$configure_input;;
66632    esac
66633
66634    case $ac_tag in
66635    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66636      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66637    esac
66638    ;;
66639  esac
66640
66641  ac_dir=`$as_dirname -- "$ac_file" ||
66642$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66643	 X"$ac_file" : 'X\(//\)[^/]' \| \
66644	 X"$ac_file" : 'X\(//\)$' \| \
66645	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66646$as_echo X"$ac_file" |
66647    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66648	    s//\1/
66649	    q
66650	  }
66651	  /^X\(\/\/\)[^/].*/{
66652	    s//\1/
66653	    q
66654	  }
66655	  /^X\(\/\/\)$/{
66656	    s//\1/
66657	    q
66658	  }
66659	  /^X\(\/\).*/{
66660	    s//\1/
66661	    q
66662	  }
66663	  s/.*/./; q'`
66664  as_dir="$ac_dir"; as_fn_mkdir_p
66665  ac_builddir=.
66666
66667case "$ac_dir" in
66668.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66669*)
66670  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66671  # A ".." for each directory in $ac_dir_suffix.
66672  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66673  case $ac_top_builddir_sub in
66674  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66675  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66676  esac ;;
66677esac
66678ac_abs_top_builddir=$ac_pwd
66679ac_abs_builddir=$ac_pwd$ac_dir_suffix
66680# for backward compatibility:
66681ac_top_builddir=$ac_top_build_prefix
66682
66683case $srcdir in
66684  .)  # We are building in place.
66685    ac_srcdir=.
66686    ac_top_srcdir=$ac_top_builddir_sub
66687    ac_abs_top_srcdir=$ac_pwd ;;
66688  [\\/]* | ?:[\\/]* )  # Absolute name.
66689    ac_srcdir=$srcdir$ac_dir_suffix;
66690    ac_top_srcdir=$srcdir
66691    ac_abs_top_srcdir=$srcdir ;;
66692  *) # Relative name.
66693    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66694    ac_top_srcdir=$ac_top_build_prefix$srcdir
66695    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66696esac
66697ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66698
66699
66700  case $ac_mode in
66701  :F)
66702  #
66703  # CONFIG_FILE
66704  #
66705
66706_ACEOF
66707
66708cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66709# If the template does not know about datarootdir, expand it.
66710# FIXME: This hack should be removed a few years after 2.60.
66711ac_datarootdir_hack=; ac_datarootdir_seen=
66712ac_sed_dataroot='
66713/datarootdir/ {
66714  p
66715  q
66716}
66717/@datadir@/p
66718/@docdir@/p
66719/@infodir@/p
66720/@localedir@/p
66721/@mandir@/p'
66722case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66723*datarootdir*) ac_datarootdir_seen=yes;;
66724*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66725  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66726$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66727_ACEOF
66728cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66729  ac_datarootdir_hack='
66730  s&@datadir@&$datadir&g
66731  s&@docdir@&$docdir&g
66732  s&@infodir@&$infodir&g
66733  s&@localedir@&$localedir&g
66734  s&@mandir@&$mandir&g
66735  s&\\\${datarootdir}&$datarootdir&g' ;;
66736esac
66737_ACEOF
66738
66739# Neutralize VPATH when `$srcdir' = `.'.
66740# Shell code in configure.ac might set extrasub.
66741# FIXME: do we really want to maintain this feature?
66742cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66743ac_sed_extra="$ac_vpsub
66744$extrasub
66745_ACEOF
66746cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66747:t
66748/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66749s|@configure_input@|$ac_sed_conf_input|;t t
66750s&@top_builddir@&$ac_top_builddir_sub&;t t
66751s&@top_build_prefix@&$ac_top_build_prefix&;t t
66752s&@srcdir@&$ac_srcdir&;t t
66753s&@abs_srcdir@&$ac_abs_srcdir&;t t
66754s&@top_srcdir@&$ac_top_srcdir&;t t
66755s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66756s&@builddir@&$ac_builddir&;t t
66757s&@abs_builddir@&$ac_abs_builddir&;t t
66758s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66759$ac_datarootdir_hack
66760"
66761eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66762  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66763
66764test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66765  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66766  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66767      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66768  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66769which seems to be undefined.  Please make sure it is defined" >&5
66770$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66771which seems to be undefined.  Please make sure it is defined" >&2;}
66772
66773  rm -f "$ac_tmp/stdin"
66774  case $ac_file in
66775  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66776  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66777  esac \
66778  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66779 ;;
66780
66781
66782
66783  esac
66784
66785done # for ac_tag
66786
66787
66788as_fn_exit 0
66789_ACEOF
66790ac_clean_files=$ac_clean_files_save
66791
66792test $ac_write_fail = 0 ||
66793  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66794
66795
66796# configure is writing to config.log, and then calls config.status.
66797# config.status does its own redirection, appending to config.log.
66798# Unfortunately, on DOS this fails, as config.log is still kept open
66799# by configure, so config.status won't be able to write to it; its
66800# output is simply discarded.  So we exec the FD to /dev/null,
66801# effectively closing config.log, so it can be properly (re)opened and
66802# appended to by config.status.  When coming back to configure, we
66803# need to make the FD available again.
66804if test "$no_create" != yes; then
66805  ac_cs_success=:
66806  ac_config_status_args=
66807  test "$silent" = yes &&
66808    ac_config_status_args="$ac_config_status_args --quiet"
66809  exec 5>/dev/null
66810  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66811  exec 5>>config.log
66812  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66813  # would make configure fail if this is the last instruction.
66814  $ac_cs_success || as_fn_exit 1
66815fi
66816if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66817  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66818$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66819fi
66820
66821
66822# After AC_OUTPUT, we need to do final work
66823
66824
66825  # Try to move config.log (generated by autoconf) to the configure-support directory.
66826  if test -e ./config.log; then
66827    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66828  fi
66829
66830  # Rotate our log file (configure.log)
66831  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66832    $RM -f "$OUTPUT_ROOT/configure.log.old"
66833  fi
66834  if test -e "$OUTPUT_ROOT/configure.log"; then
66835    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66836  fi
66837
66838  # Move configure.log from current directory to the build output root
66839  if test -e ./configure.log; then
66840    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66841  fi
66842
66843  # Make the compare script executable
66844  $CHMOD +x $OUTPUT_ROOT/compare.sh
66845
66846
66847# Finally output some useful information to the user
66848
66849  # Finally output some useful information to the user
66850
66851  printf "\n"
66852  printf "====================================================\n"
66853  if test "x$no_create" != "xyes"; then
66854    if test "x$IS_RECONFIGURE" != "xyes"; then
66855      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66856    else
66857      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66858    fi
66859  else
66860    if test "x$IS_RECONFIGURE" != "xyes"; then
66861      printf "A configuration has been successfully checked but not created\n"
66862    else
66863      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66864    fi
66865  fi
66866  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66867    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66868  else
66869    printf "using default settings.\n"
66870  fi
66871
66872  printf "\n"
66873  printf "Configuration summary:\n"
66874  printf "* Debug level:    $DEBUG_LEVEL\n"
66875  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66876  printf "* JDK variant:    $JDK_VARIANT\n"
66877  printf "* JVM variants:   $JVM_VARIANTS\n"
66878  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66879  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66880
66881  printf "\n"
66882  printf "Tools summary:\n"
66883  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66884    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66885  fi
66886  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66887  if test "x$TOOLCHAIN_VERSION" != "x"; then
66888    print_version=" $TOOLCHAIN_VERSION"
66889  fi
66890  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66891  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66892  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66893
66894  printf "\n"
66895  printf "Build performance summary:\n"
66896  printf "* Cores to use:   $JOBS\n"
66897  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66898  if test "x$CCACHE_STATUS" != "x"; then
66899    printf "* ccache status:  $CCACHE_STATUS\n"
66900  fi
66901  printf "\n"
66902
66903  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66904    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66905    printf "will result in longer build times.\n"
66906    printf "\n"
66907  fi
66908
66909  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66910    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66911    printf "These are not respected, and will be ignored. It is recommended\n"
66912    printf "that you clean your environment. The following variables are set:\n"
66913    printf "$FOUND_ALT_VARIABLES\n"
66914    printf "\n"
66915  fi
66916
66917  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66918    printf "WARNING: Your build output directory is not on a local disk.\n"
66919    printf "This will severely degrade build performance!\n"
66920    printf "It is recommended that you create an output directory on a local disk,\n"
66921    printf "and run the configure script again from that directory.\n"
66922    printf "\n"
66923  fi
66924
66925  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66926    printf "WARNING: The result of this configuration has overridden an older\n"
66927    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66928    printf "proper build. Failure to do so might result in strange build problems.\n"
66929    printf "\n"
66930  fi
66931
66932  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66933    printf "WARNING: The result of this configuration was not saved.\n"
66934    printf "You should run without '--no-create | -n' to create the configuration.\n"
66935    printf "\n"
66936  fi
66937
66938
66939
66940  # Locate config.log.
66941  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66942    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66943  elif test -e "./config.log"; then
66944    CONFIG_LOG_PATH="."
66945  fi
66946
66947  if test -e "$CONFIG_LOG_PATH/config.log"; then
66948    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66949    if test $? -eq 0; then
66950      printf "The following warnings were produced. Repeated here for convenience:\n"
66951      # We must quote sed expression (using []) to stop m4 from eating the [].
66952      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66953      printf "\n"
66954    fi
66955  fi
66956
66957