generated-configure.sh revision 2387:56d1bbe28435
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_LIB_FILE
675ENABLE_LIBFFI_BUNDLING
676LIBFFI_LIBS
677LIBFFI_CFLAGS
678ALSA_LIBS
679ALSA_CFLAGS
680FREETYPE_BUNDLE_LIB_PATH
681FREETYPE_LIBS
682FREETYPE_CFLAGS
683CUPS_CFLAGS
684X_EXTRA_LIBS
685X_LIBS
686X_PRE_LIBS
687X_CFLAGS
688XMKMF
689MSVCP_DLL
690MSVCR_DLL
691LIBCXX
692FIXPATH_DETACH_FLAG
693FIXPATH
694BUILD_GTEST
695VALID_JVM_FEATURES
696JVM_FEATURES_custom
697JVM_FEATURES_zeroshark
698JVM_FEATURES_zero
699JVM_FEATURES_minimal
700JVM_FEATURES_core
701JVM_FEATURES_client
702JVM_FEATURES_server
703INCLUDE_DTRACE
704GCOV_ENABLED
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
794BUILD_AS
795BUILD_LDCXX
796BUILD_LD
797BUILD_STRIP
798BUILD_OBJCOPY
799BUILD_AR
800BUILD_NM
801BUILD_CXX
802BUILD_CC
803BUILD_SYSROOT_LDFLAGS
804BUILD_SYSROOT_CFLAGS
805ac_ct_OBJDUMP
806OBJDUMP
807ac_ct_OBJCOPY
808OBJCOPY
809ac_ct_NM
810ac_ct_STRIP
811GNM
812NM
813STRIP
814MSBUILD
815DUMPBIN
816RC
817MT
818LIPO
819ac_ct_AR
820AR
821AS
822LDCXX
823LD
824CXXCPP
825CPP
826CXX_VERSION_NUMBER
827CC_VERSION_NUMBER
828ac_ct_CXX
829CXXFLAGS
830CXX
831TOOLCHAIN_PATH_CXX
832POTENTIAL_CXX
833OBJEXT
834EXEEXT
835ac_ct_CC
836CPPFLAGS
837LDFLAGS
838CFLAGS
839CC
840TOOLCHAIN_PATH_CC
841POTENTIAL_CC
842TOOLCHAIN_VERSION
843VS_LIB
844VS_INCLUDE
845VS_PATH
846CYGWIN_LINK
847SYSROOT_LDFLAGS
848SYSROOT_CFLAGS
849EXTRA_LDFLAGS
850EXTRA_CXXFLAGS
851EXTRA_CFLAGS
852LEGACY_EXTRA_LDFLAGS
853LEGACY_EXTRA_CXXFLAGS
854LEGACY_EXTRA_CFLAGS
855EXE_SUFFIX
856OBJ_SUFFIX
857STATIC_LIBRARY
858SHARED_LIBRARY
859STATIC_LIBRARY_SUFFIX
860SHARED_LIBRARY_SUFFIX
861LIBRARY_PREFIX
862TOOLCHAIN_TYPE
863STATIC_BUILD
864IMPORT_MODULES_MAKE
865IMPORT_MODULES_SRC
866IMPORT_MODULES_MAN
867IMPORT_MODULES_LEGAL
868IMPORT_MODULES_CONF
869IMPORT_MODULES_LIBS
870IMPORT_MODULES_CMDS
871IMPORT_MODULES_CLASSES
872BUILD_OUTPUT
873JDK_TOPDIR
874NASHORN_TOPDIR
875HOTSPOT_TOPDIR
876JAXWS_TOPDIR
877JAXP_TOPDIR
878CORBA_TOPDIR
879LANGTOOLS_TOPDIR
880EXTERNAL_BUILDJDK
881BUILD_JDK
882CREATE_BUILDJDK
883JLINK
884JMOD
885BOOT_JDK_BITS
886JAVAC_FLAGS
887BOOT_JDK_MODULAR
888BOOT_JDK_SOURCETARGET
889JARSIGNER
890JAR
891JAVAH
892JAVAC
893JAVA
894BOOT_JDK
895JAVA_CHECK
896JAVAC_CHECK
897VERSION_IS_GA
898VERSION_SHORT
899VERSION_STRING
900VERSION_NUMBER_FOUR_POSITIONS
901VERSION_NUMBER
902VERSION_OPT
903VERSION_BUILD
904VERSION_PRE
905VERSION_PATCH
906VERSION_SECURITY
907VERSION_MINOR
908VERSION_MAJOR
909MACOSX_BUNDLE_ID_BASE
910MACOSX_BUNDLE_NAME_BASE
911HOTSPOT_VM_DISTRO
912COMPANY_NAME
913JDK_RC_PLATFORM_NAME
914PRODUCT_SUFFIX
915PRODUCT_NAME
916LAUNCHER_NAME
917JLINK_KEEP_PACKAGED_MODULES
918COPYRIGHT_YEAR
919COMPRESS_JARS
920INCLUDE_SA
921UNLIMITED_CRYPTO
922CACERTS_FILE
923ENABLE_HEADLESS_ONLY
924DEFAULT_MAKE_TARGET
925OS_VERSION_MICRO
926OS_VERSION_MINOR
927OS_VERSION_MAJOR
928PKG_CONFIG
929BASH_ARGS
930SETFILE
931CODESIGN
932XATTR
933DSYMUTIL
934IS_GNU_TIME
935PATCH
936DTRACE
937TIME
938STAT
939HG
940READELF
941OTOOL
942LDD
943ZIPEXE
944UNZIP
945TAR_SUPPORTS_TRANSFORM
946TAR_INCLUDE_PARAM
947TAR_CREATE_EXTRA_PARAM
948TAR_TYPE
949FIND_DELETE
950OUTPUT_SYNC
951OUTPUT_SYNC_SUPPORTED
952CHECK_TOOLSDIR_MAKE
953CHECK_TOOLSDIR_GMAKE
954CHECK_MAKE
955CHECK_GMAKE
956MAKE
957PKGHANDLER
958CONFIGURESUPPORT_OUTPUTDIR
959OUTPUT_ROOT
960CONF_NAME
961SPEC
962SDKROOT
963XCODEBUILD
964JVM_VARIANT_MAIN
965VALID_JVM_VARIANTS
966JVM_VARIANTS
967DEBUG_LEVEL
968HOTSPOT_DEBUG_LEVEL
969JDK_VARIANT
970USERNAME
971CANONICAL_TOPDIR
972ORIGINAL_TOPDIR
973TOPDIR
974PATH_SEP
975ZERO_ARCHDEF
976HOTSPOT_BUILD_CPU_DEFINE
977HOTSPOT_BUILD_CPU_ARCH
978HOTSPOT_BUILD_CPU
979HOTSPOT_BUILD_OS_TYPE
980HOTSPOT_BUILD_OS
981OPENJDK_BUILD_BUNDLE_PLATFORM
982OPENJDK_BUILD_CPU_BUNDLE
983OPENJDK_BUILD_OS_BUNDLE
984OPENJDK_BUILD_OS_EXPORT_DIR
985OPENJDK_BUILD_CPU_JLI_CFLAGS
986OPENJDK_BUILD_CPU_OSARCH
987OPENJDK_BUILD_CPU_ISADIR
988OPENJDK_BUILD_CPU_LIBDIR
989OPENJDK_BUILD_CPU_LEGACY_LIB
990OPENJDK_BUILD_CPU_LEGACY
991HOTSPOT_TARGET_CPU_DEFINE
992HOTSPOT_TARGET_CPU_ARCH
993HOTSPOT_TARGET_CPU
994HOTSPOT_TARGET_OS_TYPE
995HOTSPOT_TARGET_OS
996DEFINE_CROSS_COMPILE_ARCH
997LP64
998OPENJDK_TARGET_BUNDLE_PLATFORM
999OPENJDK_TARGET_CPU_BUNDLE
1000OPENJDK_TARGET_OS_BUNDLE
1001OPENJDK_TARGET_OS_EXPORT_DIR
1002OPENJDK_TARGET_CPU_JLI_CFLAGS
1003OPENJDK_TARGET_CPU_OSARCH
1004OPENJDK_TARGET_CPU_ISADIR
1005OPENJDK_TARGET_CPU_LIBDIR
1006OPENJDK_TARGET_CPU_LEGACY_LIB
1007OPENJDK_TARGET_CPU_LEGACY
1008REQUIRED_OS_VERSION
1009REQUIRED_OS_NAME
1010COMPILE_TYPE
1011OPENJDK_TARGET_CPU_ENDIAN
1012OPENJDK_TARGET_CPU_BITS
1013OPENJDK_TARGET_CPU_ARCH
1014OPENJDK_TARGET_CPU
1015OPENJDK_TARGET_OS_ENV
1016OPENJDK_TARGET_OS_TYPE
1017OPENJDK_TARGET_OS
1018OPENJDK_BUILD_CPU_ENDIAN
1019OPENJDK_BUILD_CPU_BITS
1020OPENJDK_BUILD_CPU_ARCH
1021OPENJDK_BUILD_CPU
1022OPENJDK_BUILD_OS_ENV
1023OPENJDK_BUILD_OS_TYPE
1024OPENJDK_BUILD_OS
1025OPENJDK_BUILD_AUTOCONF_NAME
1026OPENJDK_TARGET_AUTOCONF_NAME
1027target_os
1028target_vendor
1029target_cpu
1030target
1031host_os
1032host_vendor
1033host_cpu
1034host
1035build_os
1036build_vendor
1037build_cpu
1038build
1039NICE
1040CPIO
1041DF
1042READLINK
1043CYGPATH
1044SED
1045FGREP
1046EGREP
1047GREP
1048AWK
1049XARGS
1050WHICH
1051WC
1052UNIQ
1053UNAME
1054TR
1055TOUCH
1056TEE
1057TAR
1058TAIL
1059SORT
1060SH
1061RMDIR
1062RM
1063PRINTF
1064NAWK
1065MV
1066MKTEMP
1067MKDIR
1068LS
1069LN
1070GZIP
1071GUNZIP
1072HEAD
1073FIND
1074FILE
1075EXPR
1076ECHO
1077DIRNAME
1078DIFF
1079DATE
1080CUT
1081CP
1082COMM
1083CMP
1084CHMOD
1085CAT
1086BASH
1087BASENAME
1088DATE_WHEN_CONFIGURED
1089ORIGINAL_PATH
1090CONFIGURE_COMMAND_LINE
1091target_alias
1092host_alias
1093build_alias
1094LIBS
1095ECHO_T
1096ECHO_N
1097ECHO_C
1098DEFS
1099mandir
1100localedir
1101libdir
1102psdir
1103pdfdir
1104dvidir
1105htmldir
1106infodir
1107docdir
1108oldincludedir
1109includedir
1110localstatedir
1111sharedstatedir
1112sysconfdir
1113datadir
1114datarootdir
1115libexecdir
1116sbindir
1117bindir
1118program_transform_name
1119prefix
1120exec_prefix
1121PACKAGE_URL
1122PACKAGE_BUGREPORT
1123PACKAGE_STRING
1124PACKAGE_VERSION
1125PACKAGE_TARNAME
1126PACKAGE_NAME
1127PATH_SEPARATOR
1128SHELL'
1129ac_subst_files=''
1130ac_user_opts='
1131enable_option_checking
1132with_target_bits
1133enable_openjdk_only
1134with_custom_make_dir
1135with_jdk_variant
1136enable_debug
1137with_debug_level
1138with_jvm_variants
1139with_devkit
1140with_sys_root
1141with_sysroot
1142with_tools_dir
1143with_toolchain_path
1144with_extra_path
1145with_sdk_name
1146with_conf_name
1147with_output_sync
1148with_default_make_target
1149enable_headless_only
1150with_cacerts_file
1151enable_unlimited_crypto
1152with_copyright_year
1153enable_keep_packaged_modules
1154with_milestone
1155with_update_version
1156with_user_release_suffix
1157with_build_number
1158with_version_string
1159with_version_pre
1160with_version_opt
1161with_version_build
1162with_version_major
1163with_version_minor
1164with_version_security
1165with_version_patch
1166with_boot_jdk
1167with_build_jdk
1168with_add_source_root
1169with_override_source_root
1170with_adds_and_overrides
1171with_override_langtools
1172with_override_corba
1173with_override_jaxp
1174with_override_jaxws
1175with_override_hotspot
1176with_override_nashorn
1177with_override_jdk
1178with_import_hotspot
1179with_import_modules
1180enable_static_build
1181with_toolchain_type
1182with_extra_cflags
1183with_extra_cxxflags
1184with_extra_ldflags
1185with_toolchain_version
1186with_build_devkit
1187with_jtreg
1188enable_warnings_as_errors
1189with_native_debug_symbols
1190enable_debug_symbols
1191enable_zip_debug_info
1192enable_native_coverage
1193enable_dtrace
1194with_jvm_features
1195with_jvm_interpreter
1196enable_hotspot_gtest
1197with_stdc__lib
1198with_msvcr_dll
1199with_msvcp_dll
1200with_x
1201with_cups
1202with_cups_include
1203with_freetype
1204with_freetype_include
1205with_freetype_lib
1206with_freetype_src
1207enable_freetype_bundling
1208with_alsa
1209with_alsa_include
1210with_alsa_lib
1211with_libffi
1212with_libffi_include
1213with_libffi_lib
1214enable_libffi_bundling
1215with_libjpeg
1216with_giflib
1217with_libpng
1218with_zlib
1219with_lcms
1220with_dxsdk
1221with_dxsdk_lib
1222with_dxsdk_include
1223enable_jtreg_failure_handler
1224enable_generate_classlist
1225with_num_cores
1226with_memory_size
1227with_jobs
1228with_test_jobs
1229with_boot_jdk_jvmargs
1230with_sjavac_server_java
1231enable_sjavac
1232enable_javac_server
1233enable_icecc
1234enable_precompiled_headers
1235enable_ccache
1236with_ccache_dir
1237'
1238      ac_precious_vars='build_alias
1239host_alias
1240target_alias
1241BASENAME
1242BASH
1243CAT
1244CHMOD
1245CMP
1246COMM
1247CP
1248CUT
1249DATE
1250DIFF
1251DIRNAME
1252ECHO
1253EXPR
1254FILE
1255FIND
1256HEAD
1257GUNZIP
1258GZIP
1259LN
1260LS
1261MKDIR
1262MKTEMP
1263MV
1264NAWK
1265PRINTF
1266RM
1267RMDIR
1268SH
1269SORT
1270TAIL
1271TAR
1272TEE
1273TOUCH
1274TR
1275UNAME
1276UNIQ
1277WC
1278WHICH
1279XARGS
1280AWK
1281GREP
1282EGREP
1283FGREP
1284SED
1285CYGPATH
1286READLINK
1287DF
1288CPIO
1289NICE
1290MAKE
1291UNZIP
1292ZIPEXE
1293LDD
1294OTOOL
1295READELF
1296HG
1297STAT
1298TIME
1299DTRACE
1300PATCH
1301DSYMUTIL
1302XATTR
1303CODESIGN
1304SETFILE
1305PKG_CONFIG
1306JAVA
1307JAVAC
1308JAVAH
1309JAR
1310JARSIGNER
1311CC
1312CFLAGS
1313LDFLAGS
1314LIBS
1315CPPFLAGS
1316CXX
1317CXXFLAGS
1318CCC
1319CPP
1320CXXCPP
1321AS
1322AR
1323LIPO
1324STRIP
1325NM
1326GNM
1327OBJCOPY
1328OBJDUMP
1329BUILD_CC
1330BUILD_CXX
1331BUILD_NM
1332BUILD_AR
1333BUILD_OBJCOPY
1334BUILD_STRIP
1335JTREGEXE
1336XMKMF
1337FREETYPE_CFLAGS
1338FREETYPE_LIBS
1339ALSA_CFLAGS
1340ALSA_LIBS
1341LIBFFI_CFLAGS
1342LIBFFI_LIBS
1343PNG_CFLAGS
1344PNG_LIBS
1345LCMS_CFLAGS
1346LCMS_LIBS
1347ICECC_CMD
1348ICECC_CREATE_ENV
1349ICECC_WRAPPER
1350CCACHE'
1351
1352
1353# Initialize some variables set by options.
1354ac_init_help=
1355ac_init_version=false
1356ac_unrecognized_opts=
1357ac_unrecognized_sep=
1358# The variables have the same names as the options, with
1359# dashes changed to underlines.
1360cache_file=/dev/null
1361exec_prefix=NONE
1362no_create=
1363no_recursion=
1364prefix=NONE
1365program_prefix=NONE
1366program_suffix=NONE
1367program_transform_name=s,x,x,
1368silent=
1369site=
1370srcdir=
1371verbose=
1372x_includes=NONE
1373x_libraries=NONE
1374
1375# Installation directory options.
1376# These are left unexpanded so users can "make install exec_prefix=/foo"
1377# and all the variables that are supposed to be based on exec_prefix
1378# by default will actually change.
1379# Use braces instead of parens because sh, perl, etc. also accept them.
1380# (The list follows the same order as the GNU Coding Standards.)
1381bindir='${exec_prefix}/bin'
1382sbindir='${exec_prefix}/sbin'
1383libexecdir='${exec_prefix}/libexec'
1384datarootdir='${prefix}/share'
1385datadir='${datarootdir}'
1386sysconfdir='${prefix}/etc'
1387sharedstatedir='${prefix}/com'
1388localstatedir='${prefix}/var'
1389includedir='${prefix}/include'
1390oldincludedir='/usr/include'
1391docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1392infodir='${datarootdir}/info'
1393htmldir='${docdir}'
1394dvidir='${docdir}'
1395pdfdir='${docdir}'
1396psdir='${docdir}'
1397libdir='${exec_prefix}/lib'
1398localedir='${datarootdir}/locale'
1399mandir='${datarootdir}/man'
1400
1401ac_prev=
1402ac_dashdash=
1403for ac_option
1404do
1405  # If the previous option needs an argument, assign it.
1406  if test -n "$ac_prev"; then
1407    eval $ac_prev=\$ac_option
1408    ac_prev=
1409    continue
1410  fi
1411
1412  case $ac_option in
1413  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1414  *=)   ac_optarg= ;;
1415  *)    ac_optarg=yes ;;
1416  esac
1417
1418  # Accept the important Cygnus configure options, so we can diagnose typos.
1419
1420  case $ac_dashdash$ac_option in
1421  --)
1422    ac_dashdash=yes ;;
1423
1424  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1425    ac_prev=bindir ;;
1426  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1427    bindir=$ac_optarg ;;
1428
1429  -build | --build | --buil | --bui | --bu)
1430    ac_prev=build_alias ;;
1431  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1432    build_alias=$ac_optarg ;;
1433
1434  -cache-file | --cache-file | --cache-fil | --cache-fi \
1435  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1436    ac_prev=cache_file ;;
1437  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1438  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1439    cache_file=$ac_optarg ;;
1440
1441  --config-cache | -C)
1442    cache_file=config.cache ;;
1443
1444  -datadir | --datadir | --datadi | --datad)
1445    ac_prev=datadir ;;
1446  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1447    datadir=$ac_optarg ;;
1448
1449  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1450  | --dataroo | --dataro | --datar)
1451    ac_prev=datarootdir ;;
1452  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1453  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1454    datarootdir=$ac_optarg ;;
1455
1456  -disable-* | --disable-*)
1457    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1458    # Reject names that are not valid shell variable names.
1459    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1460      as_fn_error $? "invalid feature name: $ac_useropt"
1461    ac_useropt_orig=$ac_useropt
1462    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1463    case $ac_user_opts in
1464      *"
1465"enable_$ac_useropt"
1466"*) ;;
1467      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1468	 ac_unrecognized_sep=', ';;
1469    esac
1470    eval enable_$ac_useropt=no ;;
1471
1472  -docdir | --docdir | --docdi | --doc | --do)
1473    ac_prev=docdir ;;
1474  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1475    docdir=$ac_optarg ;;
1476
1477  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1478    ac_prev=dvidir ;;
1479  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1480    dvidir=$ac_optarg ;;
1481
1482  -enable-* | --enable-*)
1483    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1484    # Reject names that are not valid shell variable names.
1485    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1486      as_fn_error $? "invalid feature name: $ac_useropt"
1487    ac_useropt_orig=$ac_useropt
1488    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1489    case $ac_user_opts in
1490      *"
1491"enable_$ac_useropt"
1492"*) ;;
1493      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1494	 ac_unrecognized_sep=', ';;
1495    esac
1496    eval enable_$ac_useropt=\$ac_optarg ;;
1497
1498  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1499  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1500  | --exec | --exe | --ex)
1501    ac_prev=exec_prefix ;;
1502  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1503  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1504  | --exec=* | --exe=* | --ex=*)
1505    exec_prefix=$ac_optarg ;;
1506
1507  -gas | --gas | --ga | --g)
1508    # Obsolete; use --with-gas.
1509    with_gas=yes ;;
1510
1511  -help | --help | --hel | --he | -h)
1512    ac_init_help=long ;;
1513  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1514    ac_init_help=recursive ;;
1515  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1516    ac_init_help=short ;;
1517
1518  -host | --host | --hos | --ho)
1519    ac_prev=host_alias ;;
1520  -host=* | --host=* | --hos=* | --ho=*)
1521    host_alias=$ac_optarg ;;
1522
1523  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1524    ac_prev=htmldir ;;
1525  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1526  | --ht=*)
1527    htmldir=$ac_optarg ;;
1528
1529  -includedir | --includedir | --includedi | --included | --include \
1530  | --includ | --inclu | --incl | --inc)
1531    ac_prev=includedir ;;
1532  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1533  | --includ=* | --inclu=* | --incl=* | --inc=*)
1534    includedir=$ac_optarg ;;
1535
1536  -infodir | --infodir | --infodi | --infod | --info | --inf)
1537    ac_prev=infodir ;;
1538  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1539    infodir=$ac_optarg ;;
1540
1541  -libdir | --libdir | --libdi | --libd)
1542    ac_prev=libdir ;;
1543  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1544    libdir=$ac_optarg ;;
1545
1546  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1547  | --libexe | --libex | --libe)
1548    ac_prev=libexecdir ;;
1549  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1550  | --libexe=* | --libex=* | --libe=*)
1551    libexecdir=$ac_optarg ;;
1552
1553  -localedir | --localedir | --localedi | --localed | --locale)
1554    ac_prev=localedir ;;
1555  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1556    localedir=$ac_optarg ;;
1557
1558  -localstatedir | --localstatedir | --localstatedi | --localstated \
1559  | --localstate | --localstat | --localsta | --localst | --locals)
1560    ac_prev=localstatedir ;;
1561  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1562  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1563    localstatedir=$ac_optarg ;;
1564
1565  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1566    ac_prev=mandir ;;
1567  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1568    mandir=$ac_optarg ;;
1569
1570  -nfp | --nfp | --nf)
1571    # Obsolete; use --without-fp.
1572    with_fp=no ;;
1573
1574  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1575  | --no-cr | --no-c | -n)
1576    no_create=yes ;;
1577
1578  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1579  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1580    no_recursion=yes ;;
1581
1582  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1583  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1584  | --oldin | --oldi | --old | --ol | --o)
1585    ac_prev=oldincludedir ;;
1586  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1587  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1588  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1589    oldincludedir=$ac_optarg ;;
1590
1591  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1592    ac_prev=prefix ;;
1593  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1594    prefix=$ac_optarg ;;
1595
1596  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1597  | --program-pre | --program-pr | --program-p)
1598    ac_prev=program_prefix ;;
1599  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1600  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1601    program_prefix=$ac_optarg ;;
1602
1603  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1604  | --program-suf | --program-su | --program-s)
1605    ac_prev=program_suffix ;;
1606  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1607  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1608    program_suffix=$ac_optarg ;;
1609
1610  -program-transform-name | --program-transform-name \
1611  | --program-transform-nam | --program-transform-na \
1612  | --program-transform-n | --program-transform- \
1613  | --program-transform | --program-transfor \
1614  | --program-transfo | --program-transf \
1615  | --program-trans | --program-tran \
1616  | --progr-tra | --program-tr | --program-t)
1617    ac_prev=program_transform_name ;;
1618  -program-transform-name=* | --program-transform-name=* \
1619  | --program-transform-nam=* | --program-transform-na=* \
1620  | --program-transform-n=* | --program-transform-=* \
1621  | --program-transform=* | --program-transfor=* \
1622  | --program-transfo=* | --program-transf=* \
1623  | --program-trans=* | --program-tran=* \
1624  | --progr-tra=* | --program-tr=* | --program-t=*)
1625    program_transform_name=$ac_optarg ;;
1626
1627  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1628    ac_prev=pdfdir ;;
1629  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1630    pdfdir=$ac_optarg ;;
1631
1632  -psdir | --psdir | --psdi | --psd | --ps)
1633    ac_prev=psdir ;;
1634  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1635    psdir=$ac_optarg ;;
1636
1637  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1638  | -silent | --silent | --silen | --sile | --sil)
1639    silent=yes ;;
1640
1641  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1642    ac_prev=sbindir ;;
1643  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1644  | --sbi=* | --sb=*)
1645    sbindir=$ac_optarg ;;
1646
1647  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1648  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1649  | --sharedst | --shareds | --shared | --share | --shar \
1650  | --sha | --sh)
1651    ac_prev=sharedstatedir ;;
1652  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1653  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1654  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1655  | --sha=* | --sh=*)
1656    sharedstatedir=$ac_optarg ;;
1657
1658  -site | --site | --sit)
1659    ac_prev=site ;;
1660  -site=* | --site=* | --sit=*)
1661    site=$ac_optarg ;;
1662
1663  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1664    ac_prev=srcdir ;;
1665  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1666    srcdir=$ac_optarg ;;
1667
1668  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1669  | --syscon | --sysco | --sysc | --sys | --sy)
1670    ac_prev=sysconfdir ;;
1671  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1672  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1673    sysconfdir=$ac_optarg ;;
1674
1675  -target | --target | --targe | --targ | --tar | --ta | --t)
1676    ac_prev=target_alias ;;
1677  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1678    target_alias=$ac_optarg ;;
1679
1680  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1681    verbose=yes ;;
1682
1683  -version | --version | --versio | --versi | --vers | -V)
1684    ac_init_version=: ;;
1685
1686  -with-* | --with-*)
1687    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1688    # Reject names that are not valid shell variable names.
1689    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1690      as_fn_error $? "invalid package name: $ac_useropt"
1691    ac_useropt_orig=$ac_useropt
1692    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1693    case $ac_user_opts in
1694      *"
1695"with_$ac_useropt"
1696"*) ;;
1697      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1698	 ac_unrecognized_sep=', ';;
1699    esac
1700    eval with_$ac_useropt=\$ac_optarg ;;
1701
1702  -without-* | --without-*)
1703    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1704    # Reject names that are not valid shell variable names.
1705    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1706      as_fn_error $? "invalid package name: $ac_useropt"
1707    ac_useropt_orig=$ac_useropt
1708    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1709    case $ac_user_opts in
1710      *"
1711"with_$ac_useropt"
1712"*) ;;
1713      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1714	 ac_unrecognized_sep=', ';;
1715    esac
1716    eval with_$ac_useropt=no ;;
1717
1718  --x)
1719    # Obsolete; use --with-x.
1720    with_x=yes ;;
1721
1722  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1723  | --x-incl | --x-inc | --x-in | --x-i)
1724    ac_prev=x_includes ;;
1725  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1726  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1727    x_includes=$ac_optarg ;;
1728
1729  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1730  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1731    ac_prev=x_libraries ;;
1732  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1733  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1734    x_libraries=$ac_optarg ;;
1735
1736  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1737Try \`$0 --help' for more information"
1738    ;;
1739
1740  *=*)
1741    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1742    # Reject names that are not valid shell variable names.
1743    case $ac_envvar in #(
1744      '' | [0-9]* | *[!_$as_cr_alnum]* )
1745      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1746    esac
1747    eval $ac_envvar=\$ac_optarg
1748    export $ac_envvar ;;
1749
1750  *)
1751    # FIXME: should be removed in autoconf 3.0.
1752    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1753    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1754      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1755    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1756    ;;
1757
1758  esac
1759done
1760
1761if test -n "$ac_prev"; then
1762  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1763  as_fn_error $? "missing argument to $ac_option"
1764fi
1765
1766if test -n "$ac_unrecognized_opts"; then
1767  case $enable_option_checking in
1768    no) ;;
1769    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1770    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1771  esac
1772fi
1773
1774# Check all directory arguments for consistency.
1775for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1776		datadir sysconfdir sharedstatedir localstatedir includedir \
1777		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1778		libdir localedir mandir
1779do
1780  eval ac_val=\$$ac_var
1781  # Remove trailing slashes.
1782  case $ac_val in
1783    */ )
1784      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1785      eval $ac_var=\$ac_val;;
1786  esac
1787  # Be sure to have absolute directory names.
1788  case $ac_val in
1789    [\\/$]* | ?:[\\/]* )  continue;;
1790    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1791  esac
1792  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1793done
1794
1795# There might be people who depend on the old broken behavior: `$host'
1796# used to hold the argument of --host etc.
1797# FIXME: To remove some day.
1798build=$build_alias
1799host=$host_alias
1800target=$target_alias
1801
1802# FIXME: To remove some day.
1803if test "x$host_alias" != x; then
1804  if test "x$build_alias" = x; then
1805    cross_compiling=maybe
1806  elif test "x$build_alias" != "x$host_alias"; then
1807    cross_compiling=yes
1808  fi
1809fi
1810
1811ac_tool_prefix=
1812test -n "$host_alias" && ac_tool_prefix=$host_alias-
1813
1814test "$silent" = yes && exec 6>/dev/null
1815
1816
1817ac_pwd=`pwd` && test -n "$ac_pwd" &&
1818ac_ls_di=`ls -di .` &&
1819ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1820  as_fn_error $? "working directory cannot be determined"
1821test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1822  as_fn_error $? "pwd does not report name of working directory"
1823
1824
1825# Find the source files, if location was not specified.
1826if test -z "$srcdir"; then
1827  ac_srcdir_defaulted=yes
1828  # Try the directory containing this script, then the parent directory.
1829  ac_confdir=`$as_dirname -- "$as_myself" ||
1830$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1831	 X"$as_myself" : 'X\(//\)[^/]' \| \
1832	 X"$as_myself" : 'X\(//\)$' \| \
1833	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1834$as_echo X"$as_myself" |
1835    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1836	    s//\1/
1837	    q
1838	  }
1839	  /^X\(\/\/\)[^/].*/{
1840	    s//\1/
1841	    q
1842	  }
1843	  /^X\(\/\/\)$/{
1844	    s//\1/
1845	    q
1846	  }
1847	  /^X\(\/\).*/{
1848	    s//\1/
1849	    q
1850	  }
1851	  s/.*/./; q'`
1852  srcdir=$ac_confdir
1853  if test ! -r "$srcdir/$ac_unique_file"; then
1854    srcdir=..
1855  fi
1856else
1857  ac_srcdir_defaulted=no
1858fi
1859if test ! -r "$srcdir/$ac_unique_file"; then
1860  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1861  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1862fi
1863ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1864ac_abs_confdir=`(
1865	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1866	pwd)`
1867# When building in place, set srcdir=.
1868if test "$ac_abs_confdir" = "$ac_pwd"; then
1869  srcdir=.
1870fi
1871# Remove unnecessary trailing slashes from srcdir.
1872# Double slashes in file names in object file debugging info
1873# mess up M-x gdb in Emacs.
1874case $srcdir in
1875*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1876esac
1877for ac_var in $ac_precious_vars; do
1878  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1879  eval ac_env_${ac_var}_value=\$${ac_var}
1880  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1881  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1882done
1883
1884#
1885# Report the --help message.
1886#
1887if test "$ac_init_help" = "long"; then
1888  # Omit some internal or obsolete options to make the list less imposing.
1889  # This message is too long to be a string in the A/UX 3.1 sh.
1890  cat <<_ACEOF
1891\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1892
1893Usage: $0 [OPTION]... [VAR=VALUE]...
1894
1895To assign environment variables (e.g., CC, CFLAGS...), specify them as
1896VAR=VALUE.  See below for descriptions of some of the useful variables.
1897
1898Defaults for the options are specified in brackets.
1899
1900Configuration:
1901  -h, --help              display this help and exit
1902      --help=short        display options specific to this package
1903      --help=recursive    display the short help of all the included packages
1904  -V, --version           display version information and exit
1905  -q, --quiet, --silent   do not print \`checking ...' messages
1906      --cache-file=FILE   cache test results in FILE [disabled]
1907  -C, --config-cache      alias for \`--cache-file=config.cache'
1908  -n, --no-create         do not create output files
1909      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1910
1911Installation directories:
1912  --prefix=PREFIX         install architecture-independent files in PREFIX
1913                          [$ac_default_prefix]
1914  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1915                          [PREFIX]
1916
1917By default, \`make install' will install all the files in
1918\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1919an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1920for instance \`--prefix=\$HOME'.
1921
1922For better control, use the options below.
1923
1924Fine tuning of the installation directories:
1925  --bindir=DIR            user executables [EPREFIX/bin]
1926  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1927  --libexecdir=DIR        program executables [EPREFIX/libexec]
1928  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1929  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1930  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1931  --libdir=DIR            object code libraries [EPREFIX/lib]
1932  --includedir=DIR        C header files [PREFIX/include]
1933  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1934  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1935  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1936  --infodir=DIR           info documentation [DATAROOTDIR/info]
1937  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1938  --mandir=DIR            man documentation [DATAROOTDIR/man]
1939  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1940  --htmldir=DIR           html documentation [DOCDIR]
1941  --dvidir=DIR            dvi documentation [DOCDIR]
1942  --pdfdir=DIR            pdf documentation [DOCDIR]
1943  --psdir=DIR             ps documentation [DOCDIR]
1944_ACEOF
1945
1946  cat <<\_ACEOF
1947
1948X features:
1949  --x-includes=DIR    X include files are in DIR
1950  --x-libraries=DIR   X library files are in DIR
1951
1952System types:
1953  --build=BUILD     configure for building on BUILD [guessed]
1954  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1955  --target=TARGET   configure for building compilers for TARGET [HOST]
1956_ACEOF
1957fi
1958
1959if test -n "$ac_init_help"; then
1960  case $ac_init_help in
1961     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1962   esac
1963  cat <<\_ACEOF
1964
1965Optional Features:
1966  --disable-option-checking  ignore unrecognized --enable/--with options
1967  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1968  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1969  --enable-openjdk-only   suppress building custom source even if present
1970                          [disabled]
1971  --enable-debug          set the debug level to fastdebug (shorthand for
1972                          --with-debug-level=fastdebug) [disabled]
1973  --enable-headless-only  only build headless (no GUI) support [disabled]
1974  --disable-unlimited-crypto
1975                          Disable unlimited crypto policy [enabled]
1976  --disable-keep-packaged-modules
1977                          Do not keep packaged modules in jdk image [enable]
1978  --enable-static-build   enable static library build [disabled]
1979  --disable-warnings-as-errors
1980                          do not consider native warnings to be an error
1981                          [enabled]
1982  --enable-debug-symbols  Deprecated. Option is kept for backwards
1983                          compatibility and is ignored
1984  --enable-zip-debug-info Deprecated. Option is kept for backwards
1985                          compatibility and is ignored
1986  --enable-native-coverage
1987                          enable native compilation with code coverage
1988                          data[disabled]
1989  --enable-dtrace[=yes/no/auto]
1990                          enable dtrace. Default is auto, where dtrace is
1991                          enabled if all dependencies are present.
1992  --disable-hotspot-gtest Disables building of the Hotspot unit tests
1993  --disable-freetype-bundling
1994                          disable bundling of the freetype library with the
1995                          build result [enabled on Windows or when using
1996                          --with-freetype, disabled otherwise]
1997  --enable-libffi-bundling
1998                          enable bundling of libffi.so to make the built JDK
1999                          runnable on more systems
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   Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-import-modules   import a set of prebuilt modules either as a zip
2104                          file or an exploded directory
2105  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2106                          to show possible values [platform dependent]
2107  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2108  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2109  --with-extra-ldflags    extra flags to be used when linking jdk
2110  --with-toolchain-version
2111                          the version of the toolchain to look for, use
2112                          '--help' to show possible values [platform
2113                          dependent]
2114  --with-build-devkit     Devkit to use for the build platform toolchain
2115  --with-jtreg            Regression Test Harness [probed]
2116  --with-native-debug-symbols
2117                          set the native debug symbol configuration (none,
2118                          internal, external, zipped) [varying]
2119  --with-jvm-features     additional JVM features to enable (separated by
2120                          comma), use '--help' to show possible values [none]
2121  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2122                          compatibility and is ignored
2123  --with-stdc++lib=<static>,<dynamic>,<default>
2124                          force linking of the C++ runtime on Linux to either
2125                          static or dynamic, default is static with dynamic as
2126                          fallback
2127  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2128                          (Windows only) [probed]
2129  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2130                          (Windows only) [probed]
2131  --with-x                use the X Window System
2132  --with-cups             specify prefix directory for the cups package
2133                          (expecting the headers under PATH/include)
2134  --with-cups-include     specify directory for the cups include files
2135  --with-freetype         specify prefix directory for the freetype package
2136                          (expecting the libraries under PATH/lib and the
2137                          headers under PATH/include)
2138  --with-freetype-include specify directory for the freetype include files
2139  --with-freetype-lib     specify directory for the freetype library
2140  --with-freetype-src     specify directory with freetype sources to
2141                          automatically build the library (experimental,
2142                          Windows-only)
2143  --with-alsa             specify prefix directory for the alsa package
2144                          (expecting the libraries under PATH/lib and the
2145                          headers under PATH/include)
2146  --with-alsa-include     specify directory for the alsa include files
2147  --with-alsa-lib         specify directory for the alsa library
2148  --with-libffi           specify prefix directory for the libffi package
2149                          (expecting the libraries under PATH/lib and the
2150                          headers under PATH/include)
2151  --with-libffi-include   specify directory for the libffi include files
2152  --with-libffi-lib       specify directory for the libffi library
2153  --with-libjpeg          use libjpeg from build system or OpenJDK source
2154                          (system, bundled) [bundled]
2155  --with-giflib           use giflib from build system or OpenJDK source
2156                          (system, bundled) [bundled]
2157  --with-libpng           use libpng from build system or OpenJDK source
2158                          (system, bundled) [bundled]
2159  --with-zlib             use zlib from build system or OpenJDK source
2160                          (system, bundled) [bundled]
2161  --with-lcms             use lcms2 from build system or OpenJDK source
2162                          (system, bundled) [bundled]
2163  --with-dxsdk            Deprecated. Option is kept for backwards
2164                          compatibility and is ignored
2165  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2166                          compatibility and is ignored
2167  --with-dxsdk-include    Deprecated. Option is kept for backwards
2168                          compatibility and is ignored
2169  --with-num-cores        number of cores in the build system, e.g.
2170                          --with-num-cores=8 [probed]
2171  --with-memory-size      memory (in MB) available in the build system, e.g.
2172                          --with-memory-size=1024 [probed]
2173  --with-jobs             number of parallel jobs to let make run [calculated
2174                          based on cores and memory]
2175  --with-test-jobs        number of parallel tests jobs to run [based on build
2176                          jobs]
2177  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2178                          invocations of boot JDK, overriding the default
2179                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2180                          -enableassertions"
2181  --with-sjavac-server-java
2182                          use this java binary for running the sjavac
2183                          background server [Boot JDK java]
2184  --with-ccache-dir       where to store ccache files [~/.ccache]
2185
2186Some influential environment variables:
2187  BASENAME    Override default value for BASENAME
2188  BASH        Override default value for BASH
2189  CAT         Override default value for CAT
2190  CHMOD       Override default value for CHMOD
2191  CMP         Override default value for CMP
2192  COMM        Override default value for COMM
2193  CP          Override default value for CP
2194  CUT         Override default value for CUT
2195  DATE        Override default value for DATE
2196  DIFF        Override default value for DIFF
2197  DIRNAME     Override default value for DIRNAME
2198  ECHO        Override default value for ECHO
2199  EXPR        Override default value for EXPR
2200  FILE        Override default value for FILE
2201  FIND        Override default value for FIND
2202  HEAD        Override default value for HEAD
2203  GUNZIP      Override default value for GUNZIP
2204  GZIP        Override default value for GZIP
2205  LN          Override default value for LN
2206  LS          Override default value for LS
2207  MKDIR       Override default value for MKDIR
2208  MKTEMP      Override default value for MKTEMP
2209  MV          Override default value for MV
2210  NAWK        Override default value for NAWK
2211  PRINTF      Override default value for PRINTF
2212  RM          Override default value for RM
2213  RMDIR       Override default value for RMDIR
2214  SH          Override default value for SH
2215  SORT        Override default value for SORT
2216  TAIL        Override default value for TAIL
2217  TAR         Override default value for TAR
2218  TEE         Override default value for TEE
2219  TOUCH       Override default value for TOUCH
2220  TR          Override default value for TR
2221  UNAME       Override default value for UNAME
2222  UNIQ        Override default value for UNIQ
2223  WC          Override default value for WC
2224  WHICH       Override default value for WHICH
2225  XARGS       Override default value for XARGS
2226  AWK         Override default value for AWK
2227  GREP        Override default value for GREP
2228  EGREP       Override default value for EGREP
2229  FGREP       Override default value for FGREP
2230  SED         Override default value for SED
2231  CYGPATH     Override default value for CYGPATH
2232  READLINK    Override default value for READLINK
2233  DF          Override default value for DF
2234  CPIO        Override default value for CPIO
2235  NICE        Override default value for NICE
2236  MAKE        Override default value for MAKE
2237  UNZIP       Override default value for UNZIP
2238  ZIPEXE      Override default value for ZIPEXE
2239  LDD         Override default value for LDD
2240  OTOOL       Override default value for OTOOL
2241  READELF     Override default value for READELF
2242  HG          Override default value for HG
2243  STAT        Override default value for STAT
2244  TIME        Override default value for TIME
2245  DTRACE      Override default value for DTRACE
2246  PATCH       Override default value for PATCH
2247  DSYMUTIL    Override default value for DSYMUTIL
2248  XATTR       Override default value for XATTR
2249  CODESIGN    Override default value for CODESIGN
2250  SETFILE     Override default value for SETFILE
2251  PKG_CONFIG  path to pkg-config utility
2252  JAVA        Override default value for JAVA
2253  JAVAC       Override default value for JAVAC
2254  JAVAH       Override default value for JAVAH
2255  JAR         Override default value for JAR
2256  JARSIGNER   Override default value for JARSIGNER
2257  CC          C compiler command
2258  CFLAGS      C compiler flags
2259  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2260              nonstandard directory <lib dir>
2261  LIBS        libraries to pass to the linker, e.g. -l<library>
2262  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2263              you have headers in a nonstandard directory <include dir>
2264  CXX         C++ compiler command
2265  CXXFLAGS    C++ compiler flags
2266  CPP         C preprocessor
2267  CXXCPP      C++ preprocessor
2268  AS          Override default value for AS
2269  AR          Override default value for AR
2270  LIPO        Override default value for LIPO
2271  STRIP       Override default value for STRIP
2272  NM          Override default value for NM
2273  GNM         Override default value for GNM
2274  OBJCOPY     Override default value for OBJCOPY
2275  OBJDUMP     Override default value for OBJDUMP
2276  BUILD_CC    Override default value for BUILD_CC
2277  BUILD_CXX   Override default value for BUILD_CXX
2278  BUILD_NM    Override default value for BUILD_NM
2279  BUILD_AR    Override default value for BUILD_AR
2280  BUILD_OBJCOPY
2281              Override default value for BUILD_OBJCOPY
2282  BUILD_STRIP Override default value for BUILD_STRIP
2283  JTREGEXE    Override default value for JTREGEXE
2284  XMKMF       Path to xmkmf, Makefile generator for X Window System
2285  FREETYPE_CFLAGS
2286              C compiler flags for FREETYPE, overriding pkg-config
2287  FREETYPE_LIBS
2288              linker flags for FREETYPE, overriding pkg-config
2289  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2290  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2291  LIBFFI_CFLAGS
2292              C compiler flags for LIBFFI, overriding pkg-config
2293  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2294  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2295  PNG_LIBS    linker flags for PNG, overriding pkg-config
2296  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2297  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2298  ICECC_CMD   Override default value for ICECC_CMD
2299  ICECC_CREATE_ENV
2300              Override default value for ICECC_CREATE_ENV
2301  ICECC_WRAPPER
2302              Override default value for ICECC_WRAPPER
2303  CCACHE      Override default value for CCACHE
2304
2305Use these variables to override the choices made by `configure' or to help
2306it to find libraries and programs with nonstandard names/locations.
2307
2308Report bugs to <build-dev@openjdk.java.net>.
2309OpenJDK home page: <http://openjdk.java.net>.
2310_ACEOF
2311ac_status=$?
2312fi
2313
2314if test "$ac_init_help" = "recursive"; then
2315  # If there are subdirs, report their specific --help.
2316  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2317    test -d "$ac_dir" ||
2318      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2319      continue
2320    ac_builddir=.
2321
2322case "$ac_dir" in
2323.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2324*)
2325  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2326  # A ".." for each directory in $ac_dir_suffix.
2327  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2328  case $ac_top_builddir_sub in
2329  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2330  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2331  esac ;;
2332esac
2333ac_abs_top_builddir=$ac_pwd
2334ac_abs_builddir=$ac_pwd$ac_dir_suffix
2335# for backward compatibility:
2336ac_top_builddir=$ac_top_build_prefix
2337
2338case $srcdir in
2339  .)  # We are building in place.
2340    ac_srcdir=.
2341    ac_top_srcdir=$ac_top_builddir_sub
2342    ac_abs_top_srcdir=$ac_pwd ;;
2343  [\\/]* | ?:[\\/]* )  # Absolute name.
2344    ac_srcdir=$srcdir$ac_dir_suffix;
2345    ac_top_srcdir=$srcdir
2346    ac_abs_top_srcdir=$srcdir ;;
2347  *) # Relative name.
2348    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2349    ac_top_srcdir=$ac_top_build_prefix$srcdir
2350    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2351esac
2352ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2353
2354    cd "$ac_dir" || { ac_status=$?; continue; }
2355    # Check for guested configure.
2356    if test -f "$ac_srcdir/configure.gnu"; then
2357      echo &&
2358      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2359    elif test -f "$ac_srcdir/configure"; then
2360      echo &&
2361      $SHELL "$ac_srcdir/configure" --help=recursive
2362    else
2363      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2364    fi || ac_status=$?
2365    cd "$ac_pwd" || { ac_status=$?; break; }
2366  done
2367fi
2368
2369test -n "$ac_init_help" && exit $ac_status
2370if $ac_init_version; then
2371  cat <<\_ACEOF
2372OpenJDK configure jdk9
2373generated by GNU Autoconf 2.69
2374
2375Copyright (C) 2012 Free Software Foundation, Inc.
2376This configure script is free software; the Free Software Foundation
2377gives unlimited permission to copy, distribute and modify it.
2378_ACEOF
2379  exit
2380fi
2381
2382## ------------------------ ##
2383## Autoconf initialization. ##
2384## ------------------------ ##
2385
2386# ac_fn_c_try_compile LINENO
2387# --------------------------
2388# Try to compile conftest.$ac_ext, and return whether this succeeded.
2389ac_fn_c_try_compile ()
2390{
2391  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2392  rm -f conftest.$ac_objext
2393  if { { ac_try="$ac_compile"
2394case "(($ac_try" in
2395  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2396  *) ac_try_echo=$ac_try;;
2397esac
2398eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2399$as_echo "$ac_try_echo"; } >&5
2400  (eval "$ac_compile") 2>conftest.err
2401  ac_status=$?
2402  if test -s conftest.err; then
2403    grep -v '^ *+' conftest.err >conftest.er1
2404    cat conftest.er1 >&5
2405    mv -f conftest.er1 conftest.err
2406  fi
2407  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2408  test $ac_status = 0; } && {
2409	 test -z "$ac_c_werror_flag" ||
2410	 test ! -s conftest.err
2411       } && test -s conftest.$ac_objext; then :
2412  ac_retval=0
2413else
2414  $as_echo "$as_me: failed program was:" >&5
2415sed 's/^/| /' conftest.$ac_ext >&5
2416
2417	ac_retval=1
2418fi
2419  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2420  as_fn_set_status $ac_retval
2421
2422} # ac_fn_c_try_compile
2423
2424# ac_fn_cxx_try_compile LINENO
2425# ----------------------------
2426# Try to compile conftest.$ac_ext, and return whether this succeeded.
2427ac_fn_cxx_try_compile ()
2428{
2429  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2430  rm -f conftest.$ac_objext
2431  if { { ac_try="$ac_compile"
2432case "(($ac_try" in
2433  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2434  *) ac_try_echo=$ac_try;;
2435esac
2436eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2437$as_echo "$ac_try_echo"; } >&5
2438  (eval "$ac_compile") 2>conftest.err
2439  ac_status=$?
2440  if test -s conftest.err; then
2441    grep -v '^ *+' conftest.err >conftest.er1
2442    cat conftest.er1 >&5
2443    mv -f conftest.er1 conftest.err
2444  fi
2445  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2446  test $ac_status = 0; } && {
2447	 test -z "$ac_cxx_werror_flag" ||
2448	 test ! -s conftest.err
2449       } && test -s conftest.$ac_objext; then :
2450  ac_retval=0
2451else
2452  $as_echo "$as_me: failed program was:" >&5
2453sed 's/^/| /' conftest.$ac_ext >&5
2454
2455	ac_retval=1
2456fi
2457  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2458  as_fn_set_status $ac_retval
2459
2460} # ac_fn_cxx_try_compile
2461
2462# ac_fn_c_try_cpp LINENO
2463# ----------------------
2464# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2465ac_fn_c_try_cpp ()
2466{
2467  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2468  if { { ac_try="$ac_cpp conftest.$ac_ext"
2469case "(($ac_try" in
2470  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2471  *) ac_try_echo=$ac_try;;
2472esac
2473eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2474$as_echo "$ac_try_echo"; } >&5
2475  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2476  ac_status=$?
2477  if test -s conftest.err; then
2478    grep -v '^ *+' conftest.err >conftest.er1
2479    cat conftest.er1 >&5
2480    mv -f conftest.er1 conftest.err
2481  fi
2482  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2483  test $ac_status = 0; } > conftest.i && {
2484	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2485	 test ! -s conftest.err
2486       }; then :
2487  ac_retval=0
2488else
2489  $as_echo "$as_me: failed program was:" >&5
2490sed 's/^/| /' conftest.$ac_ext >&5
2491
2492    ac_retval=1
2493fi
2494  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2495  as_fn_set_status $ac_retval
2496
2497} # ac_fn_c_try_cpp
2498
2499# ac_fn_cxx_try_cpp LINENO
2500# ------------------------
2501# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2502ac_fn_cxx_try_cpp ()
2503{
2504  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2505  if { { ac_try="$ac_cpp conftest.$ac_ext"
2506case "(($ac_try" in
2507  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2508  *) ac_try_echo=$ac_try;;
2509esac
2510eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2511$as_echo "$ac_try_echo"; } >&5
2512  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2513  ac_status=$?
2514  if test -s conftest.err; then
2515    grep -v '^ *+' conftest.err >conftest.er1
2516    cat conftest.er1 >&5
2517    mv -f conftest.er1 conftest.err
2518  fi
2519  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2520  test $ac_status = 0; } > conftest.i && {
2521	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2522	 test ! -s conftest.err
2523       }; then :
2524  ac_retval=0
2525else
2526  $as_echo "$as_me: failed program was:" >&5
2527sed 's/^/| /' conftest.$ac_ext >&5
2528
2529    ac_retval=1
2530fi
2531  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2532  as_fn_set_status $ac_retval
2533
2534} # ac_fn_cxx_try_cpp
2535
2536# ac_fn_c_try_link LINENO
2537# -----------------------
2538# Try to link conftest.$ac_ext, and return whether this succeeded.
2539ac_fn_c_try_link ()
2540{
2541  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2542  rm -f conftest.$ac_objext conftest$ac_exeext
2543  if { { ac_try="$ac_link"
2544case "(($ac_try" in
2545  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2546  *) ac_try_echo=$ac_try;;
2547esac
2548eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2549$as_echo "$ac_try_echo"; } >&5
2550  (eval "$ac_link") 2>conftest.err
2551  ac_status=$?
2552  if test -s conftest.err; then
2553    grep -v '^ *+' conftest.err >conftest.er1
2554    cat conftest.er1 >&5
2555    mv -f conftest.er1 conftest.err
2556  fi
2557  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2558  test $ac_status = 0; } && {
2559	 test -z "$ac_c_werror_flag" ||
2560	 test ! -s conftest.err
2561       } && test -s conftest$ac_exeext && {
2562	 test "$cross_compiling" = yes ||
2563	 test -x conftest$ac_exeext
2564       }; then :
2565  ac_retval=0
2566else
2567  $as_echo "$as_me: failed program was:" >&5
2568sed 's/^/| /' conftest.$ac_ext >&5
2569
2570	ac_retval=1
2571fi
2572  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2573  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2574  # interfere with the next link command; also delete a directory that is
2575  # left behind by Apple's compiler.  We do this before executing the actions.
2576  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2577  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2578  as_fn_set_status $ac_retval
2579
2580} # ac_fn_c_try_link
2581
2582# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2583# ---------------------------------------------------------
2584# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2585# the include files in INCLUDES and setting the cache variable VAR
2586# accordingly.
2587ac_fn_cxx_check_header_mongrel ()
2588{
2589  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2590  if eval \${$3+:} false; then :
2591  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2592$as_echo_n "checking for $2... " >&6; }
2593if eval \${$3+:} false; then :
2594  $as_echo_n "(cached) " >&6
2595fi
2596eval ac_res=\$$3
2597	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2598$as_echo "$ac_res" >&6; }
2599else
2600  # Is the header compilable?
2601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2602$as_echo_n "checking $2 usability... " >&6; }
2603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2604/* end confdefs.h.  */
2605$4
2606#include <$2>
2607_ACEOF
2608if ac_fn_cxx_try_compile "$LINENO"; then :
2609  ac_header_compiler=yes
2610else
2611  ac_header_compiler=no
2612fi
2613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2615$as_echo "$ac_header_compiler" >&6; }
2616
2617# Is the header present?
2618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2619$as_echo_n "checking $2 presence... " >&6; }
2620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2621/* end confdefs.h.  */
2622#include <$2>
2623_ACEOF
2624if ac_fn_cxx_try_cpp "$LINENO"; then :
2625  ac_header_preproc=yes
2626else
2627  ac_header_preproc=no
2628fi
2629rm -f conftest.err conftest.i conftest.$ac_ext
2630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2631$as_echo "$ac_header_preproc" >&6; }
2632
2633# So?  What about this header?
2634case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2635  yes:no: )
2636    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2637$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2638    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2639$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2640    ;;
2641  no:yes:* )
2642    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2643$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2644    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2645$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2646    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2647$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2648    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2649$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2650    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2651$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2652( $as_echo "## ----------------------------------------- ##
2653## Report this to build-dev@openjdk.java.net ##
2654## ----------------------------------------- ##"
2655     ) | sed "s/^/$as_me: WARNING:     /" >&2
2656    ;;
2657esac
2658  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2659$as_echo_n "checking for $2... " >&6; }
2660if eval \${$3+:} false; then :
2661  $as_echo_n "(cached) " >&6
2662else
2663  eval "$3=\$ac_header_compiler"
2664fi
2665eval ac_res=\$$3
2666	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2667$as_echo "$ac_res" >&6; }
2668fi
2669  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2670
2671} # ac_fn_cxx_check_header_mongrel
2672
2673# ac_fn_cxx_try_run LINENO
2674# ------------------------
2675# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2676# that executables *can* be run.
2677ac_fn_cxx_try_run ()
2678{
2679  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2680  if { { ac_try="$ac_link"
2681case "(($ac_try" in
2682  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2683  *) ac_try_echo=$ac_try;;
2684esac
2685eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2686$as_echo "$ac_try_echo"; } >&5
2687  (eval "$ac_link") 2>&5
2688  ac_status=$?
2689  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2690  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2691  { { case "(($ac_try" in
2692  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2693  *) ac_try_echo=$ac_try;;
2694esac
2695eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2696$as_echo "$ac_try_echo"; } >&5
2697  (eval "$ac_try") 2>&5
2698  ac_status=$?
2699  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2700  test $ac_status = 0; }; }; then :
2701  ac_retval=0
2702else
2703  $as_echo "$as_me: program exited with status $ac_status" >&5
2704       $as_echo "$as_me: failed program was:" >&5
2705sed 's/^/| /' conftest.$ac_ext >&5
2706
2707       ac_retval=$ac_status
2708fi
2709  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2710  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2711  as_fn_set_status $ac_retval
2712
2713} # ac_fn_cxx_try_run
2714
2715# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2716# ---------------------------------------------------------
2717# Tests whether HEADER exists and can be compiled using the include files in
2718# INCLUDES, setting the cache variable VAR accordingly.
2719ac_fn_cxx_check_header_compile ()
2720{
2721  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2722  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2723$as_echo_n "checking for $2... " >&6; }
2724if eval \${$3+:} false; then :
2725  $as_echo_n "(cached) " >&6
2726else
2727  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2728/* end confdefs.h.  */
2729$4
2730#include <$2>
2731_ACEOF
2732if ac_fn_cxx_try_compile "$LINENO"; then :
2733  eval "$3=yes"
2734else
2735  eval "$3=no"
2736fi
2737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2738fi
2739eval ac_res=\$$3
2740	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2741$as_echo "$ac_res" >&6; }
2742  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2743
2744} # ac_fn_cxx_check_header_compile
2745
2746# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2747# ----------------------------------------------
2748# Tries to find the compile-time value of EXPR in a program that includes
2749# INCLUDES, setting VAR accordingly. Returns whether the value could be
2750# computed
2751ac_fn_cxx_compute_int ()
2752{
2753  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2754  if test "$cross_compiling" = yes; then
2755    # Depending upon the size, compute the lo and hi bounds.
2756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2757/* end confdefs.h.  */
2758$4
2759int
2760main ()
2761{
2762static int test_array [1 - 2 * !(($2) >= 0)];
2763test_array [0] = 0;
2764return test_array [0];
2765
2766  ;
2767  return 0;
2768}
2769_ACEOF
2770if ac_fn_cxx_try_compile "$LINENO"; then :
2771  ac_lo=0 ac_mid=0
2772  while :; do
2773    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2774/* end confdefs.h.  */
2775$4
2776int
2777main ()
2778{
2779static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2780test_array [0] = 0;
2781return test_array [0];
2782
2783  ;
2784  return 0;
2785}
2786_ACEOF
2787if ac_fn_cxx_try_compile "$LINENO"; then :
2788  ac_hi=$ac_mid; break
2789else
2790  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2791			if test $ac_lo -le $ac_mid; then
2792			  ac_lo= ac_hi=
2793			  break
2794			fi
2795			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2796fi
2797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2798  done
2799else
2800  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2801/* end confdefs.h.  */
2802$4
2803int
2804main ()
2805{
2806static int test_array [1 - 2 * !(($2) < 0)];
2807test_array [0] = 0;
2808return test_array [0];
2809
2810  ;
2811  return 0;
2812}
2813_ACEOF
2814if ac_fn_cxx_try_compile "$LINENO"; then :
2815  ac_hi=-1 ac_mid=-1
2816  while :; do
2817    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2818/* end confdefs.h.  */
2819$4
2820int
2821main ()
2822{
2823static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2824test_array [0] = 0;
2825return test_array [0];
2826
2827  ;
2828  return 0;
2829}
2830_ACEOF
2831if ac_fn_cxx_try_compile "$LINENO"; then :
2832  ac_lo=$ac_mid; break
2833else
2834  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2835			if test $ac_mid -le $ac_hi; then
2836			  ac_lo= ac_hi=
2837			  break
2838			fi
2839			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2840fi
2841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2842  done
2843else
2844  ac_lo= ac_hi=
2845fi
2846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2847fi
2848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2849# Binary search between lo and hi bounds.
2850while test "x$ac_lo" != "x$ac_hi"; do
2851  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2852  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2853/* end confdefs.h.  */
2854$4
2855int
2856main ()
2857{
2858static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2859test_array [0] = 0;
2860return test_array [0];
2861
2862  ;
2863  return 0;
2864}
2865_ACEOF
2866if ac_fn_cxx_try_compile "$LINENO"; then :
2867  ac_hi=$ac_mid
2868else
2869  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2870fi
2871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2872done
2873case $ac_lo in #((
2874?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2875'') ac_retval=1 ;;
2876esac
2877  else
2878    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2879/* end confdefs.h.  */
2880$4
2881static long int longval () { return $2; }
2882static unsigned long int ulongval () { return $2; }
2883#include <stdio.h>
2884#include <stdlib.h>
2885int
2886main ()
2887{
2888
2889  FILE *f = fopen ("conftest.val", "w");
2890  if (! f)
2891    return 1;
2892  if (($2) < 0)
2893    {
2894      long int i = longval ();
2895      if (i != ($2))
2896	return 1;
2897      fprintf (f, "%ld", i);
2898    }
2899  else
2900    {
2901      unsigned long int i = ulongval ();
2902      if (i != ($2))
2903	return 1;
2904      fprintf (f, "%lu", i);
2905    }
2906  /* Do not output a trailing newline, as this causes \r\n confusion
2907     on some platforms.  */
2908  return ferror (f) || fclose (f) != 0;
2909
2910  ;
2911  return 0;
2912}
2913_ACEOF
2914if ac_fn_cxx_try_run "$LINENO"; then :
2915  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2916else
2917  ac_retval=1
2918fi
2919rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2920  conftest.$ac_objext conftest.beam conftest.$ac_ext
2921rm -f conftest.val
2922
2923  fi
2924  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2925  as_fn_set_status $ac_retval
2926
2927} # ac_fn_cxx_compute_int
2928
2929# ac_fn_cxx_try_link LINENO
2930# -------------------------
2931# Try to link conftest.$ac_ext, and return whether this succeeded.
2932ac_fn_cxx_try_link ()
2933{
2934  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2935  rm -f conftest.$ac_objext conftest$ac_exeext
2936  if { { ac_try="$ac_link"
2937case "(($ac_try" in
2938  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2939  *) ac_try_echo=$ac_try;;
2940esac
2941eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2942$as_echo "$ac_try_echo"; } >&5
2943  (eval "$ac_link") 2>conftest.err
2944  ac_status=$?
2945  if test -s conftest.err; then
2946    grep -v '^ *+' conftest.err >conftest.er1
2947    cat conftest.er1 >&5
2948    mv -f conftest.er1 conftest.err
2949  fi
2950  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2951  test $ac_status = 0; } && {
2952	 test -z "$ac_cxx_werror_flag" ||
2953	 test ! -s conftest.err
2954       } && test -s conftest$ac_exeext && {
2955	 test "$cross_compiling" = yes ||
2956	 test -x conftest$ac_exeext
2957       }; then :
2958  ac_retval=0
2959else
2960  $as_echo "$as_me: failed program was:" >&5
2961sed 's/^/| /' conftest.$ac_ext >&5
2962
2963	ac_retval=1
2964fi
2965  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2966  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2967  # interfere with the next link command; also delete a directory that is
2968  # left behind by Apple's compiler.  We do this before executing the actions.
2969  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2970  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2971  as_fn_set_status $ac_retval
2972
2973} # ac_fn_cxx_try_link
2974
2975# ac_fn_cxx_check_func LINENO FUNC VAR
2976# ------------------------------------
2977# Tests whether FUNC exists, setting the cache variable VAR accordingly
2978ac_fn_cxx_check_func ()
2979{
2980  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2981  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2982$as_echo_n "checking for $2... " >&6; }
2983if eval \${$3+:} false; then :
2984  $as_echo_n "(cached) " >&6
2985else
2986  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2987/* end confdefs.h.  */
2988/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2989   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2990#define $2 innocuous_$2
2991
2992/* System header to define __stub macros and hopefully few prototypes,
2993    which can conflict with char $2 (); below.
2994    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2995    <limits.h> exists even on freestanding compilers.  */
2996
2997#ifdef __STDC__
2998# include <limits.h>
2999#else
3000# include <assert.h>
3001#endif
3002
3003#undef $2
3004
3005/* Override any GCC internal prototype to avoid an error.
3006   Use char because int might match the return type of a GCC
3007   builtin and then its argument prototype would still apply.  */
3008#ifdef __cplusplus
3009extern "C"
3010#endif
3011char $2 ();
3012/* The GNU C library defines this for functions which it implements
3013    to always fail with ENOSYS.  Some functions are actually named
3014    something starting with __ and the normal name is an alias.  */
3015#if defined __stub_$2 || defined __stub___$2
3016choke me
3017#endif
3018
3019int
3020main ()
3021{
3022return $2 ();
3023  ;
3024  return 0;
3025}
3026_ACEOF
3027if ac_fn_cxx_try_link "$LINENO"; then :
3028  eval "$3=yes"
3029else
3030  eval "$3=no"
3031fi
3032rm -f core conftest.err conftest.$ac_objext \
3033    conftest$ac_exeext conftest.$ac_ext
3034fi
3035eval ac_res=\$$3
3036	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3037$as_echo "$ac_res" >&6; }
3038  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3039
3040} # ac_fn_cxx_check_func
3041
3042# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3043# -------------------------------------------------------
3044# Tests whether HEADER exists and can be compiled using the include files in
3045# INCLUDES, setting the cache variable VAR accordingly.
3046ac_fn_c_check_header_compile ()
3047{
3048  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3049  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3050$as_echo_n "checking for $2... " >&6; }
3051if eval \${$3+:} false; then :
3052  $as_echo_n "(cached) " >&6
3053else
3054  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3055/* end confdefs.h.  */
3056$4
3057#include <$2>
3058_ACEOF
3059if ac_fn_c_try_compile "$LINENO"; then :
3060  eval "$3=yes"
3061else
3062  eval "$3=no"
3063fi
3064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3065fi
3066eval ac_res=\$$3
3067	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3068$as_echo "$ac_res" >&6; }
3069  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3070
3071} # ac_fn_c_check_header_compile
3072cat >config.log <<_ACEOF
3073This file contains any messages produced by compilers while
3074running configure, to aid debugging if configure makes a mistake.
3075
3076It was created by OpenJDK $as_me jdk9, which was
3077generated by GNU Autoconf 2.69.  Invocation command line was
3078
3079  $ $0 $@
3080
3081_ACEOF
3082exec 5>>config.log
3083{
3084cat <<_ASUNAME
3085## --------- ##
3086## Platform. ##
3087## --------- ##
3088
3089hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3090uname -m = `(uname -m) 2>/dev/null || echo unknown`
3091uname -r = `(uname -r) 2>/dev/null || echo unknown`
3092uname -s = `(uname -s) 2>/dev/null || echo unknown`
3093uname -v = `(uname -v) 2>/dev/null || echo unknown`
3094
3095/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3096/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3097
3098/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3099/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3100/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3101/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3102/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3103/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3104/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3105
3106_ASUNAME
3107
3108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3109for as_dir in $PATH
3110do
3111  IFS=$as_save_IFS
3112  test -z "$as_dir" && as_dir=.
3113    $as_echo "PATH: $as_dir"
3114  done
3115IFS=$as_save_IFS
3116
3117} >&5
3118
3119cat >&5 <<_ACEOF
3120
3121
3122## ----------- ##
3123## Core tests. ##
3124## ----------- ##
3125
3126_ACEOF
3127
3128
3129# Keep a trace of the command line.
3130# Strip out --no-create and --no-recursion so they do not pile up.
3131# Strip out --silent because we don't want to record it for future runs.
3132# Also quote any args containing shell meta-characters.
3133# Make two passes to allow for proper duplicate-argument suppression.
3134ac_configure_args=
3135ac_configure_args0=
3136ac_configure_args1=
3137ac_must_keep_next=false
3138for ac_pass in 1 2
3139do
3140  for ac_arg
3141  do
3142    case $ac_arg in
3143    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3144    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3145    | -silent | --silent | --silen | --sile | --sil)
3146      continue ;;
3147    *\'*)
3148      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3149    esac
3150    case $ac_pass in
3151    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3152    2)
3153      as_fn_append ac_configure_args1 " '$ac_arg'"
3154      if test $ac_must_keep_next = true; then
3155	ac_must_keep_next=false # Got value, back to normal.
3156      else
3157	case $ac_arg in
3158	  *=* | --config-cache | -C | -disable-* | --disable-* \
3159	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3160	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3161	  | -with-* | --with-* | -without-* | --without-* | --x)
3162	    case "$ac_configure_args0 " in
3163	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3164	    esac
3165	    ;;
3166	  -* ) ac_must_keep_next=true ;;
3167	esac
3168      fi
3169      as_fn_append ac_configure_args " '$ac_arg'"
3170      ;;
3171    esac
3172  done
3173done
3174{ ac_configure_args0=; unset ac_configure_args0;}
3175{ ac_configure_args1=; unset ac_configure_args1;}
3176
3177# When interrupted or exit'd, cleanup temporary files, and complete
3178# config.log.  We remove comments because anyway the quotes in there
3179# would cause problems or look ugly.
3180# WARNING: Use '\'' to represent an apostrophe within the trap.
3181# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3182trap 'exit_status=$?
3183  # Save into config.log some information that might help in debugging.
3184  {
3185    echo
3186
3187    $as_echo "## ---------------- ##
3188## Cache variables. ##
3189## ---------------- ##"
3190    echo
3191    # The following way of writing the cache mishandles newlines in values,
3192(
3193  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3194    eval ac_val=\$$ac_var
3195    case $ac_val in #(
3196    *${as_nl}*)
3197      case $ac_var in #(
3198      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3199$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3200      esac
3201      case $ac_var in #(
3202      _ | IFS | as_nl) ;; #(
3203      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3204      *) { eval $ac_var=; unset $ac_var;} ;;
3205      esac ;;
3206    esac
3207  done
3208  (set) 2>&1 |
3209    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3210    *${as_nl}ac_space=\ *)
3211      sed -n \
3212	"s/'\''/'\''\\\\'\'''\''/g;
3213	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3214      ;; #(
3215    *)
3216      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3217      ;;
3218    esac |
3219    sort
3220)
3221    echo
3222
3223    $as_echo "## ----------------- ##
3224## Output variables. ##
3225## ----------------- ##"
3226    echo
3227    for ac_var in $ac_subst_vars
3228    do
3229      eval ac_val=\$$ac_var
3230      case $ac_val in
3231      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3232      esac
3233      $as_echo "$ac_var='\''$ac_val'\''"
3234    done | sort
3235    echo
3236
3237    if test -n "$ac_subst_files"; then
3238      $as_echo "## ------------------- ##
3239## File substitutions. ##
3240## ------------------- ##"
3241      echo
3242      for ac_var in $ac_subst_files
3243      do
3244	eval ac_val=\$$ac_var
3245	case $ac_val in
3246	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3247	esac
3248	$as_echo "$ac_var='\''$ac_val'\''"
3249      done | sort
3250      echo
3251    fi
3252
3253    if test -s confdefs.h; then
3254      $as_echo "## ----------- ##
3255## confdefs.h. ##
3256## ----------- ##"
3257      echo
3258      cat confdefs.h
3259      echo
3260    fi
3261    test "$ac_signal" != 0 &&
3262      $as_echo "$as_me: caught signal $ac_signal"
3263    $as_echo "$as_me: exit $exit_status"
3264  } >&5
3265  rm -f core *.core core.conftest.* &&
3266    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3267    exit $exit_status
3268' 0
3269for ac_signal in 1 2 13 15; do
3270  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3271done
3272ac_signal=0
3273
3274# confdefs.h avoids OS command line length limits that DEFS can exceed.
3275rm -f -r conftest* confdefs.h
3276
3277$as_echo "/* confdefs.h */" > confdefs.h
3278
3279# Predefined preprocessor variables.
3280
3281cat >>confdefs.h <<_ACEOF
3282#define PACKAGE_NAME "$PACKAGE_NAME"
3283_ACEOF
3284
3285cat >>confdefs.h <<_ACEOF
3286#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3287_ACEOF
3288
3289cat >>confdefs.h <<_ACEOF
3290#define PACKAGE_VERSION "$PACKAGE_VERSION"
3291_ACEOF
3292
3293cat >>confdefs.h <<_ACEOF
3294#define PACKAGE_STRING "$PACKAGE_STRING"
3295_ACEOF
3296
3297cat >>confdefs.h <<_ACEOF
3298#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3299_ACEOF
3300
3301cat >>confdefs.h <<_ACEOF
3302#define PACKAGE_URL "$PACKAGE_URL"
3303_ACEOF
3304
3305
3306# Let the site file select an alternate cache file if it wants to.
3307# Prefer an explicitly selected file to automatically selected ones.
3308ac_site_file1=NONE
3309ac_site_file2=NONE
3310if test -n "$CONFIG_SITE"; then
3311  # We do not want a PATH search for config.site.
3312  case $CONFIG_SITE in #((
3313    -*)  ac_site_file1=./$CONFIG_SITE;;
3314    */*) ac_site_file1=$CONFIG_SITE;;
3315    *)   ac_site_file1=./$CONFIG_SITE;;
3316  esac
3317elif test "x$prefix" != xNONE; then
3318  ac_site_file1=$prefix/share/config.site
3319  ac_site_file2=$prefix/etc/config.site
3320else
3321  ac_site_file1=$ac_default_prefix/share/config.site
3322  ac_site_file2=$ac_default_prefix/etc/config.site
3323fi
3324for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3325do
3326  test "x$ac_site_file" = xNONE && continue
3327  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3328    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3329$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3330    sed 's/^/| /' "$ac_site_file" >&5
3331    . "$ac_site_file" \
3332      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3333$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3334as_fn_error $? "failed to load site script $ac_site_file
3335See \`config.log' for more details" "$LINENO" 5; }
3336  fi
3337done
3338
3339if test -r "$cache_file"; then
3340  # Some versions of bash will fail to source /dev/null (special files
3341  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3342  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3343    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3344$as_echo "$as_me: loading cache $cache_file" >&6;}
3345    case $cache_file in
3346      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3347      *)                      . "./$cache_file";;
3348    esac
3349  fi
3350else
3351  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3352$as_echo "$as_me: creating cache $cache_file" >&6;}
3353  >$cache_file
3354fi
3355
3356# Check that the precious variables saved in the cache have kept the same
3357# value.
3358ac_cache_corrupted=false
3359for ac_var in $ac_precious_vars; do
3360  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3361  eval ac_new_set=\$ac_env_${ac_var}_set
3362  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3363  eval ac_new_val=\$ac_env_${ac_var}_value
3364  case $ac_old_set,$ac_new_set in
3365    set,)
3366      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3367$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3368      ac_cache_corrupted=: ;;
3369    ,set)
3370      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3371$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3372      ac_cache_corrupted=: ;;
3373    ,);;
3374    *)
3375      if test "x$ac_old_val" != "x$ac_new_val"; then
3376	# differences in whitespace do not lead to failure.
3377	ac_old_val_w=`echo x $ac_old_val`
3378	ac_new_val_w=`echo x $ac_new_val`
3379	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3380	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3381$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3382	  ac_cache_corrupted=:
3383	else
3384	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3385$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3386	  eval $ac_var=\$ac_old_val
3387	fi
3388	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3389$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3390	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3391$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3392      fi;;
3393  esac
3394  # Pass precious variables to config.status.
3395  if test "$ac_new_set" = set; then
3396    case $ac_new_val in
3397    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3398    *) ac_arg=$ac_var=$ac_new_val ;;
3399    esac
3400    case " $ac_configure_args " in
3401      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3402      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3403    esac
3404  fi
3405done
3406if $ac_cache_corrupted; then
3407  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3408$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3409  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3410$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3411  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3412fi
3413## -------------------- ##
3414## Main body of script. ##
3415## -------------------- ##
3416
3417ac_ext=c
3418ac_cpp='$CPP $CPPFLAGS'
3419ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3420ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3421ac_compiler_gnu=$ac_cv_c_compiler_gnu
3422
3423
3424
3425ac_aux_dir=
3426for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3427  if test -f "$ac_dir/install-sh"; then
3428    ac_aux_dir=$ac_dir
3429    ac_install_sh="$ac_aux_dir/install-sh -c"
3430    break
3431  elif test -f "$ac_dir/install.sh"; then
3432    ac_aux_dir=$ac_dir
3433    ac_install_sh="$ac_aux_dir/install.sh -c"
3434    break
3435  elif test -f "$ac_dir/shtool"; then
3436    ac_aux_dir=$ac_dir
3437    ac_install_sh="$ac_aux_dir/shtool install -c"
3438    break
3439  fi
3440done
3441if test -z "$ac_aux_dir"; then
3442  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
3443fi
3444
3445# These three variables are undocumented and unsupported,
3446# and are intended to be withdrawn in a future Autoconf release.
3447# They can cause serious problems if a builder's source tree is in a directory
3448# whose full name contains unusual characters.
3449ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3450ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3451ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3452
3453
3454# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3455
3456#
3457# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3458# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3459#
3460# This code is free software; you can redistribute it and/or modify it
3461# under the terms of the GNU General Public License version 2 only, as
3462# published by the Free Software Foundation.  Oracle designates this
3463# particular file as subject to the "Classpath" exception as provided
3464# by Oracle in the LICENSE file that accompanied this code.
3465#
3466# This code is distributed in the hope that it will be useful, but WITHOUT
3467# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3468# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3469# version 2 for more details (a copy is included in the LICENSE file that
3470# accompanied this code).
3471#
3472# You should have received a copy of the GNU General Public License version
3473# 2 along with this work; if not, write to the Free Software Foundation,
3474# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3475#
3476# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3477# or visit www.oracle.com if you need additional information or have any
3478# questions.
3479#
3480
3481#
3482# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3483#
3484# This program is free software; you can redistribute it and/or modify
3485# it under the terms of the GNU General Public License as published by
3486# the Free Software Foundation; either version 2 of the License, or
3487# (at your option) any later version.
3488#
3489# This program is distributed in the hope that it will be useful, but
3490# WITHOUT ANY WARRANTY; without even the implied warranty of
3491# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3492# General Public License for more details.
3493#
3494# You should have received a copy of the GNU General Public License
3495# along with this program; if not, write to the Free Software
3496# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3497#
3498# As a special exception to the GNU General Public License, if you
3499# distribute this file as part of a program that contains a
3500# configuration script generated by Autoconf, you may include it under
3501# the same distribution terms that you use for the rest of that program.
3502
3503# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3504# ----------------------------------
3505# PKG_PROG_PKG_CONFIG
3506
3507# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3508#
3509# Check to see whether a particular set of modules exists.  Similar
3510# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3511#
3512#
3513# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3514# this or PKG_CHECK_MODULES is called, or make sure to call
3515# PKG_CHECK_EXISTS manually
3516# --------------------------------------------------------------
3517
3518
3519
3520# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3521# ---------------------------------------------
3522# _PKG_CONFIG
3523
3524# _PKG_SHORT_ERRORS_SUPPORTED
3525# -----------------------------
3526# _PKG_SHORT_ERRORS_SUPPORTED
3527
3528
3529# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3530# [ACTION-IF-NOT-FOUND])
3531#
3532#
3533# Note that if there is a possibility the first call to
3534# PKG_CHECK_MODULES might not happen, you should be sure to include an
3535# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3536#
3537#
3538# --------------------------------------------------------------
3539# PKG_CHECK_MODULES
3540
3541
3542# Include these first...
3543#
3544# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3545# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3546#
3547# This code is free software; you can redistribute it and/or modify it
3548# under the terms of the GNU General Public License version 2 only, as
3549# published by the Free Software Foundation.  Oracle designates this
3550# particular file as subject to the "Classpath" exception as provided
3551# by Oracle in the LICENSE file that accompanied this code.
3552#
3553# This code is distributed in the hope that it will be useful, but WITHOUT
3554# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3555# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3556# version 2 for more details (a copy is included in the LICENSE file that
3557# accompanied this code).
3558#
3559# You should have received a copy of the GNU General Public License version
3560# 2 along with this work; if not, write to the Free Software Foundation,
3561# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3562#
3563# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3564# or visit www.oracle.com if you need additional information or have any
3565# questions.
3566#
3567
3568# Create a function/macro that takes a series of named arguments. The call is
3569# similar to AC_DEFUN, but the setup of the function looks like this:
3570# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3571# ... do something
3572#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3573# ])
3574# A star (*) in front of a named argument means that it is required and it's
3575# presence will be verified. To pass e.g. the first value as a normal indexed
3576# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3577# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3578# "ARG_FOO".
3579#
3580# The generated function can be called like this:
3581# MYFUNC(FOO: [foo-val],
3582#     BAR: [
3583#         $ECHO hello world
3584#     ])
3585# Note that the argument value must start on the same line as the argument name.
3586#
3587# Argument 1: Name of the function to define
3588# Argument 2: List of legal named arguments, with a * prefix for required arguments
3589# Argument 3: Argument array to treat as named, typically $@
3590# Argument 4: The main function body
3591
3592
3593# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3594# If so, then append $1 to $2 \
3595# Also set JVM_ARG_OK to true/false depending on outcome.
3596
3597
3598# Appends a string to a path variable, only adding the : when needed.
3599
3600
3601# Prepends a string to a path variable, only adding the : when needed.
3602
3603
3604# This will make sure the given variable points to a full and proper
3605# path. This means:
3606# 1) There will be no spaces in the path. On unix platforms,
3607#    spaces in the path will result in an error. On Windows,
3608#    the path will be rewritten using short-style to be space-free.
3609# 2) The path will be absolute, and it will be in unix-style (on
3610#     cygwin).
3611# $1: The name of the variable to fix
3612
3613
3614# This will make sure the given variable points to a executable
3615# with a full and proper path. This means:
3616# 1) There will be no spaces in the path. On unix platforms,
3617#    spaces in the path will result in an error. On Windows,
3618#    the path will be rewritten using short-style to be space-free.
3619# 2) The path will be absolute, and it will be in unix-style (on
3620#     cygwin).
3621# Any arguments given to the executable is preserved.
3622# If the input variable does not have a directory specification, then
3623# it need to be in the PATH.
3624# $1: The name of the variable to fix
3625
3626
3627
3628
3629# Register a --with argument but mark it as deprecated
3630# $1: The name of the with argument to deprecate, not including --with-
3631
3632
3633# Register a --enable argument but mark it as deprecated
3634# $1: The name of the with argument to deprecate, not including --enable-
3635# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3636# $3: Messages to user.
3637
3638
3639
3640
3641# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3642# $1: variable to check
3643
3644
3645# Check that there are no unprocessed overridden variables left.
3646# If so, they are an incorrect argument and we will exit with an error.
3647
3648
3649# Setup a tool for the given variable. If correctly specified by the user,
3650# use that value, otherwise search for the tool using the supplied code snippet.
3651# $1: variable to set
3652# $2: code snippet to call to look for the tool
3653# $3: code snippet to call if variable was used to find tool
3654
3655
3656# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3657# $1: variable to set
3658# $2: executable name (or list of names) to look for
3659# $3: [path]
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# $3: [path]
3671
3672
3673# Like BASIC_SETUP_TOOL but fails if no tool was found.
3674# $1: variable to set
3675# $2: autoconf macro to call to look for the special tool
3676
3677
3678# Setup the most fundamental tools that relies on not much else to set up,
3679# but is used by much of the early bootstrap code.
3680
3681
3682# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3683
3684
3685# Evaluates platform specific overrides for devkit variables.
3686# $1: Name of variable
3687
3688
3689
3690
3691
3692
3693#%%% Simple tools %%%
3694
3695# Check if we have found a usable version of make
3696# $1: the path to a potential make binary (or empty)
3697# $2: the description on how we found this
3698
3699
3700
3701
3702# Goes looking for a usable version of GNU make.
3703
3704
3705
3706
3707
3708
3709
3710
3711# Check if build directory is on local disk. If not possible to determine,
3712# we prefer to claim it's local.
3713# Argument 1: directory to test
3714# Argument 2: what to do if it is on local disk
3715# Argument 3: what to do otherwise (remote disk or failure)
3716
3717
3718# Check that source files have basic read permissions set. This might
3719# not be the case in cygwin in certain conditions.
3720
3721
3722
3723
3724# Check for support for specific options in bash
3725
3726
3727################################################################################
3728#
3729# Default make target
3730#
3731
3732
3733# Code to run after AC_OUTPUT
3734
3735
3736#
3737# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3738# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3739#
3740# This code is free software; you can redistribute it and/or modify it
3741# under the terms of the GNU General Public License version 2 only, as
3742# published by the Free Software Foundation.  Oracle designates this
3743# particular file as subject to the "Classpath" exception as provided
3744# by Oracle in the LICENSE file that accompanied this code.
3745#
3746# This code is distributed in the hope that it will be useful, but WITHOUT
3747# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3748# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3749# version 2 for more details (a copy is included in the LICENSE file that
3750# accompanied this code).
3751#
3752# You should have received a copy of the GNU General Public License version
3753# 2 along with this work; if not, write to the Free Software Foundation,
3754# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3755#
3756# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3757# or visit www.oracle.com if you need additional information or have any
3758# questions.
3759#
3760
3761
3762
3763
3764
3765# Helper function which possibly converts a path using DOS-style short mode.
3766# If so, the updated path is stored in $new_path.
3767# $1: The path to check
3768
3769
3770# Helper function which possibly converts a path using DOS-style short mode.
3771# If so, the updated path is stored in $new_path.
3772# $1: The path to check
3773
3774
3775# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3776# and could probably be heavily simplified. However, all changes in this
3777# area tend to need lot of testing in different scenarios, and in lack of
3778# proper unit testing, cleaning this up has not been deemed worth the effort
3779# at the moment.
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3790
3791
3792
3793
3794# ... then the rest
3795#
3796# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3797# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3798#
3799# This code is free software; you can redistribute it and/or modify it
3800# under the terms of the GNU General Public License version 2 only, as
3801# published by the Free Software Foundation.  Oracle designates this
3802# particular file as subject to the "Classpath" exception as provided
3803# by Oracle in the LICENSE file that accompanied this code.
3804#
3805# This code is distributed in the hope that it will be useful, but WITHOUT
3806# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3807# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3808# version 2 for more details (a copy is included in the LICENSE file that
3809# accompanied this code).
3810#
3811# You should have received a copy of the GNU General Public License version
3812# 2 along with this work; if not, write to the Free Software Foundation,
3813# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3814#
3815# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3816# or visit www.oracle.com if you need additional information or have any
3817# questions.
3818#
3819
3820########################################################################
3821# This file handles detection of the Boot JDK. The Boot JDK detection
3822# process has been developed as a response to solve a complex real-world
3823# problem. Initially, it was simple, but it has grown as platform after
3824# platform, idiosyncracy after idiosyncracy has been supported.
3825#
3826# The basic idea is this:
3827# 1) You need an acceptable *) JDK to use as a Boot JDK
3828# 2) There are several ways to locate a JDK, that are mostly platform
3829#    dependent **)
3830# 3) You can have multiple JDKs installed
3831# 4) If possible, configure should try to dig out an acceptable JDK
3832#    automatically, without having to resort to command-line options
3833#
3834# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3835#     javac) and not a JRE, etc.
3836#
3837# **) On Windows we typically use a well-known path.
3838#     On MacOSX we typically use the tool java_home.
3839#     On Linux we typically find javac in the $PATH, and then follow a
3840#     chain of symlinks that often ends up in a real JDK.
3841#
3842# This leads to the code where we check in different ways to locate a
3843# JDK, and if one is found, check if it is acceptable. If not, we print
3844# our reasons for rejecting it (useful when debugging non-working
3845# configure situations) and continue checking the next one.
3846########################################################################
3847
3848# Execute the check given as argument, and verify the result
3849# If the Boot JDK was previously found, do nothing
3850# $1 A command line (typically autoconf macro) to execute
3851
3852
3853# Test: Is bootjdk explicitly set by command line arguments?
3854
3855
3856# Test: Is $JAVA_HOME set?
3857
3858
3859# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3860
3861
3862# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3863# $1: Argument to the java_home binary (optional)
3864
3865
3866# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3867
3868
3869# Look for a jdk in the given path. If there are multiple, try to select the newest.
3870# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3871# $1 = Path to directory containing jdk installations.
3872# $2 = String to append to the found JDK directory to get the proper JDK home
3873
3874
3875# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3876# environmental variable as base for where to look.
3877# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3878
3879
3880# Test: Is there a JDK installed in default, well-known locations?
3881
3882
3883# Check that a command-line tool in the Boot JDK is correct
3884# $1 = name of variable to assign
3885# $2 = name of binary
3886
3887
3888###############################################################################
3889#
3890# We need a Boot JDK to bootstrap the build.
3891#
3892
3893
3894
3895
3896
3897# BUILD_JDK: the location of the latest JDK that can run
3898#   on the host system and supports the target class file version
3899#   generated in this JDK build.  This variable should only be
3900#   used after the launchers are built.
3901#
3902
3903# Execute the check given as argument, and verify the result.
3904# If the JDK was previously found, do nothing.
3905# $1 A command line (typically autoconf macro) to execute
3906
3907
3908# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3909# is different than the host system doing the build (e.g. cross-compilation),
3910# a special BUILD_JDK is built as part of the build process.  An external
3911# prebuilt BUILD_JDK can also be supplied.
3912
3913
3914#
3915# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3916# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3917#
3918# This code is free software; you can redistribute it and/or modify it
3919# under the terms of the GNU General Public License version 2 only, as
3920# published by the Free Software Foundation.  Oracle designates this
3921# particular file as subject to the "Classpath" exception as provided
3922# by Oracle in the LICENSE file that accompanied this code.
3923#
3924# This code is distributed in the hope that it will be useful, but WITHOUT
3925# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3926# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3927# version 2 for more details (a copy is included in the LICENSE file that
3928# accompanied this code).
3929#
3930# You should have received a copy of the GNU General Public License version
3931# 2 along with this work; if not, write to the Free Software Foundation,
3932# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3933#
3934# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3935# or visit www.oracle.com if you need additional information or have any
3936# questions.
3937#
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955################################################################################
3956#
3957# Runs icecc-create-env once and prints the error if it fails
3958#
3959# $1: arguments to icecc-create-env
3960# $2: log file
3961#
3962
3963
3964################################################################################
3965#
3966# Optionally enable distributed compilation of native code using icecc/icecream
3967#
3968
3969
3970
3971
3972
3973
3974
3975#
3976# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3977# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3978#
3979# This code is free software; you can redistribute it and/or modify it
3980# under the terms of the GNU General Public License version 2 only, as
3981# published by the Free Software Foundation.  Oracle designates this
3982# particular file as subject to the "Classpath" exception as provided
3983# by Oracle in the LICENSE file that accompanied this code.
3984#
3985# This code is distributed in the hope that it will be useful, but WITHOUT
3986# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3987# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3988# version 2 for more details (a copy is included in the LICENSE file that
3989# accompanied this code).
3990#
3991# You should have received a copy of the GNU General Public License version
3992# 2 along with this work; if not, write to the Free Software Foundation,
3993# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3994#
3995# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3996# or visit www.oracle.com if you need additional information or have any
3997# questions.
3998#
3999
4000# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4001# corresponding configure arguments instead
4002
4003
4004# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4005# that configure can use them while detecting compilers.
4006# TOOLCHAIN_TYPE is available here.
4007# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4008
4009
4010
4011
4012
4013
4014# Documentation on common flags used for solstudio in HIGHEST.
4015#
4016# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4017#          done with care, there are some assumptions below that need to
4018#          be understood about the use of pointers, and IEEE behavior.
4019#
4020# -fns: Use non-standard floating point mode (not IEEE 754)
4021# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4022# -fsingle: Use single precision floating point with 'float'
4023# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4024#   (Source with excessing pointer casting and data access with mixed
4025#    pointer types are not recommended)
4026# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4027#   (If you expect perfect errno behavior, do not use this)
4028# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4029# -xrestrict: Pointer parameters to functions do not overlap
4030#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4031#    If you pass in multiple pointers to the same data, do not use this)
4032# -xlibmil: Inline some library routines
4033#   (If you expect perfect errno behavior, do not use this)
4034# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4035#   (If you expect perfect errno behavior, do not use this)
4036#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4037
4038    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4039    # Bug?
4040    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4041    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4042    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4043    #fi
4044
4045
4046
4047
4048
4049
4050################################################################################
4051# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4052#      conditionals against.
4053# $2 - Optional prefix for each variable defined.
4054
4055
4056# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4057#                                  IF_FALSE: [RUN-IF-FALSE])
4058# ------------------------------------------------------------
4059# Check that the C compiler supports an argument
4060
4061
4062
4063
4064# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4065#                                    IF_FALSE: [RUN-IF-FALSE])
4066# ------------------------------------------------------------
4067# Check that the C++ compiler supports an argument
4068
4069
4070
4071
4072# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4073#                                IF_FALSE: [RUN-IF-FALSE])
4074# ------------------------------------------------------------
4075# Check that the C and C++ compilers support an argument
4076
4077
4078
4079
4080# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4081#                                   IF_FALSE: [RUN-IF-FALSE])
4082# ------------------------------------------------------------
4083# Check that the linker support an argument
4084
4085
4086
4087
4088
4089
4090# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4091# Arguments:
4092# $1 - Optional prefix for each variable defined.
4093
4094
4095#
4096# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4097# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4098#
4099# This code is free software; you can redistribute it and/or modify it
4100# under the terms of the GNU General Public License version 2 only, as
4101# published by the Free Software Foundation.  Oracle designates this
4102# particular file as subject to the "Classpath" exception as provided
4103# by Oracle in the LICENSE file that accompanied this code.
4104#
4105# This code is distributed in the hope that it will be useful, but WITHOUT
4106# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4107# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4108# version 2 for more details (a copy is included in the LICENSE file that
4109# accompanied this code).
4110#
4111# You should have received a copy of the GNU General Public License version
4112# 2 along with this work; if not, write to the Free Software Foundation,
4113# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4114#
4115# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4116# or visit www.oracle.com if you need additional information or have any
4117# questions.
4118#
4119
4120
4121
4122
4123
4124cygwin_help() {
4125  case $1 in
4126    unzip)
4127      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4128      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4129      ;;
4130    zip)
4131      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4132      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4133      ;;
4134    make)
4135      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4136      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4137      ;;
4138    freetype)
4139      HELP_MSG="
4140The freetype library can now be build during the configure process.
4141Download the freetype sources and unpack them into an arbitrary directory:
4142
4143wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4144tar -xzf freetype-2.5.3.tar.gz
4145
4146Then run configure with '--with-freetype-src=<freetype_src>'. This will
4147automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4148builds or into '<freetype_src>/lib32' for 32-bit builds.
4149Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4150and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4151
4152Alternatively you can unpack the sources like this to use the default directory:
4153
4154tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4155      ;;
4156  esac
4157}
4158
4159msys_help() {
4160  PKGHANDLER_COMMAND=""
4161}
4162
4163apt_help() {
4164  case $1 in
4165    reduced)
4166      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4167    devkit)
4168      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4169    openjdk)
4170      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4171    alsa)
4172      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4173    cups)
4174      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4175    freetype)
4176      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4177    ffi)
4178      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4179    x11)
4180      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4181    ccache)
4182      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4183    dtrace)
4184      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4185  esac
4186}
4187
4188yum_help() {
4189  case $1 in
4190    devkit)
4191      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4192    openjdk)
4193      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4194    alsa)
4195      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4196    cups)
4197      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4198    freetype)
4199      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4200    x11)
4201      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4202    ccache)
4203      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4204  esac
4205}
4206
4207port_help() {
4208  PKGHANDLER_COMMAND=""
4209}
4210
4211pkgutil_help() {
4212  PKGHANDLER_COMMAND=""
4213}
4214
4215pkgadd_help() {
4216  PKGHANDLER_COMMAND=""
4217}
4218
4219# This function will check if we're called from the "configure" wrapper while
4220# printing --help. If so, we will print out additional information that can
4221# only be extracted within the autoconf script, and then exit. This must be
4222# called at the very beginning in configure.ac.
4223
4224
4225
4226
4227
4228
4229#
4230# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4231# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4232#
4233# This code is free software; you can redistribute it and/or modify it
4234# under the terms of the GNU General Public License version 2 only, as
4235# published by the Free Software Foundation.  Oracle designates this
4236# particular file as subject to the "Classpath" exception as provided
4237# by Oracle in the LICENSE file that accompanied this code.
4238#
4239# This code is distributed in the hope that it will be useful, but WITHOUT
4240# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4241# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4242# version 2 for more details (a copy is included in the LICENSE file that
4243# accompanied this code).
4244#
4245# You should have received a copy of the GNU General Public License version
4246# 2 along with this work; if not, write to the Free Software Foundation,
4247# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4248#
4249# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4250# or visit www.oracle.com if you need additional information or have any
4251# questions.
4252#
4253
4254# All valid JVM features, regardless of platform
4255VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4256    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4257
4258# All valid JVM variants
4259VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4260
4261###############################################################################
4262# Check if the specified JVM variant should be built. To be used in shell if
4263# constructs, like this:
4264# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4265#
4266# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4267
4268# Definition kept in one line to allow inlining in if statements.
4269# Additional [] needed to keep m4 from mangling shell constructs.
4270
4271
4272###############################################################################
4273# Check if the specified JVM features are explicitly enabled. To be used in
4274# shell if constructs, like this:
4275# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4276#
4277# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4278
4279# Definition kept in one line to allow inlining in if statements.
4280# Additional [] needed to keep m4 from mangling shell constructs.
4281
4282
4283###############################################################################
4284# Check which variants of the JVM that we want to build. Available variants are:
4285#   server: normal interpreter, and a tiered C1/C2 compiler
4286#   client: normal interpreter, and C1 (no C2 compiler)
4287#   minimal: reduced form of client with optional features stripped out
4288#   core: normal interpreter only, no compiler
4289#   zero: C++ based interpreter only, no compiler
4290#   zeroshark: C++ based interpreter, and a llvm-based compiler
4291#   custom: baseline JVM with no default features
4292#
4293
4294
4295###############################################################################
4296# Check if dtrace should be enabled and has all prerequisites present.
4297#
4298
4299
4300###############################################################################
4301# Set up all JVM features for each JVM variant.
4302#
4303
4304
4305###############################################################################
4306# Validate JVM features once all setup is complete, including custom setup.
4307#
4308
4309
4310################################################################################
4311# Check if gtest should be built
4312#
4313
4314
4315#
4316# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4317# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4318#
4319# This code is free software; you can redistribute it and/or modify it
4320# under the terms of the GNU General Public License version 2 only, as
4321# published by the Free Software Foundation.  Oracle designates this
4322# particular file as subject to the "Classpath" exception as provided
4323# by Oracle in the LICENSE file that accompanied this code.
4324#
4325# This code is distributed in the hope that it will be useful, but WITHOUT
4326# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4327# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4328# version 2 for more details (a copy is included in the LICENSE file that
4329# accompanied this code).
4330#
4331# You should have received a copy of the GNU General Public License version
4332# 2 along with this work; if not, write to the Free Software Foundation,
4333# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4334#
4335# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4336# or visit www.oracle.com if you need additional information or have any
4337# questions.
4338#
4339
4340###############################################################################
4341# Check which variant of the JDK that we want to build.
4342# Currently we have:
4343#    normal:   standard edition
4344# but the custom make system may add other variants
4345#
4346# Effectively the JDK variant gives a name to a specific set of
4347# modules to compile into the JDK.
4348
4349
4350###############################################################################
4351# Set the debug level
4352#    release: no debug information, all optimizations, no asserts.
4353#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4354#    fastdebug: debug information (-g), all optimizations, all asserts
4355#    slowdebug: debug information (-g), no optimizations, all asserts
4356
4357
4358###############################################################################
4359#
4360# Should we build only OpenJDK even if closed sources are present?
4361#
4362
4363
4364
4365
4366###############################################################################
4367#
4368# Enable or disable the elliptic curve crypto implementation
4369#
4370
4371
4372
4373
4374################################################################################
4375#
4376# Gcov coverage data for hotspot
4377#
4378
4379
4380################################################################################
4381#
4382# Static build support.  When enabled will generate static
4383# libraries instead of shared libraries for all JDK libs.
4384#
4385
4386
4387################################################################################
4388#
4389# jlink options.
4390# We always keep packaged modules in JDK image.
4391#
4392
4393
4394################################################################################
4395#
4396# Check if building of the jtreg failure handler should be enabled.
4397#
4398
4399
4400################################################################################
4401#
4402# Enable or disable generation of the classlist at build time
4403#
4404
4405
4406#
4407# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4408# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4409#
4410# This code is free software; you can redistribute it and/or modify it
4411# under the terms of the GNU General Public License version 2 only, as
4412# published by the Free Software Foundation.  Oracle designates this
4413# particular file as subject to the "Classpath" exception as provided
4414# by Oracle in the LICENSE file that accompanied this code.
4415#
4416# This code is distributed in the hope that it will be useful, but WITHOUT
4417# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4418# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4419# version 2 for more details (a copy is included in the LICENSE file that
4420# accompanied this code).
4421#
4422# You should have received a copy of the GNU General Public License version
4423# 2 along with this work; if not, write to the Free Software Foundation,
4424# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4425#
4426# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4427# or visit www.oracle.com if you need additional information or have any
4428# questions.
4429#
4430
4431###############################################################################
4432#
4433# Setup version numbers
4434#
4435
4436# Verify that a given string represents a valid version number, and assign it
4437# to a variable.
4438
4439# Argument 1: the variable to assign to
4440# Argument 2: the value given by the user
4441
4442
4443
4444
4445#
4446# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4447# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4448#
4449# This code is free software; you can redistribute it and/or modify it
4450# under the terms of the GNU General Public License version 2 only, as
4451# published by the Free Software Foundation.  Oracle designates this
4452# particular file as subject to the "Classpath" exception as provided
4453# by Oracle in the LICENSE file that accompanied this code.
4454#
4455# This code is distributed in the hope that it will be useful, but WITHOUT
4456# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4457# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4458# version 2 for more details (a copy is included in the LICENSE file that
4459# accompanied this code).
4460#
4461# You should have received a copy of the GNU General Public License version
4462# 2 along with this work; if not, write to the Free Software Foundation,
4463# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4464#
4465# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4466# or visit www.oracle.com if you need additional information or have any
4467# questions.
4468#
4469
4470# Major library component reside in separate files.
4471#
4472# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4473# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4474#
4475# This code is free software; you can redistribute it and/or modify it
4476# under the terms of the GNU General Public License version 2 only, as
4477# published by the Free Software Foundation.  Oracle designates this
4478# particular file as subject to the "Classpath" exception as provided
4479# by Oracle in the LICENSE file that accompanied this code.
4480#
4481# This code is distributed in the hope that it will be useful, but WITHOUT
4482# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4483# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4484# version 2 for more details (a copy is included in the LICENSE file that
4485# accompanied this code).
4486#
4487# You should have received a copy of the GNU General Public License version
4488# 2 along with this work; if not, write to the Free Software Foundation,
4489# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4490#
4491# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4492# or visit www.oracle.com if you need additional information or have any
4493# questions.
4494#
4495
4496################################################################################
4497# Setup alsa (Advanced Linux Sound Architecture)
4498################################################################################
4499
4500
4501#
4502# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4503# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4504#
4505# This code is free software; you can redistribute it and/or modify it
4506# under the terms of the GNU General Public License version 2 only, as
4507# published by the Free Software Foundation.  Oracle designates this
4508# particular file as subject to the "Classpath" exception as provided
4509# by Oracle in the LICENSE file that accompanied this code.
4510#
4511# This code is distributed in the hope that it will be useful, but WITHOUT
4512# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4513# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4514# version 2 for more details (a copy is included in the LICENSE file that
4515# accompanied this code).
4516#
4517# You should have received a copy of the GNU General Public License version
4518# 2 along with this work; if not, write to the Free Software Foundation,
4519# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4520#
4521# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4522# or visit www.oracle.com if you need additional information or have any
4523# questions.
4524#
4525
4526################################################################################
4527# Setup bundled libraries.
4528#
4529# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4530# OpenJDK repository. Default is to use these libraries as bundled, but they
4531# might be replaced by en external version by the user.
4532################################################################################
4533
4534
4535################################################################################
4536# Setup libjpeg
4537################################################################################
4538
4539
4540################################################################################
4541# Setup giflib
4542################################################################################
4543
4544
4545################################################################################
4546# Setup libpng
4547################################################################################
4548
4549
4550################################################################################
4551# Setup zlib
4552################################################################################
4553
4554
4555################################################################################
4556# Setup lcms (Little CMS)
4557################################################################################
4558
4559
4560#
4561# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4562# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4563#
4564# This code is free software; you can redistribute it and/or modify it
4565# under the terms of the GNU General Public License version 2 only, as
4566# published by the Free Software Foundation.  Oracle designates this
4567# particular file as subject to the "Classpath" exception as provided
4568# by Oracle in the LICENSE file that accompanied this code.
4569#
4570# This code is distributed in the hope that it will be useful, but WITHOUT
4571# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4572# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4573# version 2 for more details (a copy is included in the LICENSE file that
4574# accompanied this code).
4575#
4576# You should have received a copy of the GNU General Public License version
4577# 2 along with this work; if not, write to the Free Software Foundation,
4578# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4579#
4580# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4581# or visit www.oracle.com if you need additional information or have any
4582# questions.
4583#
4584
4585################################################################################
4586# Setup cups (Common Unix Printing System)
4587################################################################################
4588
4589
4590#
4591# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4592# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4593#
4594# This code is free software; you can redistribute it and/or modify it
4595# under the terms of the GNU General Public License version 2 only, as
4596# published by the Free Software Foundation.  Oracle designates this
4597# particular file as subject to the "Classpath" exception as provided
4598# by Oracle in the LICENSE file that accompanied this code.
4599#
4600# This code is distributed in the hope that it will be useful, but WITHOUT
4601# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4602# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4603# version 2 for more details (a copy is included in the LICENSE file that
4604# accompanied this code).
4605#
4606# You should have received a copy of the GNU General Public License version
4607# 2 along with this work; if not, write to the Free Software Foundation,
4608# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4609#
4610# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4611# or visit www.oracle.com if you need additional information or have any
4612# questions.
4613#
4614
4615################################################################################
4616# Setup libffi (Foreign Function Interface)
4617################################################################################
4618
4619
4620#
4621# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4622# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4623#
4624# This code is free software; you can redistribute it and/or modify it
4625# under the terms of the GNU General Public License version 2 only, as
4626# published by the Free Software Foundation.  Oracle designates this
4627# particular file as subject to the "Classpath" exception as provided
4628# by Oracle in the LICENSE file that accompanied this code.
4629#
4630# This code is distributed in the hope that it will be useful, but WITHOUT
4631# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4632# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4633# version 2 for more details (a copy is included in the LICENSE file that
4634# accompanied this code).
4635#
4636# You should have received a copy of the GNU General Public License version
4637# 2 along with this work; if not, write to the Free Software Foundation,
4638# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4639#
4640# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4641# or visit www.oracle.com if you need additional information or have any
4642# questions.
4643#
4644
4645################################################################################
4646# Build the freetype lib from source
4647################################################################################
4648
4649
4650################################################################################
4651# Check if a potential freeype library match is correct and usable
4652################################################################################
4653
4654
4655################################################################################
4656# Setup freetype (The FreeType2 font rendering library)
4657################################################################################
4658
4659
4660#
4661# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4662# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4663#
4664# This code is free software; you can redistribute it and/or modify it
4665# under the terms of the GNU General Public License version 2 only, as
4666# published by the Free Software Foundation.  Oracle designates this
4667# particular file as subject to the "Classpath" exception as provided
4668# by Oracle in the LICENSE file that accompanied this code.
4669#
4670# This code is distributed in the hope that it will be useful, but WITHOUT
4671# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4672# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4673# version 2 for more details (a copy is included in the LICENSE file that
4674# accompanied this code).
4675#
4676# You should have received a copy of the GNU General Public License version
4677# 2 along with this work; if not, write to the Free Software Foundation,
4678# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4679#
4680# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4681# or visit www.oracle.com if you need additional information or have any
4682# questions.
4683#
4684
4685################################################################################
4686# Setup the standard C/C++ runtime libraries.
4687#
4688# Most importantly, determine if stdc++ should be linked statically or
4689# dynamically.
4690################################################################################
4691
4692
4693#
4694# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4695# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4696#
4697# This code is free software; you can redistribute it and/or modify it
4698# under the terms of the GNU General Public License version 2 only, as
4699# published by the Free Software Foundation.  Oracle designates this
4700# particular file as subject to the "Classpath" exception as provided
4701# by Oracle in the LICENSE file that accompanied this code.
4702#
4703# This code is distributed in the hope that it will be useful, but WITHOUT
4704# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4705# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4706# version 2 for more details (a copy is included in the LICENSE file that
4707# accompanied this code).
4708#
4709# You should have received a copy of the GNU General Public License version
4710# 2 along with this work; if not, write to the Free Software Foundation,
4711# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4712#
4713# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4714# or visit www.oracle.com if you need additional information or have any
4715# questions.
4716#
4717
4718################################################################################
4719# Setup X11 Windows system
4720################################################################################
4721
4722
4723
4724################################################################################
4725# Determine which libraries are needed for this configuration
4726################################################################################
4727
4728
4729################################################################################
4730# Parse library options, and setup needed libraries
4731################################################################################
4732
4733
4734################################################################################
4735# Setup llvm (Low-Level VM)
4736################################################################################
4737
4738
4739################################################################################
4740# Setup various libraries, typically small system libraries
4741################################################################################
4742
4743
4744################################################################################
4745# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4746# redistribute it in the test image.
4747################################################################################
4748
4749
4750
4751#
4752# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4753# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4754#
4755# This code is free software; you can redistribute it and/or modify it
4756# under the terms of the GNU General Public License version 2 only, as
4757# published by the Free Software Foundation.  Oracle designates this
4758# particular file as subject to the "Classpath" exception as provided
4759# by Oracle in the LICENSE file that accompanied this code.
4760#
4761# This code is distributed in the hope that it will be useful, but WITHOUT
4762# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4763# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4764# version 2 for more details (a copy is included in the LICENSE file that
4765# accompanied this code).
4766#
4767# You should have received a copy of the GNU General Public License version
4768# 2 along with this work; if not, write to the Free Software Foundation,
4769# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4770#
4771# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4772# or visit www.oracle.com if you need additional information or have any
4773# questions.
4774#
4775
4776# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4777# Converts autoconf style CPU name to OpenJDK style, into
4778# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4779
4780
4781# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4782# Converts autoconf style OS name to OpenJDK style, into
4783# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4784
4785
4786# Expects $host_os $host_cpu $build_os and $build_cpu
4787# and $with_target_bits to have been setup!
4788#
4789# Translate the standard triplet(quadruplet) definition
4790# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4791# OPENJDK_BUILD_OS, etc.
4792
4793
4794# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4795# accordingly. Must be done after setting up build and target system, but before
4796# doing anything else with these values.
4797
4798
4799# Setup the legacy variables, for controlling the old makefiles.
4800#
4801
4802
4803# $1 - Either TARGET or BUILD to setup the variables for.
4804
4805
4806
4807
4808#%%% Build and target systems %%%
4809
4810
4811
4812
4813# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4814# Add -mX to various FLAGS variables.
4815
4816
4817
4818
4819
4820
4821#
4822# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4823# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4824#
4825# This code is free software; you can redistribute it and/or modify it
4826# under the terms of the GNU General Public License version 2 only, as
4827# published by the Free Software Foundation.  Oracle designates this
4828# particular file as subject to the "Classpath" exception as provided
4829# by Oracle in the LICENSE file that accompanied this code.
4830#
4831# This code is distributed in the hope that it will be useful, but WITHOUT
4832# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4833# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4834# version 2 for more details (a copy is included in the LICENSE file that
4835# accompanied this code).
4836#
4837# You should have received a copy of the GNU General Public License version
4838# 2 along with this work; if not, write to the Free Software Foundation,
4839# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4840#
4841# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4842# or visit www.oracle.com if you need additional information or have any
4843# questions.
4844#
4845
4846
4847
4848
4849
4850
4851
4852################################################################################
4853# Define a mechanism for importing extra prebuilt modules
4854#
4855
4856
4857
4858#
4859# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4860# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4861#
4862# This code is free software; you can redistribute it and/or modify it
4863# under the terms of the GNU General Public License version 2 only, as
4864# published by the Free Software Foundation.  Oracle designates this
4865# particular file as subject to the "Classpath" exception as provided
4866# by Oracle in the LICENSE file that accompanied this code.
4867#
4868# This code is distributed in the hope that it will be useful, but WITHOUT
4869# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4870# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4871# version 2 for more details (a copy is included in the LICENSE file that
4872# accompanied this code).
4873#
4874# You should have received a copy of the GNU General Public License version
4875# 2 along with this work; if not, write to the Free Software Foundation,
4876# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4877#
4878# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4879# or visit www.oracle.com if you need additional information or have any
4880# questions.
4881#
4882
4883########################################################################
4884# This file is responsible for detecting, verifying and setting up the
4885# toolchain, i.e. the compiler, linker and related utilities. It will setup
4886# proper paths to the binaries, but it will not setup any flags.
4887#
4888# The binaries used is determined by the toolchain type, which is the family of
4889# compilers and related tools that are used.
4890########################################################################
4891
4892
4893# All valid toolchains, regardless of platform (used by help.m4)
4894VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4895
4896# These toolchains are valid on different platforms
4897VALID_TOOLCHAINS_linux="gcc clang"
4898VALID_TOOLCHAINS_solaris="solstudio"
4899VALID_TOOLCHAINS_macosx="gcc clang"
4900VALID_TOOLCHAINS_aix="xlc"
4901VALID_TOOLCHAINS_windows="microsoft"
4902
4903# Toolchain descriptions
4904TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4905TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4906TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4907TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4908TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4909
4910# Minimum supported versions, empty means unspecified
4911TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4912TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4913TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4914TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4915TOOLCHAIN_MINIMUM_VERSION_xlc=""
4916
4917# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4918# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4919# $1 - optional variable prefix for compiler and version variables (BUILD_)
4920# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4921
4922
4923# Check if the configured compiler (C and C++) is of a specific version or
4924# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4925#
4926# Arguments:
4927#   VERSION:   The version string to check against the found version
4928#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4929#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4930#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4931
4932
4933
4934
4935# Setup a number of variables describing how native output files are
4936# named on this platform/toolchain.
4937
4938
4939# Determine which toolchain type to use, and make sure it is valid for this
4940# platform. Setup various information about the selected toolchain.
4941
4942
4943# Before we start detecting the toolchain executables, we might need some
4944# special setup, e.g. additional paths etc.
4945
4946
4947# Restore path, etc
4948
4949
4950# Check if a compiler is of the toolchain type we expect, and save the version
4951# information from it. If the compiler does not match the expected type,
4952# this function will abort using AC_MSG_ERROR. If it matches, the version will
4953# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4954# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4955#
4956# $1 = compiler to test (CC or CXX)
4957# $2 = human readable name of compiler (C or C++)
4958
4959
4960# Try to locate the given C or C++ compiler in the path, or otherwise.
4961#
4962# $1 = compiler to test (CC or CXX)
4963# $2 = human readable name of compiler (C or C++)
4964# $3 = list of compiler names to search for
4965
4966
4967# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4968# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4969# archiver (AR). Verify that the compilers are correct according to the
4970# toolchain type.
4971
4972
4973# Setup additional tools that is considered a part of the toolchain, but not the
4974# core part. Many of these are highly platform-specific and do not exist,
4975# and/or are not needed on all platforms.
4976
4977
4978# Setup the build tools (i.e, the compiler and linker used to build programs
4979# that should be run on the build platform, not the target platform, as a build
4980# helper). Since the non-cross-compile case uses the normal, target compilers
4981# for this, we can only do this after these have been setup.
4982
4983
4984# Do some additional checks on the detected tools.
4985
4986
4987# Setup the JTReg Regression Test Harness.
4988
4989
4990#
4991# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4992# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4993#
4994# This code is free software; you can redistribute it and/or modify it
4995# under the terms of the GNU General Public License version 2 only, as
4996# published by the Free Software Foundation.  Oracle designates this
4997# particular file as subject to the "Classpath" exception as provided
4998# by Oracle in the LICENSE file that accompanied this code.
4999#
5000# This code is distributed in the hope that it will be useful, but WITHOUT
5001# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5002# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5003# version 2 for more details (a copy is included in the LICENSE file that
5004# accompanied this code).
5005#
5006# You should have received a copy of the GNU General Public License version
5007# 2 along with this work; if not, write to the Free Software Foundation,
5008# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5009#
5010# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5011# or visit www.oracle.com if you need additional information or have any
5012# questions.
5013#
5014
5015################################################################################
5016# The order of these defines the priority by which we try to find them.
5017VALID_VS_VERSIONS="2013 2012 2010"
5018
5019VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5020VS_VERSION_INTERNAL_2010=100
5021VS_MSVCR_2010=msvcr100.dll
5022# We don't use msvcp on Visual Studio 2010
5023#VS_MSVCP_2010=msvcp100.dll
5024VS_ENVVAR_2010="VS100COMNTOOLS"
5025VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5026VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5027VS_VS_PLATFORM_NAME_2010="v100"
5028VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5029
5030VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5031VS_VERSION_INTERNAL_2012=110
5032VS_MSVCR_2012=msvcr110.dll
5033VS_MSVCP_2012=msvcp110.dll
5034VS_ENVVAR_2012="VS110COMNTOOLS"
5035VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5036VS_SDK_INSTALLDIR_2012=
5037VS_VS_PLATFORM_NAME_2012="v110"
5038VS_SDK_PLATFORM_NAME_2012=
5039
5040VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5041VS_VERSION_INTERNAL_2013=120
5042VS_MSVCR_2013=msvcr120.dll
5043VS_MSVCP_2013=msvcp120.dll
5044VS_ENVVAR_2013="VS120COMNTOOLS"
5045VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5046VS_SDK_INSTALLDIR_2013=
5047VS_VS_PLATFORM_NAME_2013="v120"
5048VS_SDK_PLATFORM_NAME_2013=
5049
5050################################################################################
5051
5052
5053
5054################################################################################
5055
5056
5057
5058################################################################################
5059# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5060# build environment and assigns it to VS_ENV_CMD
5061
5062
5063################################################################################
5064
5065
5066
5067################################################################################
5068# Check if the VS env variables were setup prior to running configure.
5069# If not, then find vcvarsall.bat and run it automatically, and integrate
5070# the set env variables into the spec file.
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085# This line needs to be here, verbatim, after all includes and the dummy hook
5086# definitions. It is replaced with custom functionality when building
5087# custom sources.
5088#CUSTOM_AUTOCONF_INCLUDE
5089
5090# Do not change or remove the following line, it is needed for consistency checks:
5091DATE_WHEN_GENERATED=1481879800
5092
5093###############################################################################
5094#
5095# Initialization / Boot-strapping
5096#
5097# The bootstrapping process needs to solve the "chicken or the egg" problem,
5098# thus it jumps back and forth, each time gaining something needed later on.
5099#
5100###############################################################################
5101
5102# If we are requested to print additional help, do that and then exit.
5103# This must be the very first call.
5104
5105  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5106
5107    # Print available toolchains
5108    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5109    $PRINTF "Which are valid to use depends on the build platform.\n"
5110    for toolchain in $VALID_TOOLCHAINS_all; do
5111      # Use indirect variable referencing
5112      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5113      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5114      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5115    done
5116    $PRINTF "\n"
5117
5118    # Print available jvm features
5119    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5120    $PRINTF "Which are valid to use depends on the target platform.\n  "
5121    $PRINTF "%s " $VALID_JVM_FEATURES
5122    $PRINTF "\n"
5123
5124    # And now exit directly
5125    exit 0
5126  fi
5127
5128
5129# Basic initialization that must happen first of all in the normal process.
5130
5131  # Save the original command line. This is passed to us by the wrapper configure script.
5132
5133  # Save the path variable before it gets changed
5134  ORIGINAL_PATH="$PATH"
5135
5136  DATE_WHEN_CONFIGURED=`LANG=C date`
5137
5138  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5139$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5140  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5141$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5142
5143
5144  # Start with tools that do not need have cross compilation support
5145  # and can be expected to be found in the default PATH. These tools are
5146  # used by configure.
5147
5148  # First are all the simple required tools.
5149
5150
5151
5152  # Publish this variable in the help.
5153
5154
5155  if [ -z "${BASENAME+x}" ]; then
5156    # The variable is not set by user, try to locate tool using the code snippet
5157    for ac_prog in basename
5158do
5159  # Extract the first word of "$ac_prog", so it can be a program name with args.
5160set dummy $ac_prog; ac_word=$2
5161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5162$as_echo_n "checking for $ac_word... " >&6; }
5163if ${ac_cv_path_BASENAME+:} false; then :
5164  $as_echo_n "(cached) " >&6
5165else
5166  case $BASENAME in
5167  [\\/]* | ?:[\\/]*)
5168  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5169  ;;
5170  *)
5171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5172for as_dir in $PATH
5173do
5174  IFS=$as_save_IFS
5175  test -z "$as_dir" && as_dir=.
5176    for ac_exec_ext in '' $ac_executable_extensions; do
5177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5178    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5180    break 2
5181  fi
5182done
5183  done
5184IFS=$as_save_IFS
5185
5186  ;;
5187esac
5188fi
5189BASENAME=$ac_cv_path_BASENAME
5190if test -n "$BASENAME"; then
5191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5192$as_echo "$BASENAME" >&6; }
5193else
5194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5195$as_echo "no" >&6; }
5196fi
5197
5198
5199  test -n "$BASENAME" && break
5200done
5201
5202  else
5203    # The variable is set, but is it from the command line or the environment?
5204
5205    # Try to remove the string !BASENAME! from our list.
5206    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5207    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5208      # If it failed, the variable was not from the command line. Ignore it,
5209      # but warn the user (except for BASH, which is always set by the calling BASH).
5210      if test "xBASENAME" != xBASH; then
5211        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5212$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5213      fi
5214      # Try to locate tool using the code snippet
5215      for ac_prog in basename
5216do
5217  # Extract the first word of "$ac_prog", so it can be a program name with args.
5218set dummy $ac_prog; ac_word=$2
5219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5220$as_echo_n "checking for $ac_word... " >&6; }
5221if ${ac_cv_path_BASENAME+:} false; then :
5222  $as_echo_n "(cached) " >&6
5223else
5224  case $BASENAME in
5225  [\\/]* | ?:[\\/]*)
5226  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5227  ;;
5228  *)
5229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5230for as_dir in $PATH
5231do
5232  IFS=$as_save_IFS
5233  test -z "$as_dir" && as_dir=.
5234    for ac_exec_ext in '' $ac_executable_extensions; do
5235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5236    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5238    break 2
5239  fi
5240done
5241  done
5242IFS=$as_save_IFS
5243
5244  ;;
5245esac
5246fi
5247BASENAME=$ac_cv_path_BASENAME
5248if test -n "$BASENAME"; then
5249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5250$as_echo "$BASENAME" >&6; }
5251else
5252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5253$as_echo "no" >&6; }
5254fi
5255
5256
5257  test -n "$BASENAME" && break
5258done
5259
5260    else
5261      # If it succeeded, then it was overridden by the user. We will use it
5262      # for the tool.
5263
5264      # First remove it from the list of overridden variables, so we can test
5265      # for unknown variables in the end.
5266      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5267
5268      # Check if we try to supply an empty value
5269      if test "x$BASENAME" = x; then
5270        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5271$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5272        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5273$as_echo_n "checking for BASENAME... " >&6; }
5274        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5275$as_echo "disabled" >&6; }
5276      else
5277        # Check if the provided tool contains a complete path.
5278        tool_specified="$BASENAME"
5279        tool_basename="${tool_specified##*/}"
5280        if test "x$tool_basename" = "x$tool_specified"; then
5281          # A command without a complete path is provided, search $PATH.
5282          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5283$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5284          # Extract the first word of "$tool_basename", so it can be a program name with args.
5285set dummy $tool_basename; ac_word=$2
5286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5287$as_echo_n "checking for $ac_word... " >&6; }
5288if ${ac_cv_path_BASENAME+:} false; then :
5289  $as_echo_n "(cached) " >&6
5290else
5291  case $BASENAME in
5292  [\\/]* | ?:[\\/]*)
5293  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5294  ;;
5295  *)
5296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5297for as_dir in $PATH
5298do
5299  IFS=$as_save_IFS
5300  test -z "$as_dir" && as_dir=.
5301    for ac_exec_ext in '' $ac_executable_extensions; do
5302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5303    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5305    break 2
5306  fi
5307done
5308  done
5309IFS=$as_save_IFS
5310
5311  ;;
5312esac
5313fi
5314BASENAME=$ac_cv_path_BASENAME
5315if test -n "$BASENAME"; then
5316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5317$as_echo "$BASENAME" >&6; }
5318else
5319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5320$as_echo "no" >&6; }
5321fi
5322
5323
5324          if test "x$BASENAME" = x; then
5325            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5326          fi
5327        else
5328          # Otherwise we believe it is a complete path. Use it as it is.
5329          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5330$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5331          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5332$as_echo_n "checking for BASENAME... " >&6; }
5333          if test ! -x "$tool_specified"; then
5334            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5335$as_echo "not found" >&6; }
5336            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5337          fi
5338          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5339$as_echo "$tool_specified" >&6; }
5340        fi
5341      fi
5342    fi
5343
5344  fi
5345
5346
5347
5348  if test "x$BASENAME" = x; then
5349    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5350  fi
5351
5352
5353
5354
5355
5356  # Publish this variable in the help.
5357
5358
5359  if [ -z "${BASH+x}" ]; then
5360    # The variable is not set by user, try to locate tool using the code snippet
5361    for ac_prog in bash
5362do
5363  # Extract the first word of "$ac_prog", so it can be a program name with args.
5364set dummy $ac_prog; ac_word=$2
5365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5366$as_echo_n "checking for $ac_word... " >&6; }
5367if ${ac_cv_path_BASH+:} false; then :
5368  $as_echo_n "(cached) " >&6
5369else
5370  case $BASH in
5371  [\\/]* | ?:[\\/]*)
5372  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5373  ;;
5374  *)
5375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5376for as_dir in $PATH
5377do
5378  IFS=$as_save_IFS
5379  test -z "$as_dir" && as_dir=.
5380    for ac_exec_ext in '' $ac_executable_extensions; do
5381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5382    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5384    break 2
5385  fi
5386done
5387  done
5388IFS=$as_save_IFS
5389
5390  ;;
5391esac
5392fi
5393BASH=$ac_cv_path_BASH
5394if test -n "$BASH"; then
5395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5396$as_echo "$BASH" >&6; }
5397else
5398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5399$as_echo "no" >&6; }
5400fi
5401
5402
5403  test -n "$BASH" && break
5404done
5405
5406  else
5407    # The variable is set, but is it from the command line or the environment?
5408
5409    # Try to remove the string !BASH! from our list.
5410    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5411    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5412      # If it failed, the variable was not from the command line. Ignore it,
5413      # but warn the user (except for BASH, which is always set by the calling BASH).
5414      if test "xBASH" != xBASH; then
5415        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5416$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5417      fi
5418      # Try to locate tool using the code snippet
5419      for ac_prog in bash
5420do
5421  # Extract the first word of "$ac_prog", so it can be a program name with args.
5422set dummy $ac_prog; ac_word=$2
5423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5424$as_echo_n "checking for $ac_word... " >&6; }
5425if ${ac_cv_path_BASH+:} false; then :
5426  $as_echo_n "(cached) " >&6
5427else
5428  case $BASH in
5429  [\\/]* | ?:[\\/]*)
5430  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5431  ;;
5432  *)
5433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5434for as_dir in $PATH
5435do
5436  IFS=$as_save_IFS
5437  test -z "$as_dir" && as_dir=.
5438    for ac_exec_ext in '' $ac_executable_extensions; do
5439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5440    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5442    break 2
5443  fi
5444done
5445  done
5446IFS=$as_save_IFS
5447
5448  ;;
5449esac
5450fi
5451BASH=$ac_cv_path_BASH
5452if test -n "$BASH"; then
5453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5454$as_echo "$BASH" >&6; }
5455else
5456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5457$as_echo "no" >&6; }
5458fi
5459
5460
5461  test -n "$BASH" && break
5462done
5463
5464    else
5465      # If it succeeded, then it was overridden by the user. We will use it
5466      # for the tool.
5467
5468      # First remove it from the list of overridden variables, so we can test
5469      # for unknown variables in the end.
5470      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5471
5472      # Check if we try to supply an empty value
5473      if test "x$BASH" = x; then
5474        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5475$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5476        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5477$as_echo_n "checking for BASH... " >&6; }
5478        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5479$as_echo "disabled" >&6; }
5480      else
5481        # Check if the provided tool contains a complete path.
5482        tool_specified="$BASH"
5483        tool_basename="${tool_specified##*/}"
5484        if test "x$tool_basename" = "x$tool_specified"; then
5485          # A command without a complete path is provided, search $PATH.
5486          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5487$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5488          # Extract the first word of "$tool_basename", so it can be a program name with args.
5489set dummy $tool_basename; ac_word=$2
5490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5491$as_echo_n "checking for $ac_word... " >&6; }
5492if ${ac_cv_path_BASH+:} false; then :
5493  $as_echo_n "(cached) " >&6
5494else
5495  case $BASH in
5496  [\\/]* | ?:[\\/]*)
5497  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5498  ;;
5499  *)
5500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5501for as_dir in $PATH
5502do
5503  IFS=$as_save_IFS
5504  test -z "$as_dir" && as_dir=.
5505    for ac_exec_ext in '' $ac_executable_extensions; do
5506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5507    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5509    break 2
5510  fi
5511done
5512  done
5513IFS=$as_save_IFS
5514
5515  ;;
5516esac
5517fi
5518BASH=$ac_cv_path_BASH
5519if test -n "$BASH"; then
5520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5521$as_echo "$BASH" >&6; }
5522else
5523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5524$as_echo "no" >&6; }
5525fi
5526
5527
5528          if test "x$BASH" = x; then
5529            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5530          fi
5531        else
5532          # Otherwise we believe it is a complete path. Use it as it is.
5533          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5534$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5535          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5536$as_echo_n "checking for BASH... " >&6; }
5537          if test ! -x "$tool_specified"; then
5538            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5539$as_echo "not found" >&6; }
5540            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5541          fi
5542          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5543$as_echo "$tool_specified" >&6; }
5544        fi
5545      fi
5546    fi
5547
5548  fi
5549
5550
5551
5552  if test "x$BASH" = x; then
5553    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5554  fi
5555
5556
5557
5558
5559
5560  # Publish this variable in the help.
5561
5562
5563  if [ -z "${CAT+x}" ]; then
5564    # The variable is not set by user, try to locate tool using the code snippet
5565    for ac_prog in cat
5566do
5567  # Extract the first word of "$ac_prog", so it can be a program name with args.
5568set dummy $ac_prog; ac_word=$2
5569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5570$as_echo_n "checking for $ac_word... " >&6; }
5571if ${ac_cv_path_CAT+:} false; then :
5572  $as_echo_n "(cached) " >&6
5573else
5574  case $CAT in
5575  [\\/]* | ?:[\\/]*)
5576  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5577  ;;
5578  *)
5579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5580for as_dir in $PATH
5581do
5582  IFS=$as_save_IFS
5583  test -z "$as_dir" && as_dir=.
5584    for ac_exec_ext in '' $ac_executable_extensions; do
5585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5586    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5588    break 2
5589  fi
5590done
5591  done
5592IFS=$as_save_IFS
5593
5594  ;;
5595esac
5596fi
5597CAT=$ac_cv_path_CAT
5598if test -n "$CAT"; then
5599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5600$as_echo "$CAT" >&6; }
5601else
5602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5603$as_echo "no" >&6; }
5604fi
5605
5606
5607  test -n "$CAT" && break
5608done
5609
5610  else
5611    # The variable is set, but is it from the command line or the environment?
5612
5613    # Try to remove the string !CAT! from our list.
5614    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5615    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5616      # If it failed, the variable was not from the command line. Ignore it,
5617      # but warn the user (except for BASH, which is always set by the calling BASH).
5618      if test "xCAT" != xBASH; then
5619        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5620$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5621      fi
5622      # Try to locate tool using the code snippet
5623      for ac_prog in cat
5624do
5625  # Extract the first word of "$ac_prog", so it can be a program name with args.
5626set dummy $ac_prog; ac_word=$2
5627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5628$as_echo_n "checking for $ac_word... " >&6; }
5629if ${ac_cv_path_CAT+:} false; then :
5630  $as_echo_n "(cached) " >&6
5631else
5632  case $CAT in
5633  [\\/]* | ?:[\\/]*)
5634  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5635  ;;
5636  *)
5637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5638for as_dir in $PATH
5639do
5640  IFS=$as_save_IFS
5641  test -z "$as_dir" && as_dir=.
5642    for ac_exec_ext in '' $ac_executable_extensions; do
5643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5644    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5646    break 2
5647  fi
5648done
5649  done
5650IFS=$as_save_IFS
5651
5652  ;;
5653esac
5654fi
5655CAT=$ac_cv_path_CAT
5656if test -n "$CAT"; then
5657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5658$as_echo "$CAT" >&6; }
5659else
5660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5661$as_echo "no" >&6; }
5662fi
5663
5664
5665  test -n "$CAT" && break
5666done
5667
5668    else
5669      # If it succeeded, then it was overridden by the user. We will use it
5670      # for the tool.
5671
5672      # First remove it from the list of overridden variables, so we can test
5673      # for unknown variables in the end.
5674      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5675
5676      # Check if we try to supply an empty value
5677      if test "x$CAT" = x; then
5678        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5679$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5680        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5681$as_echo_n "checking for CAT... " >&6; }
5682        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5683$as_echo "disabled" >&6; }
5684      else
5685        # Check if the provided tool contains a complete path.
5686        tool_specified="$CAT"
5687        tool_basename="${tool_specified##*/}"
5688        if test "x$tool_basename" = "x$tool_specified"; then
5689          # A command without a complete path is provided, search $PATH.
5690          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5691$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5692          # Extract the first word of "$tool_basename", so it can be a program name with args.
5693set dummy $tool_basename; ac_word=$2
5694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5695$as_echo_n "checking for $ac_word... " >&6; }
5696if ${ac_cv_path_CAT+:} false; then :
5697  $as_echo_n "(cached) " >&6
5698else
5699  case $CAT in
5700  [\\/]* | ?:[\\/]*)
5701  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5702  ;;
5703  *)
5704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5705for as_dir in $PATH
5706do
5707  IFS=$as_save_IFS
5708  test -z "$as_dir" && as_dir=.
5709    for ac_exec_ext in '' $ac_executable_extensions; do
5710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5711    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5713    break 2
5714  fi
5715done
5716  done
5717IFS=$as_save_IFS
5718
5719  ;;
5720esac
5721fi
5722CAT=$ac_cv_path_CAT
5723if test -n "$CAT"; then
5724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5725$as_echo "$CAT" >&6; }
5726else
5727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5728$as_echo "no" >&6; }
5729fi
5730
5731
5732          if test "x$CAT" = x; then
5733            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5734          fi
5735        else
5736          # Otherwise we believe it is a complete path. Use it as it is.
5737          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5738$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5739          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5740$as_echo_n "checking for CAT... " >&6; }
5741          if test ! -x "$tool_specified"; then
5742            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5743$as_echo "not found" >&6; }
5744            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5745          fi
5746          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5747$as_echo "$tool_specified" >&6; }
5748        fi
5749      fi
5750    fi
5751
5752  fi
5753
5754
5755
5756  if test "x$CAT" = x; then
5757    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5758  fi
5759
5760
5761
5762
5763
5764  # Publish this variable in the help.
5765
5766
5767  if [ -z "${CHMOD+x}" ]; then
5768    # The variable is not set by user, try to locate tool using the code snippet
5769    for ac_prog in chmod
5770do
5771  # Extract the first word of "$ac_prog", so it can be a program name with args.
5772set dummy $ac_prog; ac_word=$2
5773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5774$as_echo_n "checking for $ac_word... " >&6; }
5775if ${ac_cv_path_CHMOD+:} false; then :
5776  $as_echo_n "(cached) " >&6
5777else
5778  case $CHMOD in
5779  [\\/]* | ?:[\\/]*)
5780  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5781  ;;
5782  *)
5783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5784for as_dir in $PATH
5785do
5786  IFS=$as_save_IFS
5787  test -z "$as_dir" && as_dir=.
5788    for ac_exec_ext in '' $ac_executable_extensions; do
5789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5790    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5792    break 2
5793  fi
5794done
5795  done
5796IFS=$as_save_IFS
5797
5798  ;;
5799esac
5800fi
5801CHMOD=$ac_cv_path_CHMOD
5802if test -n "$CHMOD"; then
5803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5804$as_echo "$CHMOD" >&6; }
5805else
5806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5807$as_echo "no" >&6; }
5808fi
5809
5810
5811  test -n "$CHMOD" && break
5812done
5813
5814  else
5815    # The variable is set, but is it from the command line or the environment?
5816
5817    # Try to remove the string !CHMOD! from our list.
5818    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5819    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5820      # If it failed, the variable was not from the command line. Ignore it,
5821      # but warn the user (except for BASH, which is always set by the calling BASH).
5822      if test "xCHMOD" != xBASH; then
5823        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5824$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5825      fi
5826      # Try to locate tool using the code snippet
5827      for ac_prog in chmod
5828do
5829  # Extract the first word of "$ac_prog", so it can be a program name with args.
5830set dummy $ac_prog; ac_word=$2
5831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5832$as_echo_n "checking for $ac_word... " >&6; }
5833if ${ac_cv_path_CHMOD+:} false; then :
5834  $as_echo_n "(cached) " >&6
5835else
5836  case $CHMOD in
5837  [\\/]* | ?:[\\/]*)
5838  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5839  ;;
5840  *)
5841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5842for as_dir in $PATH
5843do
5844  IFS=$as_save_IFS
5845  test -z "$as_dir" && as_dir=.
5846    for ac_exec_ext in '' $ac_executable_extensions; do
5847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5848    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5850    break 2
5851  fi
5852done
5853  done
5854IFS=$as_save_IFS
5855
5856  ;;
5857esac
5858fi
5859CHMOD=$ac_cv_path_CHMOD
5860if test -n "$CHMOD"; then
5861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5862$as_echo "$CHMOD" >&6; }
5863else
5864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5865$as_echo "no" >&6; }
5866fi
5867
5868
5869  test -n "$CHMOD" && break
5870done
5871
5872    else
5873      # If it succeeded, then it was overridden by the user. We will use it
5874      # for the tool.
5875
5876      # First remove it from the list of overridden variables, so we can test
5877      # for unknown variables in the end.
5878      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5879
5880      # Check if we try to supply an empty value
5881      if test "x$CHMOD" = x; then
5882        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5883$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5884        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5885$as_echo_n "checking for CHMOD... " >&6; }
5886        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5887$as_echo "disabled" >&6; }
5888      else
5889        # Check if the provided tool contains a complete path.
5890        tool_specified="$CHMOD"
5891        tool_basename="${tool_specified##*/}"
5892        if test "x$tool_basename" = "x$tool_specified"; then
5893          # A command without a complete path is provided, search $PATH.
5894          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5895$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5896          # Extract the first word of "$tool_basename", so it can be a program name with args.
5897set dummy $tool_basename; ac_word=$2
5898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5899$as_echo_n "checking for $ac_word... " >&6; }
5900if ${ac_cv_path_CHMOD+:} false; then :
5901  $as_echo_n "(cached) " >&6
5902else
5903  case $CHMOD in
5904  [\\/]* | ?:[\\/]*)
5905  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5906  ;;
5907  *)
5908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5909for as_dir in $PATH
5910do
5911  IFS=$as_save_IFS
5912  test -z "$as_dir" && as_dir=.
5913    for ac_exec_ext in '' $ac_executable_extensions; do
5914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5915    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5917    break 2
5918  fi
5919done
5920  done
5921IFS=$as_save_IFS
5922
5923  ;;
5924esac
5925fi
5926CHMOD=$ac_cv_path_CHMOD
5927if test -n "$CHMOD"; then
5928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5929$as_echo "$CHMOD" >&6; }
5930else
5931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5932$as_echo "no" >&6; }
5933fi
5934
5935
5936          if test "x$CHMOD" = x; then
5937            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5938          fi
5939        else
5940          # Otherwise we believe it is a complete path. Use it as it is.
5941          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5942$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5943          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5944$as_echo_n "checking for CHMOD... " >&6; }
5945          if test ! -x "$tool_specified"; then
5946            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5947$as_echo "not found" >&6; }
5948            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5949          fi
5950          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5951$as_echo "$tool_specified" >&6; }
5952        fi
5953      fi
5954    fi
5955
5956  fi
5957
5958
5959
5960  if test "x$CHMOD" = x; then
5961    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5962  fi
5963
5964
5965
5966
5967
5968  # Publish this variable in the help.
5969
5970
5971  if [ -z "${CMP+x}" ]; then
5972    # The variable is not set by user, try to locate tool using the code snippet
5973    for ac_prog in cmp
5974do
5975  # Extract the first word of "$ac_prog", so it can be a program name with args.
5976set dummy $ac_prog; ac_word=$2
5977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5978$as_echo_n "checking for $ac_word... " >&6; }
5979if ${ac_cv_path_CMP+:} false; then :
5980  $as_echo_n "(cached) " >&6
5981else
5982  case $CMP in
5983  [\\/]* | ?:[\\/]*)
5984  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5985  ;;
5986  *)
5987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5988for as_dir in $PATH
5989do
5990  IFS=$as_save_IFS
5991  test -z "$as_dir" && as_dir=.
5992    for ac_exec_ext in '' $ac_executable_extensions; do
5993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5994    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5996    break 2
5997  fi
5998done
5999  done
6000IFS=$as_save_IFS
6001
6002  ;;
6003esac
6004fi
6005CMP=$ac_cv_path_CMP
6006if test -n "$CMP"; then
6007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6008$as_echo "$CMP" >&6; }
6009else
6010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6011$as_echo "no" >&6; }
6012fi
6013
6014
6015  test -n "$CMP" && break
6016done
6017
6018  else
6019    # The variable is set, but is it from the command line or the environment?
6020
6021    # Try to remove the string !CMP! from our list.
6022    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6023    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6024      # If it failed, the variable was not from the command line. Ignore it,
6025      # but warn the user (except for BASH, which is always set by the calling BASH).
6026      if test "xCMP" != xBASH; then
6027        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6028$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6029      fi
6030      # Try to locate tool using the code snippet
6031      for ac_prog in cmp
6032do
6033  # Extract the first word of "$ac_prog", so it can be a program name with args.
6034set dummy $ac_prog; ac_word=$2
6035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6036$as_echo_n "checking for $ac_word... " >&6; }
6037if ${ac_cv_path_CMP+:} false; then :
6038  $as_echo_n "(cached) " >&6
6039else
6040  case $CMP in
6041  [\\/]* | ?:[\\/]*)
6042  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6043  ;;
6044  *)
6045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6046for as_dir in $PATH
6047do
6048  IFS=$as_save_IFS
6049  test -z "$as_dir" && as_dir=.
6050    for ac_exec_ext in '' $ac_executable_extensions; do
6051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6052    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6054    break 2
6055  fi
6056done
6057  done
6058IFS=$as_save_IFS
6059
6060  ;;
6061esac
6062fi
6063CMP=$ac_cv_path_CMP
6064if test -n "$CMP"; then
6065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6066$as_echo "$CMP" >&6; }
6067else
6068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6069$as_echo "no" >&6; }
6070fi
6071
6072
6073  test -n "$CMP" && break
6074done
6075
6076    else
6077      # If it succeeded, then it was overridden by the user. We will use it
6078      # for the tool.
6079
6080      # First remove it from the list of overridden variables, so we can test
6081      # for unknown variables in the end.
6082      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6083
6084      # Check if we try to supply an empty value
6085      if test "x$CMP" = x; then
6086        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6087$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6088        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6089$as_echo_n "checking for CMP... " >&6; }
6090        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6091$as_echo "disabled" >&6; }
6092      else
6093        # Check if the provided tool contains a complete path.
6094        tool_specified="$CMP"
6095        tool_basename="${tool_specified##*/}"
6096        if test "x$tool_basename" = "x$tool_specified"; then
6097          # A command without a complete path is provided, search $PATH.
6098          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6099$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6100          # Extract the first word of "$tool_basename", so it can be a program name with args.
6101set dummy $tool_basename; ac_word=$2
6102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6103$as_echo_n "checking for $ac_word... " >&6; }
6104if ${ac_cv_path_CMP+:} false; then :
6105  $as_echo_n "(cached) " >&6
6106else
6107  case $CMP in
6108  [\\/]* | ?:[\\/]*)
6109  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6110  ;;
6111  *)
6112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6113for as_dir in $PATH
6114do
6115  IFS=$as_save_IFS
6116  test -z "$as_dir" && as_dir=.
6117    for ac_exec_ext in '' $ac_executable_extensions; do
6118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6119    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6121    break 2
6122  fi
6123done
6124  done
6125IFS=$as_save_IFS
6126
6127  ;;
6128esac
6129fi
6130CMP=$ac_cv_path_CMP
6131if test -n "$CMP"; then
6132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6133$as_echo "$CMP" >&6; }
6134else
6135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6136$as_echo "no" >&6; }
6137fi
6138
6139
6140          if test "x$CMP" = x; then
6141            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6142          fi
6143        else
6144          # Otherwise we believe it is a complete path. Use it as it is.
6145          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6146$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6147          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6148$as_echo_n "checking for CMP... " >&6; }
6149          if test ! -x "$tool_specified"; then
6150            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6151$as_echo "not found" >&6; }
6152            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6153          fi
6154          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6155$as_echo "$tool_specified" >&6; }
6156        fi
6157      fi
6158    fi
6159
6160  fi
6161
6162
6163
6164  if test "x$CMP" = x; then
6165    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6166  fi
6167
6168
6169
6170
6171
6172  # Publish this variable in the help.
6173
6174
6175  if [ -z "${COMM+x}" ]; then
6176    # The variable is not set by user, try to locate tool using the code snippet
6177    for ac_prog in comm
6178do
6179  # Extract the first word of "$ac_prog", so it can be a program name with args.
6180set dummy $ac_prog; ac_word=$2
6181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6182$as_echo_n "checking for $ac_word... " >&6; }
6183if ${ac_cv_path_COMM+:} false; then :
6184  $as_echo_n "(cached) " >&6
6185else
6186  case $COMM in
6187  [\\/]* | ?:[\\/]*)
6188  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6189  ;;
6190  *)
6191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6192for as_dir in $PATH
6193do
6194  IFS=$as_save_IFS
6195  test -z "$as_dir" && as_dir=.
6196    for ac_exec_ext in '' $ac_executable_extensions; do
6197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6198    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6200    break 2
6201  fi
6202done
6203  done
6204IFS=$as_save_IFS
6205
6206  ;;
6207esac
6208fi
6209COMM=$ac_cv_path_COMM
6210if test -n "$COMM"; then
6211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6212$as_echo "$COMM" >&6; }
6213else
6214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6215$as_echo "no" >&6; }
6216fi
6217
6218
6219  test -n "$COMM" && break
6220done
6221
6222  else
6223    # The variable is set, but is it from the command line or the environment?
6224
6225    # Try to remove the string !COMM! from our list.
6226    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6227    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6228      # If it failed, the variable was not from the command line. Ignore it,
6229      # but warn the user (except for BASH, which is always set by the calling BASH).
6230      if test "xCOMM" != xBASH; then
6231        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6232$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6233      fi
6234      # Try to locate tool using the code snippet
6235      for ac_prog in comm
6236do
6237  # Extract the first word of "$ac_prog", so it can be a program name with args.
6238set dummy $ac_prog; ac_word=$2
6239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6240$as_echo_n "checking for $ac_word... " >&6; }
6241if ${ac_cv_path_COMM+:} false; then :
6242  $as_echo_n "(cached) " >&6
6243else
6244  case $COMM in
6245  [\\/]* | ?:[\\/]*)
6246  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6247  ;;
6248  *)
6249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6250for as_dir in $PATH
6251do
6252  IFS=$as_save_IFS
6253  test -z "$as_dir" && as_dir=.
6254    for ac_exec_ext in '' $ac_executable_extensions; do
6255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6256    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6258    break 2
6259  fi
6260done
6261  done
6262IFS=$as_save_IFS
6263
6264  ;;
6265esac
6266fi
6267COMM=$ac_cv_path_COMM
6268if test -n "$COMM"; then
6269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6270$as_echo "$COMM" >&6; }
6271else
6272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6273$as_echo "no" >&6; }
6274fi
6275
6276
6277  test -n "$COMM" && break
6278done
6279
6280    else
6281      # If it succeeded, then it was overridden by the user. We will use it
6282      # for the tool.
6283
6284      # First remove it from the list of overridden variables, so we can test
6285      # for unknown variables in the end.
6286      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6287
6288      # Check if we try to supply an empty value
6289      if test "x$COMM" = x; then
6290        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6291$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6292        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6293$as_echo_n "checking for COMM... " >&6; }
6294        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6295$as_echo "disabled" >&6; }
6296      else
6297        # Check if the provided tool contains a complete path.
6298        tool_specified="$COMM"
6299        tool_basename="${tool_specified##*/}"
6300        if test "x$tool_basename" = "x$tool_specified"; then
6301          # A command without a complete path is provided, search $PATH.
6302          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6303$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6304          # Extract the first word of "$tool_basename", so it can be a program name with args.
6305set dummy $tool_basename; ac_word=$2
6306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6307$as_echo_n "checking for $ac_word... " >&6; }
6308if ${ac_cv_path_COMM+:} false; then :
6309  $as_echo_n "(cached) " >&6
6310else
6311  case $COMM in
6312  [\\/]* | ?:[\\/]*)
6313  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6314  ;;
6315  *)
6316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6317for as_dir in $PATH
6318do
6319  IFS=$as_save_IFS
6320  test -z "$as_dir" && as_dir=.
6321    for ac_exec_ext in '' $ac_executable_extensions; do
6322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6323    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6325    break 2
6326  fi
6327done
6328  done
6329IFS=$as_save_IFS
6330
6331  ;;
6332esac
6333fi
6334COMM=$ac_cv_path_COMM
6335if test -n "$COMM"; then
6336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6337$as_echo "$COMM" >&6; }
6338else
6339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6340$as_echo "no" >&6; }
6341fi
6342
6343
6344          if test "x$COMM" = x; then
6345            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6346          fi
6347        else
6348          # Otherwise we believe it is a complete path. Use it as it is.
6349          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6350$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6351          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6352$as_echo_n "checking for COMM... " >&6; }
6353          if test ! -x "$tool_specified"; then
6354            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6355$as_echo "not found" >&6; }
6356            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6357          fi
6358          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6359$as_echo "$tool_specified" >&6; }
6360        fi
6361      fi
6362    fi
6363
6364  fi
6365
6366
6367
6368  if test "x$COMM" = x; then
6369    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6370  fi
6371
6372
6373
6374
6375
6376  # Publish this variable in the help.
6377
6378
6379  if [ -z "${CP+x}" ]; then
6380    # The variable is not set by user, try to locate tool using the code snippet
6381    for ac_prog in cp
6382do
6383  # Extract the first word of "$ac_prog", so it can be a program name with args.
6384set dummy $ac_prog; ac_word=$2
6385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6386$as_echo_n "checking for $ac_word... " >&6; }
6387if ${ac_cv_path_CP+:} false; then :
6388  $as_echo_n "(cached) " >&6
6389else
6390  case $CP in
6391  [\\/]* | ?:[\\/]*)
6392  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6393  ;;
6394  *)
6395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6396for as_dir in $PATH
6397do
6398  IFS=$as_save_IFS
6399  test -z "$as_dir" && as_dir=.
6400    for ac_exec_ext in '' $ac_executable_extensions; do
6401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6402    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6404    break 2
6405  fi
6406done
6407  done
6408IFS=$as_save_IFS
6409
6410  ;;
6411esac
6412fi
6413CP=$ac_cv_path_CP
6414if test -n "$CP"; then
6415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6416$as_echo "$CP" >&6; }
6417else
6418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6419$as_echo "no" >&6; }
6420fi
6421
6422
6423  test -n "$CP" && break
6424done
6425
6426  else
6427    # The variable is set, but is it from the command line or the environment?
6428
6429    # Try to remove the string !CP! from our list.
6430    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6431    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6432      # If it failed, the variable was not from the command line. Ignore it,
6433      # but warn the user (except for BASH, which is always set by the calling BASH).
6434      if test "xCP" != xBASH; then
6435        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6436$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6437      fi
6438      # Try to locate tool using the code snippet
6439      for ac_prog in cp
6440do
6441  # Extract the first word of "$ac_prog", so it can be a program name with args.
6442set dummy $ac_prog; ac_word=$2
6443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6444$as_echo_n "checking for $ac_word... " >&6; }
6445if ${ac_cv_path_CP+:} false; then :
6446  $as_echo_n "(cached) " >&6
6447else
6448  case $CP in
6449  [\\/]* | ?:[\\/]*)
6450  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6451  ;;
6452  *)
6453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6454for as_dir in $PATH
6455do
6456  IFS=$as_save_IFS
6457  test -z "$as_dir" && as_dir=.
6458    for ac_exec_ext in '' $ac_executable_extensions; do
6459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6460    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6462    break 2
6463  fi
6464done
6465  done
6466IFS=$as_save_IFS
6467
6468  ;;
6469esac
6470fi
6471CP=$ac_cv_path_CP
6472if test -n "$CP"; then
6473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6474$as_echo "$CP" >&6; }
6475else
6476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6477$as_echo "no" >&6; }
6478fi
6479
6480
6481  test -n "$CP" && break
6482done
6483
6484    else
6485      # If it succeeded, then it was overridden by the user. We will use it
6486      # for the tool.
6487
6488      # First remove it from the list of overridden variables, so we can test
6489      # for unknown variables in the end.
6490      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6491
6492      # Check if we try to supply an empty value
6493      if test "x$CP" = x; then
6494        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6495$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6496        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6497$as_echo_n "checking for CP... " >&6; }
6498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6499$as_echo "disabled" >&6; }
6500      else
6501        # Check if the provided tool contains a complete path.
6502        tool_specified="$CP"
6503        tool_basename="${tool_specified##*/}"
6504        if test "x$tool_basename" = "x$tool_specified"; then
6505          # A command without a complete path is provided, search $PATH.
6506          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6507$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6508          # Extract the first word of "$tool_basename", so it can be a program name with args.
6509set dummy $tool_basename; ac_word=$2
6510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6511$as_echo_n "checking for $ac_word... " >&6; }
6512if ${ac_cv_path_CP+:} false; then :
6513  $as_echo_n "(cached) " >&6
6514else
6515  case $CP in
6516  [\\/]* | ?:[\\/]*)
6517  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6518  ;;
6519  *)
6520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6521for as_dir in $PATH
6522do
6523  IFS=$as_save_IFS
6524  test -z "$as_dir" && as_dir=.
6525    for ac_exec_ext in '' $ac_executable_extensions; do
6526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6527    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6529    break 2
6530  fi
6531done
6532  done
6533IFS=$as_save_IFS
6534
6535  ;;
6536esac
6537fi
6538CP=$ac_cv_path_CP
6539if test -n "$CP"; then
6540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6541$as_echo "$CP" >&6; }
6542else
6543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6544$as_echo "no" >&6; }
6545fi
6546
6547
6548          if test "x$CP" = x; then
6549            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6550          fi
6551        else
6552          # Otherwise we believe it is a complete path. Use it as it is.
6553          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6554$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6555          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6556$as_echo_n "checking for CP... " >&6; }
6557          if test ! -x "$tool_specified"; then
6558            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6559$as_echo "not found" >&6; }
6560            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6561          fi
6562          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6563$as_echo "$tool_specified" >&6; }
6564        fi
6565      fi
6566    fi
6567
6568  fi
6569
6570
6571
6572  if test "x$CP" = x; then
6573    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6574  fi
6575
6576
6577
6578
6579
6580  # Publish this variable in the help.
6581
6582
6583  if [ -z "${CUT+x}" ]; then
6584    # The variable is not set by user, try to locate tool using the code snippet
6585    for ac_prog in cut
6586do
6587  # Extract the first word of "$ac_prog", so it can be a program name with args.
6588set dummy $ac_prog; ac_word=$2
6589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6590$as_echo_n "checking for $ac_word... " >&6; }
6591if ${ac_cv_path_CUT+:} false; then :
6592  $as_echo_n "(cached) " >&6
6593else
6594  case $CUT in
6595  [\\/]* | ?:[\\/]*)
6596  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6597  ;;
6598  *)
6599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6600for as_dir in $PATH
6601do
6602  IFS=$as_save_IFS
6603  test -z "$as_dir" && as_dir=.
6604    for ac_exec_ext in '' $ac_executable_extensions; do
6605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6606    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6608    break 2
6609  fi
6610done
6611  done
6612IFS=$as_save_IFS
6613
6614  ;;
6615esac
6616fi
6617CUT=$ac_cv_path_CUT
6618if test -n "$CUT"; then
6619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6620$as_echo "$CUT" >&6; }
6621else
6622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6623$as_echo "no" >&6; }
6624fi
6625
6626
6627  test -n "$CUT" && break
6628done
6629
6630  else
6631    # The variable is set, but is it from the command line or the environment?
6632
6633    # Try to remove the string !CUT! from our list.
6634    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6635    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6636      # If it failed, the variable was not from the command line. Ignore it,
6637      # but warn the user (except for BASH, which is always set by the calling BASH).
6638      if test "xCUT" != xBASH; then
6639        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6640$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6641      fi
6642      # Try to locate tool using the code snippet
6643      for ac_prog in cut
6644do
6645  # Extract the first word of "$ac_prog", so it can be a program name with args.
6646set dummy $ac_prog; ac_word=$2
6647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6648$as_echo_n "checking for $ac_word... " >&6; }
6649if ${ac_cv_path_CUT+:} false; then :
6650  $as_echo_n "(cached) " >&6
6651else
6652  case $CUT in
6653  [\\/]* | ?:[\\/]*)
6654  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6655  ;;
6656  *)
6657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6658for as_dir in $PATH
6659do
6660  IFS=$as_save_IFS
6661  test -z "$as_dir" && as_dir=.
6662    for ac_exec_ext in '' $ac_executable_extensions; do
6663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6664    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6666    break 2
6667  fi
6668done
6669  done
6670IFS=$as_save_IFS
6671
6672  ;;
6673esac
6674fi
6675CUT=$ac_cv_path_CUT
6676if test -n "$CUT"; then
6677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6678$as_echo "$CUT" >&6; }
6679else
6680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6681$as_echo "no" >&6; }
6682fi
6683
6684
6685  test -n "$CUT" && break
6686done
6687
6688    else
6689      # If it succeeded, then it was overridden by the user. We will use it
6690      # for the tool.
6691
6692      # First remove it from the list of overridden variables, so we can test
6693      # for unknown variables in the end.
6694      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6695
6696      # Check if we try to supply an empty value
6697      if test "x$CUT" = x; then
6698        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6699$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6700        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6701$as_echo_n "checking for CUT... " >&6; }
6702        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6703$as_echo "disabled" >&6; }
6704      else
6705        # Check if the provided tool contains a complete path.
6706        tool_specified="$CUT"
6707        tool_basename="${tool_specified##*/}"
6708        if test "x$tool_basename" = "x$tool_specified"; then
6709          # A command without a complete path is provided, search $PATH.
6710          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6711$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6712          # Extract the first word of "$tool_basename", so it can be a program name with args.
6713set dummy $tool_basename; ac_word=$2
6714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6715$as_echo_n "checking for $ac_word... " >&6; }
6716if ${ac_cv_path_CUT+:} false; then :
6717  $as_echo_n "(cached) " >&6
6718else
6719  case $CUT in
6720  [\\/]* | ?:[\\/]*)
6721  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6722  ;;
6723  *)
6724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6725for as_dir in $PATH
6726do
6727  IFS=$as_save_IFS
6728  test -z "$as_dir" && as_dir=.
6729    for ac_exec_ext in '' $ac_executable_extensions; do
6730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6731    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6733    break 2
6734  fi
6735done
6736  done
6737IFS=$as_save_IFS
6738
6739  ;;
6740esac
6741fi
6742CUT=$ac_cv_path_CUT
6743if test -n "$CUT"; then
6744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6745$as_echo "$CUT" >&6; }
6746else
6747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6748$as_echo "no" >&6; }
6749fi
6750
6751
6752          if test "x$CUT" = x; then
6753            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6754          fi
6755        else
6756          # Otherwise we believe it is a complete path. Use it as it is.
6757          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6758$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6759          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6760$as_echo_n "checking for CUT... " >&6; }
6761          if test ! -x "$tool_specified"; then
6762            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6763$as_echo "not found" >&6; }
6764            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6765          fi
6766          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6767$as_echo "$tool_specified" >&6; }
6768        fi
6769      fi
6770    fi
6771
6772  fi
6773
6774
6775
6776  if test "x$CUT" = x; then
6777    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6778  fi
6779
6780
6781
6782
6783
6784  # Publish this variable in the help.
6785
6786
6787  if [ -z "${DATE+x}" ]; then
6788    # The variable is not set by user, try to locate tool using the code snippet
6789    for ac_prog in date
6790do
6791  # Extract the first word of "$ac_prog", so it can be a program name with args.
6792set dummy $ac_prog; ac_word=$2
6793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6794$as_echo_n "checking for $ac_word... " >&6; }
6795if ${ac_cv_path_DATE+:} false; then :
6796  $as_echo_n "(cached) " >&6
6797else
6798  case $DATE in
6799  [\\/]* | ?:[\\/]*)
6800  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6801  ;;
6802  *)
6803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6804for as_dir in $PATH
6805do
6806  IFS=$as_save_IFS
6807  test -z "$as_dir" && as_dir=.
6808    for ac_exec_ext in '' $ac_executable_extensions; do
6809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6810    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6812    break 2
6813  fi
6814done
6815  done
6816IFS=$as_save_IFS
6817
6818  ;;
6819esac
6820fi
6821DATE=$ac_cv_path_DATE
6822if test -n "$DATE"; then
6823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6824$as_echo "$DATE" >&6; }
6825else
6826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6827$as_echo "no" >&6; }
6828fi
6829
6830
6831  test -n "$DATE" && break
6832done
6833
6834  else
6835    # The variable is set, but is it from the command line or the environment?
6836
6837    # Try to remove the string !DATE! from our list.
6838    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6839    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6840      # If it failed, the variable was not from the command line. Ignore it,
6841      # but warn the user (except for BASH, which is always set by the calling BASH).
6842      if test "xDATE" != xBASH; then
6843        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6844$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6845      fi
6846      # Try to locate tool using the code snippet
6847      for ac_prog in date
6848do
6849  # Extract the first word of "$ac_prog", so it can be a program name with args.
6850set dummy $ac_prog; ac_word=$2
6851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6852$as_echo_n "checking for $ac_word... " >&6; }
6853if ${ac_cv_path_DATE+:} false; then :
6854  $as_echo_n "(cached) " >&6
6855else
6856  case $DATE in
6857  [\\/]* | ?:[\\/]*)
6858  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6859  ;;
6860  *)
6861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6862for as_dir in $PATH
6863do
6864  IFS=$as_save_IFS
6865  test -z "$as_dir" && as_dir=.
6866    for ac_exec_ext in '' $ac_executable_extensions; do
6867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6868    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6870    break 2
6871  fi
6872done
6873  done
6874IFS=$as_save_IFS
6875
6876  ;;
6877esac
6878fi
6879DATE=$ac_cv_path_DATE
6880if test -n "$DATE"; then
6881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6882$as_echo "$DATE" >&6; }
6883else
6884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6885$as_echo "no" >&6; }
6886fi
6887
6888
6889  test -n "$DATE" && break
6890done
6891
6892    else
6893      # If it succeeded, then it was overridden by the user. We will use it
6894      # for the tool.
6895
6896      # First remove it from the list of overridden variables, so we can test
6897      # for unknown variables in the end.
6898      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6899
6900      # Check if we try to supply an empty value
6901      if test "x$DATE" = x; then
6902        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6903$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6904        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6905$as_echo_n "checking for DATE... " >&6; }
6906        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6907$as_echo "disabled" >&6; }
6908      else
6909        # Check if the provided tool contains a complete path.
6910        tool_specified="$DATE"
6911        tool_basename="${tool_specified##*/}"
6912        if test "x$tool_basename" = "x$tool_specified"; then
6913          # A command without a complete path is provided, search $PATH.
6914          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6915$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6916          # Extract the first word of "$tool_basename", so it can be a program name with args.
6917set dummy $tool_basename; ac_word=$2
6918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6919$as_echo_n "checking for $ac_word... " >&6; }
6920if ${ac_cv_path_DATE+:} false; then :
6921  $as_echo_n "(cached) " >&6
6922else
6923  case $DATE in
6924  [\\/]* | ?:[\\/]*)
6925  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6926  ;;
6927  *)
6928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6929for as_dir in $PATH
6930do
6931  IFS=$as_save_IFS
6932  test -z "$as_dir" && as_dir=.
6933    for ac_exec_ext in '' $ac_executable_extensions; do
6934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6935    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6937    break 2
6938  fi
6939done
6940  done
6941IFS=$as_save_IFS
6942
6943  ;;
6944esac
6945fi
6946DATE=$ac_cv_path_DATE
6947if test -n "$DATE"; then
6948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6949$as_echo "$DATE" >&6; }
6950else
6951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6952$as_echo "no" >&6; }
6953fi
6954
6955
6956          if test "x$DATE" = x; then
6957            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6958          fi
6959        else
6960          # Otherwise we believe it is a complete path. Use it as it is.
6961          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6962$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6963          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6964$as_echo_n "checking for DATE... " >&6; }
6965          if test ! -x "$tool_specified"; then
6966            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6967$as_echo "not found" >&6; }
6968            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6969          fi
6970          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6971$as_echo "$tool_specified" >&6; }
6972        fi
6973      fi
6974    fi
6975
6976  fi
6977
6978
6979
6980  if test "x$DATE" = x; then
6981    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6982  fi
6983
6984
6985
6986
6987
6988  # Publish this variable in the help.
6989
6990
6991  if [ -z "${DIFF+x}" ]; then
6992    # The variable is not set by user, try to locate tool using the code snippet
6993    for ac_prog in gdiff diff
6994do
6995  # Extract the first word of "$ac_prog", so it can be a program name with args.
6996set dummy $ac_prog; ac_word=$2
6997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6998$as_echo_n "checking for $ac_word... " >&6; }
6999if ${ac_cv_path_DIFF+:} false; then :
7000  $as_echo_n "(cached) " >&6
7001else
7002  case $DIFF in
7003  [\\/]* | ?:[\\/]*)
7004  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7005  ;;
7006  *)
7007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7008for as_dir in $PATH
7009do
7010  IFS=$as_save_IFS
7011  test -z "$as_dir" && as_dir=.
7012    for ac_exec_ext in '' $ac_executable_extensions; do
7013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7014    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7016    break 2
7017  fi
7018done
7019  done
7020IFS=$as_save_IFS
7021
7022  ;;
7023esac
7024fi
7025DIFF=$ac_cv_path_DIFF
7026if test -n "$DIFF"; then
7027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7028$as_echo "$DIFF" >&6; }
7029else
7030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7031$as_echo "no" >&6; }
7032fi
7033
7034
7035  test -n "$DIFF" && break
7036done
7037
7038  else
7039    # The variable is set, but is it from the command line or the environment?
7040
7041    # Try to remove the string !DIFF! from our list.
7042    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7043    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7044      # If it failed, the variable was not from the command line. Ignore it,
7045      # but warn the user (except for BASH, which is always set by the calling BASH).
7046      if test "xDIFF" != xBASH; then
7047        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7048$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7049      fi
7050      # Try to locate tool using the code snippet
7051      for ac_prog in gdiff diff
7052do
7053  # Extract the first word of "$ac_prog", so it can be a program name with args.
7054set dummy $ac_prog; ac_word=$2
7055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7056$as_echo_n "checking for $ac_word... " >&6; }
7057if ${ac_cv_path_DIFF+:} false; then :
7058  $as_echo_n "(cached) " >&6
7059else
7060  case $DIFF in
7061  [\\/]* | ?:[\\/]*)
7062  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7063  ;;
7064  *)
7065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7066for as_dir in $PATH
7067do
7068  IFS=$as_save_IFS
7069  test -z "$as_dir" && as_dir=.
7070    for ac_exec_ext in '' $ac_executable_extensions; do
7071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7072    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7074    break 2
7075  fi
7076done
7077  done
7078IFS=$as_save_IFS
7079
7080  ;;
7081esac
7082fi
7083DIFF=$ac_cv_path_DIFF
7084if test -n "$DIFF"; then
7085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7086$as_echo "$DIFF" >&6; }
7087else
7088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7089$as_echo "no" >&6; }
7090fi
7091
7092
7093  test -n "$DIFF" && break
7094done
7095
7096    else
7097      # If it succeeded, then it was overridden by the user. We will use it
7098      # for the tool.
7099
7100      # First remove it from the list of overridden variables, so we can test
7101      # for unknown variables in the end.
7102      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7103
7104      # Check if we try to supply an empty value
7105      if test "x$DIFF" = x; then
7106        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7107$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7108        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7109$as_echo_n "checking for DIFF... " >&6; }
7110        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7111$as_echo "disabled" >&6; }
7112      else
7113        # Check if the provided tool contains a complete path.
7114        tool_specified="$DIFF"
7115        tool_basename="${tool_specified##*/}"
7116        if test "x$tool_basename" = "x$tool_specified"; then
7117          # A command without a complete path is provided, search $PATH.
7118          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7119$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7120          # Extract the first word of "$tool_basename", so it can be a program name with args.
7121set dummy $tool_basename; ac_word=$2
7122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7123$as_echo_n "checking for $ac_word... " >&6; }
7124if ${ac_cv_path_DIFF+:} false; then :
7125  $as_echo_n "(cached) " >&6
7126else
7127  case $DIFF in
7128  [\\/]* | ?:[\\/]*)
7129  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7130  ;;
7131  *)
7132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7133for as_dir in $PATH
7134do
7135  IFS=$as_save_IFS
7136  test -z "$as_dir" && as_dir=.
7137    for ac_exec_ext in '' $ac_executable_extensions; do
7138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7139    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7141    break 2
7142  fi
7143done
7144  done
7145IFS=$as_save_IFS
7146
7147  ;;
7148esac
7149fi
7150DIFF=$ac_cv_path_DIFF
7151if test -n "$DIFF"; then
7152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7153$as_echo "$DIFF" >&6; }
7154else
7155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7156$as_echo "no" >&6; }
7157fi
7158
7159
7160          if test "x$DIFF" = x; then
7161            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7162          fi
7163        else
7164          # Otherwise we believe it is a complete path. Use it as it is.
7165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7166$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7167          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7168$as_echo_n "checking for DIFF... " >&6; }
7169          if test ! -x "$tool_specified"; then
7170            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7171$as_echo "not found" >&6; }
7172            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7173          fi
7174          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7175$as_echo "$tool_specified" >&6; }
7176        fi
7177      fi
7178    fi
7179
7180  fi
7181
7182
7183
7184  if test "x$DIFF" = x; then
7185    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7186  fi
7187
7188
7189
7190
7191
7192  # Publish this variable in the help.
7193
7194
7195  if [ -z "${DIRNAME+x}" ]; then
7196    # The variable is not set by user, try to locate tool using the code snippet
7197    for ac_prog in dirname
7198do
7199  # Extract the first word of "$ac_prog", so it can be a program name with args.
7200set dummy $ac_prog; ac_word=$2
7201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7202$as_echo_n "checking for $ac_word... " >&6; }
7203if ${ac_cv_path_DIRNAME+:} false; then :
7204  $as_echo_n "(cached) " >&6
7205else
7206  case $DIRNAME in
7207  [\\/]* | ?:[\\/]*)
7208  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7209  ;;
7210  *)
7211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7212for as_dir in $PATH
7213do
7214  IFS=$as_save_IFS
7215  test -z "$as_dir" && as_dir=.
7216    for ac_exec_ext in '' $ac_executable_extensions; do
7217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7218    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7220    break 2
7221  fi
7222done
7223  done
7224IFS=$as_save_IFS
7225
7226  ;;
7227esac
7228fi
7229DIRNAME=$ac_cv_path_DIRNAME
7230if test -n "$DIRNAME"; then
7231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7232$as_echo "$DIRNAME" >&6; }
7233else
7234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7235$as_echo "no" >&6; }
7236fi
7237
7238
7239  test -n "$DIRNAME" && break
7240done
7241
7242  else
7243    # The variable is set, but is it from the command line or the environment?
7244
7245    # Try to remove the string !DIRNAME! from our list.
7246    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7247    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7248      # If it failed, the variable was not from the command line. Ignore it,
7249      # but warn the user (except for BASH, which is always set by the calling BASH).
7250      if test "xDIRNAME" != xBASH; then
7251        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7252$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7253      fi
7254      # Try to locate tool using the code snippet
7255      for ac_prog in dirname
7256do
7257  # Extract the first word of "$ac_prog", so it can be a program name with args.
7258set dummy $ac_prog; ac_word=$2
7259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7260$as_echo_n "checking for $ac_word... " >&6; }
7261if ${ac_cv_path_DIRNAME+:} false; then :
7262  $as_echo_n "(cached) " >&6
7263else
7264  case $DIRNAME in
7265  [\\/]* | ?:[\\/]*)
7266  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7267  ;;
7268  *)
7269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7270for as_dir in $PATH
7271do
7272  IFS=$as_save_IFS
7273  test -z "$as_dir" && as_dir=.
7274    for ac_exec_ext in '' $ac_executable_extensions; do
7275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7276    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7278    break 2
7279  fi
7280done
7281  done
7282IFS=$as_save_IFS
7283
7284  ;;
7285esac
7286fi
7287DIRNAME=$ac_cv_path_DIRNAME
7288if test -n "$DIRNAME"; then
7289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7290$as_echo "$DIRNAME" >&6; }
7291else
7292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7293$as_echo "no" >&6; }
7294fi
7295
7296
7297  test -n "$DIRNAME" && break
7298done
7299
7300    else
7301      # If it succeeded, then it was overridden by the user. We will use it
7302      # for the tool.
7303
7304      # First remove it from the list of overridden variables, so we can test
7305      # for unknown variables in the end.
7306      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7307
7308      # Check if we try to supply an empty value
7309      if test "x$DIRNAME" = x; then
7310        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7311$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7312        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7313$as_echo_n "checking for DIRNAME... " >&6; }
7314        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7315$as_echo "disabled" >&6; }
7316      else
7317        # Check if the provided tool contains a complete path.
7318        tool_specified="$DIRNAME"
7319        tool_basename="${tool_specified##*/}"
7320        if test "x$tool_basename" = "x$tool_specified"; then
7321          # A command without a complete path is provided, search $PATH.
7322          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7323$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7324          # Extract the first word of "$tool_basename", so it can be a program name with args.
7325set dummy $tool_basename; ac_word=$2
7326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7327$as_echo_n "checking for $ac_word... " >&6; }
7328if ${ac_cv_path_DIRNAME+:} false; then :
7329  $as_echo_n "(cached) " >&6
7330else
7331  case $DIRNAME in
7332  [\\/]* | ?:[\\/]*)
7333  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7334  ;;
7335  *)
7336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7337for as_dir in $PATH
7338do
7339  IFS=$as_save_IFS
7340  test -z "$as_dir" && as_dir=.
7341    for ac_exec_ext in '' $ac_executable_extensions; do
7342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7343    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7345    break 2
7346  fi
7347done
7348  done
7349IFS=$as_save_IFS
7350
7351  ;;
7352esac
7353fi
7354DIRNAME=$ac_cv_path_DIRNAME
7355if test -n "$DIRNAME"; then
7356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7357$as_echo "$DIRNAME" >&6; }
7358else
7359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7360$as_echo "no" >&6; }
7361fi
7362
7363
7364          if test "x$DIRNAME" = x; then
7365            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7366          fi
7367        else
7368          # Otherwise we believe it is a complete path. Use it as it is.
7369          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7370$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7371          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7372$as_echo_n "checking for DIRNAME... " >&6; }
7373          if test ! -x "$tool_specified"; then
7374            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7375$as_echo "not found" >&6; }
7376            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7377          fi
7378          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7379$as_echo "$tool_specified" >&6; }
7380        fi
7381      fi
7382    fi
7383
7384  fi
7385
7386
7387
7388  if test "x$DIRNAME" = x; then
7389    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7390  fi
7391
7392
7393
7394
7395
7396  # Publish this variable in the help.
7397
7398
7399  if [ -z "${ECHO+x}" ]; then
7400    # The variable is not set by user, try to locate tool using the code snippet
7401    for ac_prog in echo
7402do
7403  # Extract the first word of "$ac_prog", so it can be a program name with args.
7404set dummy $ac_prog; ac_word=$2
7405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7406$as_echo_n "checking for $ac_word... " >&6; }
7407if ${ac_cv_path_ECHO+:} false; then :
7408  $as_echo_n "(cached) " >&6
7409else
7410  case $ECHO in
7411  [\\/]* | ?:[\\/]*)
7412  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7413  ;;
7414  *)
7415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7416for as_dir in $PATH
7417do
7418  IFS=$as_save_IFS
7419  test -z "$as_dir" && as_dir=.
7420    for ac_exec_ext in '' $ac_executable_extensions; do
7421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7422    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7424    break 2
7425  fi
7426done
7427  done
7428IFS=$as_save_IFS
7429
7430  ;;
7431esac
7432fi
7433ECHO=$ac_cv_path_ECHO
7434if test -n "$ECHO"; then
7435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7436$as_echo "$ECHO" >&6; }
7437else
7438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7439$as_echo "no" >&6; }
7440fi
7441
7442
7443  test -n "$ECHO" && break
7444done
7445
7446  else
7447    # The variable is set, but is it from the command line or the environment?
7448
7449    # Try to remove the string !ECHO! from our list.
7450    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7451    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7452      # If it failed, the variable was not from the command line. Ignore it,
7453      # but warn the user (except for BASH, which is always set by the calling BASH).
7454      if test "xECHO" != xBASH; then
7455        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7456$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7457      fi
7458      # Try to locate tool using the code snippet
7459      for ac_prog in echo
7460do
7461  # Extract the first word of "$ac_prog", so it can be a program name with args.
7462set dummy $ac_prog; ac_word=$2
7463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7464$as_echo_n "checking for $ac_word... " >&6; }
7465if ${ac_cv_path_ECHO+:} false; then :
7466  $as_echo_n "(cached) " >&6
7467else
7468  case $ECHO in
7469  [\\/]* | ?:[\\/]*)
7470  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7471  ;;
7472  *)
7473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7474for as_dir in $PATH
7475do
7476  IFS=$as_save_IFS
7477  test -z "$as_dir" && as_dir=.
7478    for ac_exec_ext in '' $ac_executable_extensions; do
7479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7480    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7482    break 2
7483  fi
7484done
7485  done
7486IFS=$as_save_IFS
7487
7488  ;;
7489esac
7490fi
7491ECHO=$ac_cv_path_ECHO
7492if test -n "$ECHO"; then
7493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7494$as_echo "$ECHO" >&6; }
7495else
7496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7497$as_echo "no" >&6; }
7498fi
7499
7500
7501  test -n "$ECHO" && break
7502done
7503
7504    else
7505      # If it succeeded, then it was overridden by the user. We will use it
7506      # for the tool.
7507
7508      # First remove it from the list of overridden variables, so we can test
7509      # for unknown variables in the end.
7510      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7511
7512      # Check if we try to supply an empty value
7513      if test "x$ECHO" = x; then
7514        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7515$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7516        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7517$as_echo_n "checking for ECHO... " >&6; }
7518        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7519$as_echo "disabled" >&6; }
7520      else
7521        # Check if the provided tool contains a complete path.
7522        tool_specified="$ECHO"
7523        tool_basename="${tool_specified##*/}"
7524        if test "x$tool_basename" = "x$tool_specified"; then
7525          # A command without a complete path is provided, search $PATH.
7526          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7527$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7528          # Extract the first word of "$tool_basename", so it can be a program name with args.
7529set dummy $tool_basename; ac_word=$2
7530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7531$as_echo_n "checking for $ac_word... " >&6; }
7532if ${ac_cv_path_ECHO+:} false; then :
7533  $as_echo_n "(cached) " >&6
7534else
7535  case $ECHO in
7536  [\\/]* | ?:[\\/]*)
7537  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7538  ;;
7539  *)
7540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7541for as_dir in $PATH
7542do
7543  IFS=$as_save_IFS
7544  test -z "$as_dir" && as_dir=.
7545    for ac_exec_ext in '' $ac_executable_extensions; do
7546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7547    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7549    break 2
7550  fi
7551done
7552  done
7553IFS=$as_save_IFS
7554
7555  ;;
7556esac
7557fi
7558ECHO=$ac_cv_path_ECHO
7559if test -n "$ECHO"; then
7560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7561$as_echo "$ECHO" >&6; }
7562else
7563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7564$as_echo "no" >&6; }
7565fi
7566
7567
7568          if test "x$ECHO" = x; then
7569            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7570          fi
7571        else
7572          # Otherwise we believe it is a complete path. Use it as it is.
7573          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7574$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7575          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7576$as_echo_n "checking for ECHO... " >&6; }
7577          if test ! -x "$tool_specified"; then
7578            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7579$as_echo "not found" >&6; }
7580            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7581          fi
7582          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7583$as_echo "$tool_specified" >&6; }
7584        fi
7585      fi
7586    fi
7587
7588  fi
7589
7590
7591
7592  if test "x$ECHO" = x; then
7593    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7594  fi
7595
7596
7597
7598
7599
7600  # Publish this variable in the help.
7601
7602
7603  if [ -z "${EXPR+x}" ]; then
7604    # The variable is not set by user, try to locate tool using the code snippet
7605    for ac_prog in expr
7606do
7607  # Extract the first word of "$ac_prog", so it can be a program name with args.
7608set dummy $ac_prog; ac_word=$2
7609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7610$as_echo_n "checking for $ac_word... " >&6; }
7611if ${ac_cv_path_EXPR+:} false; then :
7612  $as_echo_n "(cached) " >&6
7613else
7614  case $EXPR in
7615  [\\/]* | ?:[\\/]*)
7616  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7617  ;;
7618  *)
7619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7620for as_dir in $PATH
7621do
7622  IFS=$as_save_IFS
7623  test -z "$as_dir" && as_dir=.
7624    for ac_exec_ext in '' $ac_executable_extensions; do
7625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7626    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7628    break 2
7629  fi
7630done
7631  done
7632IFS=$as_save_IFS
7633
7634  ;;
7635esac
7636fi
7637EXPR=$ac_cv_path_EXPR
7638if test -n "$EXPR"; then
7639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7640$as_echo "$EXPR" >&6; }
7641else
7642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7643$as_echo "no" >&6; }
7644fi
7645
7646
7647  test -n "$EXPR" && break
7648done
7649
7650  else
7651    # The variable is set, but is it from the command line or the environment?
7652
7653    # Try to remove the string !EXPR! from our list.
7654    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7655    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7656      # If it failed, the variable was not from the command line. Ignore it,
7657      # but warn the user (except for BASH, which is always set by the calling BASH).
7658      if test "xEXPR" != xBASH; then
7659        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7660$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7661      fi
7662      # Try to locate tool using the code snippet
7663      for ac_prog in expr
7664do
7665  # Extract the first word of "$ac_prog", so it can be a program name with args.
7666set dummy $ac_prog; ac_word=$2
7667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7668$as_echo_n "checking for $ac_word... " >&6; }
7669if ${ac_cv_path_EXPR+:} false; then :
7670  $as_echo_n "(cached) " >&6
7671else
7672  case $EXPR in
7673  [\\/]* | ?:[\\/]*)
7674  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7675  ;;
7676  *)
7677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7678for as_dir in $PATH
7679do
7680  IFS=$as_save_IFS
7681  test -z "$as_dir" && as_dir=.
7682    for ac_exec_ext in '' $ac_executable_extensions; do
7683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7684    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7686    break 2
7687  fi
7688done
7689  done
7690IFS=$as_save_IFS
7691
7692  ;;
7693esac
7694fi
7695EXPR=$ac_cv_path_EXPR
7696if test -n "$EXPR"; then
7697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7698$as_echo "$EXPR" >&6; }
7699else
7700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7701$as_echo "no" >&6; }
7702fi
7703
7704
7705  test -n "$EXPR" && break
7706done
7707
7708    else
7709      # If it succeeded, then it was overridden by the user. We will use it
7710      # for the tool.
7711
7712      # First remove it from the list of overridden variables, so we can test
7713      # for unknown variables in the end.
7714      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7715
7716      # Check if we try to supply an empty value
7717      if test "x$EXPR" = x; then
7718        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7719$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7720        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7721$as_echo_n "checking for EXPR... " >&6; }
7722        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7723$as_echo "disabled" >&6; }
7724      else
7725        # Check if the provided tool contains a complete path.
7726        tool_specified="$EXPR"
7727        tool_basename="${tool_specified##*/}"
7728        if test "x$tool_basename" = "x$tool_specified"; then
7729          # A command without a complete path is provided, search $PATH.
7730          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7731$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7732          # Extract the first word of "$tool_basename", so it can be a program name with args.
7733set dummy $tool_basename; ac_word=$2
7734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7735$as_echo_n "checking for $ac_word... " >&6; }
7736if ${ac_cv_path_EXPR+:} false; then :
7737  $as_echo_n "(cached) " >&6
7738else
7739  case $EXPR in
7740  [\\/]* | ?:[\\/]*)
7741  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7742  ;;
7743  *)
7744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7745for as_dir in $PATH
7746do
7747  IFS=$as_save_IFS
7748  test -z "$as_dir" && as_dir=.
7749    for ac_exec_ext in '' $ac_executable_extensions; do
7750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7751    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7753    break 2
7754  fi
7755done
7756  done
7757IFS=$as_save_IFS
7758
7759  ;;
7760esac
7761fi
7762EXPR=$ac_cv_path_EXPR
7763if test -n "$EXPR"; then
7764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7765$as_echo "$EXPR" >&6; }
7766else
7767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7768$as_echo "no" >&6; }
7769fi
7770
7771
7772          if test "x$EXPR" = x; then
7773            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7774          fi
7775        else
7776          # Otherwise we believe it is a complete path. Use it as it is.
7777          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7778$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7779          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7780$as_echo_n "checking for EXPR... " >&6; }
7781          if test ! -x "$tool_specified"; then
7782            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7783$as_echo "not found" >&6; }
7784            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7785          fi
7786          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7787$as_echo "$tool_specified" >&6; }
7788        fi
7789      fi
7790    fi
7791
7792  fi
7793
7794
7795
7796  if test "x$EXPR" = x; then
7797    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7798  fi
7799
7800
7801
7802
7803
7804  # Publish this variable in the help.
7805
7806
7807  if [ -z "${FILE+x}" ]; then
7808    # The variable is not set by user, try to locate tool using the code snippet
7809    for ac_prog in file
7810do
7811  # Extract the first word of "$ac_prog", so it can be a program name with args.
7812set dummy $ac_prog; ac_word=$2
7813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7814$as_echo_n "checking for $ac_word... " >&6; }
7815if ${ac_cv_path_FILE+:} false; then :
7816  $as_echo_n "(cached) " >&6
7817else
7818  case $FILE in
7819  [\\/]* | ?:[\\/]*)
7820  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7821  ;;
7822  *)
7823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7824for as_dir in $PATH
7825do
7826  IFS=$as_save_IFS
7827  test -z "$as_dir" && as_dir=.
7828    for ac_exec_ext in '' $ac_executable_extensions; do
7829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7830    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7832    break 2
7833  fi
7834done
7835  done
7836IFS=$as_save_IFS
7837
7838  ;;
7839esac
7840fi
7841FILE=$ac_cv_path_FILE
7842if test -n "$FILE"; then
7843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7844$as_echo "$FILE" >&6; }
7845else
7846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7847$as_echo "no" >&6; }
7848fi
7849
7850
7851  test -n "$FILE" && break
7852done
7853
7854  else
7855    # The variable is set, but is it from the command line or the environment?
7856
7857    # Try to remove the string !FILE! from our list.
7858    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7859    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7860      # If it failed, the variable was not from the command line. Ignore it,
7861      # but warn the user (except for BASH, which is always set by the calling BASH).
7862      if test "xFILE" != xBASH; then
7863        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7864$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7865      fi
7866      # Try to locate tool using the code snippet
7867      for ac_prog in file
7868do
7869  # Extract the first word of "$ac_prog", so it can be a program name with args.
7870set dummy $ac_prog; ac_word=$2
7871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7872$as_echo_n "checking for $ac_word... " >&6; }
7873if ${ac_cv_path_FILE+:} false; then :
7874  $as_echo_n "(cached) " >&6
7875else
7876  case $FILE in
7877  [\\/]* | ?:[\\/]*)
7878  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7879  ;;
7880  *)
7881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7882for as_dir in $PATH
7883do
7884  IFS=$as_save_IFS
7885  test -z "$as_dir" && as_dir=.
7886    for ac_exec_ext in '' $ac_executable_extensions; do
7887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7888    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7890    break 2
7891  fi
7892done
7893  done
7894IFS=$as_save_IFS
7895
7896  ;;
7897esac
7898fi
7899FILE=$ac_cv_path_FILE
7900if test -n "$FILE"; then
7901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7902$as_echo "$FILE" >&6; }
7903else
7904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7905$as_echo "no" >&6; }
7906fi
7907
7908
7909  test -n "$FILE" && break
7910done
7911
7912    else
7913      # If it succeeded, then it was overridden by the user. We will use it
7914      # for the tool.
7915
7916      # First remove it from the list of overridden variables, so we can test
7917      # for unknown variables in the end.
7918      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7919
7920      # Check if we try to supply an empty value
7921      if test "x$FILE" = x; then
7922        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7923$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7924        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7925$as_echo_n "checking for FILE... " >&6; }
7926        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7927$as_echo "disabled" >&6; }
7928      else
7929        # Check if the provided tool contains a complete path.
7930        tool_specified="$FILE"
7931        tool_basename="${tool_specified##*/}"
7932        if test "x$tool_basename" = "x$tool_specified"; then
7933          # A command without a complete path is provided, search $PATH.
7934          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7935$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7936          # Extract the first word of "$tool_basename", so it can be a program name with args.
7937set dummy $tool_basename; ac_word=$2
7938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7939$as_echo_n "checking for $ac_word... " >&6; }
7940if ${ac_cv_path_FILE+:} false; then :
7941  $as_echo_n "(cached) " >&6
7942else
7943  case $FILE in
7944  [\\/]* | ?:[\\/]*)
7945  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7946  ;;
7947  *)
7948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7949for as_dir in $PATH
7950do
7951  IFS=$as_save_IFS
7952  test -z "$as_dir" && as_dir=.
7953    for ac_exec_ext in '' $ac_executable_extensions; do
7954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7955    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7957    break 2
7958  fi
7959done
7960  done
7961IFS=$as_save_IFS
7962
7963  ;;
7964esac
7965fi
7966FILE=$ac_cv_path_FILE
7967if test -n "$FILE"; then
7968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7969$as_echo "$FILE" >&6; }
7970else
7971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7972$as_echo "no" >&6; }
7973fi
7974
7975
7976          if test "x$FILE" = x; then
7977            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7978          fi
7979        else
7980          # Otherwise we believe it is a complete path. Use it as it is.
7981          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7982$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7983          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7984$as_echo_n "checking for FILE... " >&6; }
7985          if test ! -x "$tool_specified"; then
7986            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7987$as_echo "not found" >&6; }
7988            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7989          fi
7990          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7991$as_echo "$tool_specified" >&6; }
7992        fi
7993      fi
7994    fi
7995
7996  fi
7997
7998
7999
8000  if test "x$FILE" = x; then
8001    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8002  fi
8003
8004
8005
8006
8007
8008  # Publish this variable in the help.
8009
8010
8011  if [ -z "${FIND+x}" ]; then
8012    # The variable is not set by user, try to locate tool using the code snippet
8013    for ac_prog in find
8014do
8015  # Extract the first word of "$ac_prog", so it can be a program name with args.
8016set dummy $ac_prog; ac_word=$2
8017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8018$as_echo_n "checking for $ac_word... " >&6; }
8019if ${ac_cv_path_FIND+:} false; then :
8020  $as_echo_n "(cached) " >&6
8021else
8022  case $FIND in
8023  [\\/]* | ?:[\\/]*)
8024  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8025  ;;
8026  *)
8027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8028for as_dir in $PATH
8029do
8030  IFS=$as_save_IFS
8031  test -z "$as_dir" && as_dir=.
8032    for ac_exec_ext in '' $ac_executable_extensions; do
8033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8034    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8036    break 2
8037  fi
8038done
8039  done
8040IFS=$as_save_IFS
8041
8042  ;;
8043esac
8044fi
8045FIND=$ac_cv_path_FIND
8046if test -n "$FIND"; then
8047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8048$as_echo "$FIND" >&6; }
8049else
8050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8051$as_echo "no" >&6; }
8052fi
8053
8054
8055  test -n "$FIND" && break
8056done
8057
8058  else
8059    # The variable is set, but is it from the command line or the environment?
8060
8061    # Try to remove the string !FIND! from our list.
8062    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8063    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8064      # If it failed, the variable was not from the command line. Ignore it,
8065      # but warn the user (except for BASH, which is always set by the calling BASH).
8066      if test "xFIND" != xBASH; then
8067        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8068$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8069      fi
8070      # Try to locate tool using the code snippet
8071      for ac_prog in find
8072do
8073  # Extract the first word of "$ac_prog", so it can be a program name with args.
8074set dummy $ac_prog; ac_word=$2
8075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8076$as_echo_n "checking for $ac_word... " >&6; }
8077if ${ac_cv_path_FIND+:} false; then :
8078  $as_echo_n "(cached) " >&6
8079else
8080  case $FIND in
8081  [\\/]* | ?:[\\/]*)
8082  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8083  ;;
8084  *)
8085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8086for as_dir in $PATH
8087do
8088  IFS=$as_save_IFS
8089  test -z "$as_dir" && as_dir=.
8090    for ac_exec_ext in '' $ac_executable_extensions; do
8091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8092    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8094    break 2
8095  fi
8096done
8097  done
8098IFS=$as_save_IFS
8099
8100  ;;
8101esac
8102fi
8103FIND=$ac_cv_path_FIND
8104if test -n "$FIND"; then
8105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8106$as_echo "$FIND" >&6; }
8107else
8108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8109$as_echo "no" >&6; }
8110fi
8111
8112
8113  test -n "$FIND" && break
8114done
8115
8116    else
8117      # If it succeeded, then it was overridden by the user. We will use it
8118      # for the tool.
8119
8120      # First remove it from the list of overridden variables, so we can test
8121      # for unknown variables in the end.
8122      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8123
8124      # Check if we try to supply an empty value
8125      if test "x$FIND" = x; then
8126        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8127$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8128        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8129$as_echo_n "checking for FIND... " >&6; }
8130        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8131$as_echo "disabled" >&6; }
8132      else
8133        # Check if the provided tool contains a complete path.
8134        tool_specified="$FIND"
8135        tool_basename="${tool_specified##*/}"
8136        if test "x$tool_basename" = "x$tool_specified"; then
8137          # A command without a complete path is provided, search $PATH.
8138          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8139$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8140          # Extract the first word of "$tool_basename", so it can be a program name with args.
8141set dummy $tool_basename; ac_word=$2
8142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8143$as_echo_n "checking for $ac_word... " >&6; }
8144if ${ac_cv_path_FIND+:} false; then :
8145  $as_echo_n "(cached) " >&6
8146else
8147  case $FIND in
8148  [\\/]* | ?:[\\/]*)
8149  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8150  ;;
8151  *)
8152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8153for as_dir in $PATH
8154do
8155  IFS=$as_save_IFS
8156  test -z "$as_dir" && as_dir=.
8157    for ac_exec_ext in '' $ac_executable_extensions; do
8158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8159    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8161    break 2
8162  fi
8163done
8164  done
8165IFS=$as_save_IFS
8166
8167  ;;
8168esac
8169fi
8170FIND=$ac_cv_path_FIND
8171if test -n "$FIND"; then
8172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8173$as_echo "$FIND" >&6; }
8174else
8175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8176$as_echo "no" >&6; }
8177fi
8178
8179
8180          if test "x$FIND" = x; then
8181            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8182          fi
8183        else
8184          # Otherwise we believe it is a complete path. Use it as it is.
8185          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8186$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8187          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8188$as_echo_n "checking for FIND... " >&6; }
8189          if test ! -x "$tool_specified"; then
8190            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8191$as_echo "not found" >&6; }
8192            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8193          fi
8194          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8195$as_echo "$tool_specified" >&6; }
8196        fi
8197      fi
8198    fi
8199
8200  fi
8201
8202
8203
8204  if test "x$FIND" = x; then
8205    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8206  fi
8207
8208
8209
8210
8211
8212  # Publish this variable in the help.
8213
8214
8215  if [ -z "${HEAD+x}" ]; then
8216    # The variable is not set by user, try to locate tool using the code snippet
8217    for ac_prog in head
8218do
8219  # Extract the first word of "$ac_prog", so it can be a program name with args.
8220set dummy $ac_prog; ac_word=$2
8221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8222$as_echo_n "checking for $ac_word... " >&6; }
8223if ${ac_cv_path_HEAD+:} false; then :
8224  $as_echo_n "(cached) " >&6
8225else
8226  case $HEAD in
8227  [\\/]* | ?:[\\/]*)
8228  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8229  ;;
8230  *)
8231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8232for as_dir in $PATH
8233do
8234  IFS=$as_save_IFS
8235  test -z "$as_dir" && as_dir=.
8236    for ac_exec_ext in '' $ac_executable_extensions; do
8237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8238    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8240    break 2
8241  fi
8242done
8243  done
8244IFS=$as_save_IFS
8245
8246  ;;
8247esac
8248fi
8249HEAD=$ac_cv_path_HEAD
8250if test -n "$HEAD"; then
8251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8252$as_echo "$HEAD" >&6; }
8253else
8254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8255$as_echo "no" >&6; }
8256fi
8257
8258
8259  test -n "$HEAD" && break
8260done
8261
8262  else
8263    # The variable is set, but is it from the command line or the environment?
8264
8265    # Try to remove the string !HEAD! from our list.
8266    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8267    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8268      # If it failed, the variable was not from the command line. Ignore it,
8269      # but warn the user (except for BASH, which is always set by the calling BASH).
8270      if test "xHEAD" != xBASH; then
8271        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8272$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8273      fi
8274      # Try to locate tool using the code snippet
8275      for ac_prog in head
8276do
8277  # Extract the first word of "$ac_prog", so it can be a program name with args.
8278set dummy $ac_prog; ac_word=$2
8279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8280$as_echo_n "checking for $ac_word... " >&6; }
8281if ${ac_cv_path_HEAD+:} false; then :
8282  $as_echo_n "(cached) " >&6
8283else
8284  case $HEAD in
8285  [\\/]* | ?:[\\/]*)
8286  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8287  ;;
8288  *)
8289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8290for as_dir in $PATH
8291do
8292  IFS=$as_save_IFS
8293  test -z "$as_dir" && as_dir=.
8294    for ac_exec_ext in '' $ac_executable_extensions; do
8295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8296    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8298    break 2
8299  fi
8300done
8301  done
8302IFS=$as_save_IFS
8303
8304  ;;
8305esac
8306fi
8307HEAD=$ac_cv_path_HEAD
8308if test -n "$HEAD"; then
8309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8310$as_echo "$HEAD" >&6; }
8311else
8312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8313$as_echo "no" >&6; }
8314fi
8315
8316
8317  test -n "$HEAD" && break
8318done
8319
8320    else
8321      # If it succeeded, then it was overridden by the user. We will use it
8322      # for the tool.
8323
8324      # First remove it from the list of overridden variables, so we can test
8325      # for unknown variables in the end.
8326      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8327
8328      # Check if we try to supply an empty value
8329      if test "x$HEAD" = x; then
8330        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8331$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8332        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8333$as_echo_n "checking for HEAD... " >&6; }
8334        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8335$as_echo "disabled" >&6; }
8336      else
8337        # Check if the provided tool contains a complete path.
8338        tool_specified="$HEAD"
8339        tool_basename="${tool_specified##*/}"
8340        if test "x$tool_basename" = "x$tool_specified"; then
8341          # A command without a complete path is provided, search $PATH.
8342          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8343$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8344          # Extract the first word of "$tool_basename", so it can be a program name with args.
8345set dummy $tool_basename; ac_word=$2
8346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8347$as_echo_n "checking for $ac_word... " >&6; }
8348if ${ac_cv_path_HEAD+:} false; then :
8349  $as_echo_n "(cached) " >&6
8350else
8351  case $HEAD in
8352  [\\/]* | ?:[\\/]*)
8353  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8354  ;;
8355  *)
8356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8357for as_dir in $PATH
8358do
8359  IFS=$as_save_IFS
8360  test -z "$as_dir" && as_dir=.
8361    for ac_exec_ext in '' $ac_executable_extensions; do
8362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8363    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8365    break 2
8366  fi
8367done
8368  done
8369IFS=$as_save_IFS
8370
8371  ;;
8372esac
8373fi
8374HEAD=$ac_cv_path_HEAD
8375if test -n "$HEAD"; then
8376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8377$as_echo "$HEAD" >&6; }
8378else
8379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8380$as_echo "no" >&6; }
8381fi
8382
8383
8384          if test "x$HEAD" = x; then
8385            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8386          fi
8387        else
8388          # Otherwise we believe it is a complete path. Use it as it is.
8389          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8390$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8391          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8392$as_echo_n "checking for HEAD... " >&6; }
8393          if test ! -x "$tool_specified"; then
8394            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8395$as_echo "not found" >&6; }
8396            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8397          fi
8398          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8399$as_echo "$tool_specified" >&6; }
8400        fi
8401      fi
8402    fi
8403
8404  fi
8405
8406
8407
8408  if test "x$HEAD" = x; then
8409    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8410  fi
8411
8412
8413
8414
8415
8416  # Publish this variable in the help.
8417
8418
8419  if [ -z "${GUNZIP+x}" ]; then
8420    # The variable is not set by user, try to locate tool using the code snippet
8421    for ac_prog in gunzip
8422do
8423  # Extract the first word of "$ac_prog", so it can be a program name with args.
8424set dummy $ac_prog; ac_word=$2
8425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8426$as_echo_n "checking for $ac_word... " >&6; }
8427if ${ac_cv_path_GUNZIP+:} false; then :
8428  $as_echo_n "(cached) " >&6
8429else
8430  case $GUNZIP in
8431  [\\/]* | ?:[\\/]*)
8432  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8433  ;;
8434  *)
8435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8436for as_dir in $PATH
8437do
8438  IFS=$as_save_IFS
8439  test -z "$as_dir" && as_dir=.
8440    for ac_exec_ext in '' $ac_executable_extensions; do
8441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8442    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8444    break 2
8445  fi
8446done
8447  done
8448IFS=$as_save_IFS
8449
8450  ;;
8451esac
8452fi
8453GUNZIP=$ac_cv_path_GUNZIP
8454if test -n "$GUNZIP"; then
8455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8456$as_echo "$GUNZIP" >&6; }
8457else
8458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8459$as_echo "no" >&6; }
8460fi
8461
8462
8463  test -n "$GUNZIP" && break
8464done
8465
8466  else
8467    # The variable is set, but is it from the command line or the environment?
8468
8469    # Try to remove the string !GUNZIP! from our list.
8470    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8471    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8472      # If it failed, the variable was not from the command line. Ignore it,
8473      # but warn the user (except for BASH, which is always set by the calling BASH).
8474      if test "xGUNZIP" != xBASH; then
8475        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8476$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8477      fi
8478      # Try to locate tool using the code snippet
8479      for ac_prog in gunzip
8480do
8481  # Extract the first word of "$ac_prog", so it can be a program name with args.
8482set dummy $ac_prog; ac_word=$2
8483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8484$as_echo_n "checking for $ac_word... " >&6; }
8485if ${ac_cv_path_GUNZIP+:} false; then :
8486  $as_echo_n "(cached) " >&6
8487else
8488  case $GUNZIP in
8489  [\\/]* | ?:[\\/]*)
8490  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8491  ;;
8492  *)
8493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8494for as_dir in $PATH
8495do
8496  IFS=$as_save_IFS
8497  test -z "$as_dir" && as_dir=.
8498    for ac_exec_ext in '' $ac_executable_extensions; do
8499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8500    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8502    break 2
8503  fi
8504done
8505  done
8506IFS=$as_save_IFS
8507
8508  ;;
8509esac
8510fi
8511GUNZIP=$ac_cv_path_GUNZIP
8512if test -n "$GUNZIP"; then
8513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8514$as_echo "$GUNZIP" >&6; }
8515else
8516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8517$as_echo "no" >&6; }
8518fi
8519
8520
8521  test -n "$GUNZIP" && break
8522done
8523
8524    else
8525      # If it succeeded, then it was overridden by the user. We will use it
8526      # for the tool.
8527
8528      # First remove it from the list of overridden variables, so we can test
8529      # for unknown variables in the end.
8530      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8531
8532      # Check if we try to supply an empty value
8533      if test "x$GUNZIP" = x; then
8534        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8535$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8536        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8537$as_echo_n "checking for GUNZIP... " >&6; }
8538        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8539$as_echo "disabled" >&6; }
8540      else
8541        # Check if the provided tool contains a complete path.
8542        tool_specified="$GUNZIP"
8543        tool_basename="${tool_specified##*/}"
8544        if test "x$tool_basename" = "x$tool_specified"; then
8545          # A command without a complete path is provided, search $PATH.
8546          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8547$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8548          # Extract the first word of "$tool_basename", so it can be a program name with args.
8549set dummy $tool_basename; ac_word=$2
8550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8551$as_echo_n "checking for $ac_word... " >&6; }
8552if ${ac_cv_path_GUNZIP+:} false; then :
8553  $as_echo_n "(cached) " >&6
8554else
8555  case $GUNZIP in
8556  [\\/]* | ?:[\\/]*)
8557  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8558  ;;
8559  *)
8560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8561for as_dir in $PATH
8562do
8563  IFS=$as_save_IFS
8564  test -z "$as_dir" && as_dir=.
8565    for ac_exec_ext in '' $ac_executable_extensions; do
8566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8567    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8569    break 2
8570  fi
8571done
8572  done
8573IFS=$as_save_IFS
8574
8575  ;;
8576esac
8577fi
8578GUNZIP=$ac_cv_path_GUNZIP
8579if test -n "$GUNZIP"; then
8580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8581$as_echo "$GUNZIP" >&6; }
8582else
8583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8584$as_echo "no" >&6; }
8585fi
8586
8587
8588          if test "x$GUNZIP" = x; then
8589            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8590          fi
8591        else
8592          # Otherwise we believe it is a complete path. Use it as it is.
8593          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8594$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8595          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8596$as_echo_n "checking for GUNZIP... " >&6; }
8597          if test ! -x "$tool_specified"; then
8598            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8599$as_echo "not found" >&6; }
8600            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8601          fi
8602          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8603$as_echo "$tool_specified" >&6; }
8604        fi
8605      fi
8606    fi
8607
8608  fi
8609
8610
8611
8612  if test "x$GUNZIP" = x; then
8613    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8614  fi
8615
8616
8617
8618
8619
8620  # Publish this variable in the help.
8621
8622
8623  if [ -z "${GZIP+x}" ]; then
8624    # The variable is not set by user, try to locate tool using the code snippet
8625    for ac_prog in pigz gzip
8626do
8627  # Extract the first word of "$ac_prog", so it can be a program name with args.
8628set dummy $ac_prog; ac_word=$2
8629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8630$as_echo_n "checking for $ac_word... " >&6; }
8631if ${ac_cv_path_GZIP+:} false; then :
8632  $as_echo_n "(cached) " >&6
8633else
8634  case $GZIP in
8635  [\\/]* | ?:[\\/]*)
8636  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8637  ;;
8638  *)
8639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8640for as_dir in $PATH
8641do
8642  IFS=$as_save_IFS
8643  test -z "$as_dir" && as_dir=.
8644    for ac_exec_ext in '' $ac_executable_extensions; do
8645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8646    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8648    break 2
8649  fi
8650done
8651  done
8652IFS=$as_save_IFS
8653
8654  ;;
8655esac
8656fi
8657GZIP=$ac_cv_path_GZIP
8658if test -n "$GZIP"; then
8659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8660$as_echo "$GZIP" >&6; }
8661else
8662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8663$as_echo "no" >&6; }
8664fi
8665
8666
8667  test -n "$GZIP" && break
8668done
8669
8670  else
8671    # The variable is set, but is it from the command line or the environment?
8672
8673    # Try to remove the string !GZIP! from our list.
8674    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8675    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8676      # If it failed, the variable was not from the command line. Ignore it,
8677      # but warn the user (except for BASH, which is always set by the calling BASH).
8678      if test "xGZIP" != xBASH; then
8679        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8680$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8681      fi
8682      # Try to locate tool using the code snippet
8683      for ac_prog in pigz gzip
8684do
8685  # Extract the first word of "$ac_prog", so it can be a program name with args.
8686set dummy $ac_prog; ac_word=$2
8687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8688$as_echo_n "checking for $ac_word... " >&6; }
8689if ${ac_cv_path_GZIP+:} false; then :
8690  $as_echo_n "(cached) " >&6
8691else
8692  case $GZIP in
8693  [\\/]* | ?:[\\/]*)
8694  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8695  ;;
8696  *)
8697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8698for as_dir in $PATH
8699do
8700  IFS=$as_save_IFS
8701  test -z "$as_dir" && as_dir=.
8702    for ac_exec_ext in '' $ac_executable_extensions; do
8703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8704    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8706    break 2
8707  fi
8708done
8709  done
8710IFS=$as_save_IFS
8711
8712  ;;
8713esac
8714fi
8715GZIP=$ac_cv_path_GZIP
8716if test -n "$GZIP"; then
8717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8718$as_echo "$GZIP" >&6; }
8719else
8720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8721$as_echo "no" >&6; }
8722fi
8723
8724
8725  test -n "$GZIP" && break
8726done
8727
8728    else
8729      # If it succeeded, then it was overridden by the user. We will use it
8730      # for the tool.
8731
8732      # First remove it from the list of overridden variables, so we can test
8733      # for unknown variables in the end.
8734      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8735
8736      # Check if we try to supply an empty value
8737      if test "x$GZIP" = x; then
8738        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8739$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8740        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8741$as_echo_n "checking for GZIP... " >&6; }
8742        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8743$as_echo "disabled" >&6; }
8744      else
8745        # Check if the provided tool contains a complete path.
8746        tool_specified="$GZIP"
8747        tool_basename="${tool_specified##*/}"
8748        if test "x$tool_basename" = "x$tool_specified"; then
8749          # A command without a complete path is provided, search $PATH.
8750          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8751$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8752          # Extract the first word of "$tool_basename", so it can be a program name with args.
8753set dummy $tool_basename; ac_word=$2
8754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8755$as_echo_n "checking for $ac_word... " >&6; }
8756if ${ac_cv_path_GZIP+:} false; then :
8757  $as_echo_n "(cached) " >&6
8758else
8759  case $GZIP in
8760  [\\/]* | ?:[\\/]*)
8761  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8762  ;;
8763  *)
8764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8765for as_dir in $PATH
8766do
8767  IFS=$as_save_IFS
8768  test -z "$as_dir" && as_dir=.
8769    for ac_exec_ext in '' $ac_executable_extensions; do
8770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8771    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8773    break 2
8774  fi
8775done
8776  done
8777IFS=$as_save_IFS
8778
8779  ;;
8780esac
8781fi
8782GZIP=$ac_cv_path_GZIP
8783if test -n "$GZIP"; then
8784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8785$as_echo "$GZIP" >&6; }
8786else
8787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8788$as_echo "no" >&6; }
8789fi
8790
8791
8792          if test "x$GZIP" = x; then
8793            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8794          fi
8795        else
8796          # Otherwise we believe it is a complete path. Use it as it is.
8797          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8798$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8799          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8800$as_echo_n "checking for GZIP... " >&6; }
8801          if test ! -x "$tool_specified"; then
8802            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8803$as_echo "not found" >&6; }
8804            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8805          fi
8806          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8807$as_echo "$tool_specified" >&6; }
8808        fi
8809      fi
8810    fi
8811
8812  fi
8813
8814
8815
8816  if test "x$GZIP" = x; then
8817    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8818  fi
8819
8820
8821
8822
8823
8824  # Publish this variable in the help.
8825
8826
8827  if [ -z "${LN+x}" ]; then
8828    # The variable is not set by user, try to locate tool using the code snippet
8829    for ac_prog in ln
8830do
8831  # Extract the first word of "$ac_prog", so it can be a program name with args.
8832set dummy $ac_prog; ac_word=$2
8833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8834$as_echo_n "checking for $ac_word... " >&6; }
8835if ${ac_cv_path_LN+:} false; then :
8836  $as_echo_n "(cached) " >&6
8837else
8838  case $LN in
8839  [\\/]* | ?:[\\/]*)
8840  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8841  ;;
8842  *)
8843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8844for as_dir in $PATH
8845do
8846  IFS=$as_save_IFS
8847  test -z "$as_dir" && as_dir=.
8848    for ac_exec_ext in '' $ac_executable_extensions; do
8849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8850    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8852    break 2
8853  fi
8854done
8855  done
8856IFS=$as_save_IFS
8857
8858  ;;
8859esac
8860fi
8861LN=$ac_cv_path_LN
8862if test -n "$LN"; then
8863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8864$as_echo "$LN" >&6; }
8865else
8866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8867$as_echo "no" >&6; }
8868fi
8869
8870
8871  test -n "$LN" && break
8872done
8873
8874  else
8875    # The variable is set, but is it from the command line or the environment?
8876
8877    # Try to remove the string !LN! from our list.
8878    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8879    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8880      # If it failed, the variable was not from the command line. Ignore it,
8881      # but warn the user (except for BASH, which is always set by the calling BASH).
8882      if test "xLN" != xBASH; then
8883        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8884$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8885      fi
8886      # Try to locate tool using the code snippet
8887      for ac_prog in ln
8888do
8889  # Extract the first word of "$ac_prog", so it can be a program name with args.
8890set dummy $ac_prog; ac_word=$2
8891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8892$as_echo_n "checking for $ac_word... " >&6; }
8893if ${ac_cv_path_LN+:} false; then :
8894  $as_echo_n "(cached) " >&6
8895else
8896  case $LN in
8897  [\\/]* | ?:[\\/]*)
8898  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8899  ;;
8900  *)
8901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8902for as_dir in $PATH
8903do
8904  IFS=$as_save_IFS
8905  test -z "$as_dir" && as_dir=.
8906    for ac_exec_ext in '' $ac_executable_extensions; do
8907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8908    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8910    break 2
8911  fi
8912done
8913  done
8914IFS=$as_save_IFS
8915
8916  ;;
8917esac
8918fi
8919LN=$ac_cv_path_LN
8920if test -n "$LN"; then
8921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8922$as_echo "$LN" >&6; }
8923else
8924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8925$as_echo "no" >&6; }
8926fi
8927
8928
8929  test -n "$LN" && break
8930done
8931
8932    else
8933      # If it succeeded, then it was overridden by the user. We will use it
8934      # for the tool.
8935
8936      # First remove it from the list of overridden variables, so we can test
8937      # for unknown variables in the end.
8938      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8939
8940      # Check if we try to supply an empty value
8941      if test "x$LN" = x; then
8942        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8943$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8944        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8945$as_echo_n "checking for LN... " >&6; }
8946        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8947$as_echo "disabled" >&6; }
8948      else
8949        # Check if the provided tool contains a complete path.
8950        tool_specified="$LN"
8951        tool_basename="${tool_specified##*/}"
8952        if test "x$tool_basename" = "x$tool_specified"; then
8953          # A command without a complete path is provided, search $PATH.
8954          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8955$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8956          # Extract the first word of "$tool_basename", so it can be a program name with args.
8957set dummy $tool_basename; ac_word=$2
8958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8959$as_echo_n "checking for $ac_word... " >&6; }
8960if ${ac_cv_path_LN+:} false; then :
8961  $as_echo_n "(cached) " >&6
8962else
8963  case $LN in
8964  [\\/]* | ?:[\\/]*)
8965  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8966  ;;
8967  *)
8968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8969for as_dir in $PATH
8970do
8971  IFS=$as_save_IFS
8972  test -z "$as_dir" && as_dir=.
8973    for ac_exec_ext in '' $ac_executable_extensions; do
8974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8975    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8977    break 2
8978  fi
8979done
8980  done
8981IFS=$as_save_IFS
8982
8983  ;;
8984esac
8985fi
8986LN=$ac_cv_path_LN
8987if test -n "$LN"; then
8988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8989$as_echo "$LN" >&6; }
8990else
8991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8992$as_echo "no" >&6; }
8993fi
8994
8995
8996          if test "x$LN" = x; then
8997            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8998          fi
8999        else
9000          # Otherwise we believe it is a complete path. Use it as it is.
9001          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9002$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9003          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9004$as_echo_n "checking for LN... " >&6; }
9005          if test ! -x "$tool_specified"; then
9006            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9007$as_echo "not found" >&6; }
9008            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9009          fi
9010          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9011$as_echo "$tool_specified" >&6; }
9012        fi
9013      fi
9014    fi
9015
9016  fi
9017
9018
9019
9020  if test "x$LN" = x; then
9021    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9022  fi
9023
9024
9025
9026
9027
9028  # Publish this variable in the help.
9029
9030
9031  if [ -z "${LS+x}" ]; then
9032    # The variable is not set by user, try to locate tool using the code snippet
9033    for ac_prog in ls
9034do
9035  # Extract the first word of "$ac_prog", so it can be a program name with args.
9036set dummy $ac_prog; ac_word=$2
9037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9038$as_echo_n "checking for $ac_word... " >&6; }
9039if ${ac_cv_path_LS+:} false; then :
9040  $as_echo_n "(cached) " >&6
9041else
9042  case $LS in
9043  [\\/]* | ?:[\\/]*)
9044  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9045  ;;
9046  *)
9047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9048for as_dir in $PATH
9049do
9050  IFS=$as_save_IFS
9051  test -z "$as_dir" && as_dir=.
9052    for ac_exec_ext in '' $ac_executable_extensions; do
9053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9054    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9056    break 2
9057  fi
9058done
9059  done
9060IFS=$as_save_IFS
9061
9062  ;;
9063esac
9064fi
9065LS=$ac_cv_path_LS
9066if test -n "$LS"; then
9067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9068$as_echo "$LS" >&6; }
9069else
9070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9071$as_echo "no" >&6; }
9072fi
9073
9074
9075  test -n "$LS" && break
9076done
9077
9078  else
9079    # The variable is set, but is it from the command line or the environment?
9080
9081    # Try to remove the string !LS! from our list.
9082    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9083    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9084      # If it failed, the variable was not from the command line. Ignore it,
9085      # but warn the user (except for BASH, which is always set by the calling BASH).
9086      if test "xLS" != xBASH; then
9087        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9088$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9089      fi
9090      # Try to locate tool using the code snippet
9091      for ac_prog in ls
9092do
9093  # Extract the first word of "$ac_prog", so it can be a program name with args.
9094set dummy $ac_prog; ac_word=$2
9095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9096$as_echo_n "checking for $ac_word... " >&6; }
9097if ${ac_cv_path_LS+:} false; then :
9098  $as_echo_n "(cached) " >&6
9099else
9100  case $LS in
9101  [\\/]* | ?:[\\/]*)
9102  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9103  ;;
9104  *)
9105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9106for as_dir in $PATH
9107do
9108  IFS=$as_save_IFS
9109  test -z "$as_dir" && as_dir=.
9110    for ac_exec_ext in '' $ac_executable_extensions; do
9111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9112    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9114    break 2
9115  fi
9116done
9117  done
9118IFS=$as_save_IFS
9119
9120  ;;
9121esac
9122fi
9123LS=$ac_cv_path_LS
9124if test -n "$LS"; then
9125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9126$as_echo "$LS" >&6; }
9127else
9128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9129$as_echo "no" >&6; }
9130fi
9131
9132
9133  test -n "$LS" && break
9134done
9135
9136    else
9137      # If it succeeded, then it was overridden by the user. We will use it
9138      # for the tool.
9139
9140      # First remove it from the list of overridden variables, so we can test
9141      # for unknown variables in the end.
9142      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9143
9144      # Check if we try to supply an empty value
9145      if test "x$LS" = x; then
9146        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9147$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9148        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9149$as_echo_n "checking for LS... " >&6; }
9150        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9151$as_echo "disabled" >&6; }
9152      else
9153        # Check if the provided tool contains a complete path.
9154        tool_specified="$LS"
9155        tool_basename="${tool_specified##*/}"
9156        if test "x$tool_basename" = "x$tool_specified"; then
9157          # A command without a complete path is provided, search $PATH.
9158          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9159$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9160          # Extract the first word of "$tool_basename", so it can be a program name with args.
9161set dummy $tool_basename; ac_word=$2
9162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9163$as_echo_n "checking for $ac_word... " >&6; }
9164if ${ac_cv_path_LS+:} false; then :
9165  $as_echo_n "(cached) " >&6
9166else
9167  case $LS in
9168  [\\/]* | ?:[\\/]*)
9169  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9170  ;;
9171  *)
9172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9173for as_dir in $PATH
9174do
9175  IFS=$as_save_IFS
9176  test -z "$as_dir" && as_dir=.
9177    for ac_exec_ext in '' $ac_executable_extensions; do
9178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9179    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9181    break 2
9182  fi
9183done
9184  done
9185IFS=$as_save_IFS
9186
9187  ;;
9188esac
9189fi
9190LS=$ac_cv_path_LS
9191if test -n "$LS"; then
9192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9193$as_echo "$LS" >&6; }
9194else
9195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9196$as_echo "no" >&6; }
9197fi
9198
9199
9200          if test "x$LS" = x; then
9201            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9202          fi
9203        else
9204          # Otherwise we believe it is a complete path. Use it as it is.
9205          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9206$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9207          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9208$as_echo_n "checking for LS... " >&6; }
9209          if test ! -x "$tool_specified"; then
9210            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9211$as_echo "not found" >&6; }
9212            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9213          fi
9214          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9215$as_echo "$tool_specified" >&6; }
9216        fi
9217      fi
9218    fi
9219
9220  fi
9221
9222
9223
9224  if test "x$LS" = x; then
9225    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9226  fi
9227
9228
9229
9230
9231
9232  # Publish this variable in the help.
9233
9234
9235  if [ -z "${MKDIR+x}" ]; then
9236    # The variable is not set by user, try to locate tool using the code snippet
9237    for ac_prog in mkdir
9238do
9239  # Extract the first word of "$ac_prog", so it can be a program name with args.
9240set dummy $ac_prog; ac_word=$2
9241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9242$as_echo_n "checking for $ac_word... " >&6; }
9243if ${ac_cv_path_MKDIR+:} false; then :
9244  $as_echo_n "(cached) " >&6
9245else
9246  case $MKDIR in
9247  [\\/]* | ?:[\\/]*)
9248  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9249  ;;
9250  *)
9251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9252for as_dir in $PATH
9253do
9254  IFS=$as_save_IFS
9255  test -z "$as_dir" && as_dir=.
9256    for ac_exec_ext in '' $ac_executable_extensions; do
9257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9258    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9260    break 2
9261  fi
9262done
9263  done
9264IFS=$as_save_IFS
9265
9266  ;;
9267esac
9268fi
9269MKDIR=$ac_cv_path_MKDIR
9270if test -n "$MKDIR"; then
9271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9272$as_echo "$MKDIR" >&6; }
9273else
9274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9275$as_echo "no" >&6; }
9276fi
9277
9278
9279  test -n "$MKDIR" && break
9280done
9281
9282  else
9283    # The variable is set, but is it from the command line or the environment?
9284
9285    # Try to remove the string !MKDIR! from our list.
9286    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9287    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9288      # If it failed, the variable was not from the command line. Ignore it,
9289      # but warn the user (except for BASH, which is always set by the calling BASH).
9290      if test "xMKDIR" != xBASH; then
9291        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9292$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9293      fi
9294      # Try to locate tool using the code snippet
9295      for ac_prog in mkdir
9296do
9297  # Extract the first word of "$ac_prog", so it can be a program name with args.
9298set dummy $ac_prog; ac_word=$2
9299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9300$as_echo_n "checking for $ac_word... " >&6; }
9301if ${ac_cv_path_MKDIR+:} false; then :
9302  $as_echo_n "(cached) " >&6
9303else
9304  case $MKDIR in
9305  [\\/]* | ?:[\\/]*)
9306  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9307  ;;
9308  *)
9309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9310for as_dir in $PATH
9311do
9312  IFS=$as_save_IFS
9313  test -z "$as_dir" && as_dir=.
9314    for ac_exec_ext in '' $ac_executable_extensions; do
9315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9316    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9318    break 2
9319  fi
9320done
9321  done
9322IFS=$as_save_IFS
9323
9324  ;;
9325esac
9326fi
9327MKDIR=$ac_cv_path_MKDIR
9328if test -n "$MKDIR"; then
9329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9330$as_echo "$MKDIR" >&6; }
9331else
9332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9333$as_echo "no" >&6; }
9334fi
9335
9336
9337  test -n "$MKDIR" && break
9338done
9339
9340    else
9341      # If it succeeded, then it was overridden by the user. We will use it
9342      # for the tool.
9343
9344      # First remove it from the list of overridden variables, so we can test
9345      # for unknown variables in the end.
9346      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9347
9348      # Check if we try to supply an empty value
9349      if test "x$MKDIR" = x; then
9350        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9351$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9352        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9353$as_echo_n "checking for MKDIR... " >&6; }
9354        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9355$as_echo "disabled" >&6; }
9356      else
9357        # Check if the provided tool contains a complete path.
9358        tool_specified="$MKDIR"
9359        tool_basename="${tool_specified##*/}"
9360        if test "x$tool_basename" = "x$tool_specified"; then
9361          # A command without a complete path is provided, search $PATH.
9362          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9363$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9364          # Extract the first word of "$tool_basename", so it can be a program name with args.
9365set dummy $tool_basename; ac_word=$2
9366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9367$as_echo_n "checking for $ac_word... " >&6; }
9368if ${ac_cv_path_MKDIR+:} false; then :
9369  $as_echo_n "(cached) " >&6
9370else
9371  case $MKDIR in
9372  [\\/]* | ?:[\\/]*)
9373  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9374  ;;
9375  *)
9376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9377for as_dir in $PATH
9378do
9379  IFS=$as_save_IFS
9380  test -z "$as_dir" && as_dir=.
9381    for ac_exec_ext in '' $ac_executable_extensions; do
9382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9383    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9385    break 2
9386  fi
9387done
9388  done
9389IFS=$as_save_IFS
9390
9391  ;;
9392esac
9393fi
9394MKDIR=$ac_cv_path_MKDIR
9395if test -n "$MKDIR"; then
9396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9397$as_echo "$MKDIR" >&6; }
9398else
9399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9400$as_echo "no" >&6; }
9401fi
9402
9403
9404          if test "x$MKDIR" = x; then
9405            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9406          fi
9407        else
9408          # Otherwise we believe it is a complete path. Use it as it is.
9409          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9410$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9411          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9412$as_echo_n "checking for MKDIR... " >&6; }
9413          if test ! -x "$tool_specified"; then
9414            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9415$as_echo "not found" >&6; }
9416            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9417          fi
9418          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9419$as_echo "$tool_specified" >&6; }
9420        fi
9421      fi
9422    fi
9423
9424  fi
9425
9426
9427
9428  if test "x$MKDIR" = x; then
9429    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9430  fi
9431
9432
9433
9434
9435
9436  # Publish this variable in the help.
9437
9438
9439  if [ -z "${MKTEMP+x}" ]; then
9440    # The variable is not set by user, try to locate tool using the code snippet
9441    for ac_prog in mktemp
9442do
9443  # Extract the first word of "$ac_prog", so it can be a program name with args.
9444set dummy $ac_prog; ac_word=$2
9445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9446$as_echo_n "checking for $ac_word... " >&6; }
9447if ${ac_cv_path_MKTEMP+:} false; then :
9448  $as_echo_n "(cached) " >&6
9449else
9450  case $MKTEMP in
9451  [\\/]* | ?:[\\/]*)
9452  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9453  ;;
9454  *)
9455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9456for as_dir in $PATH
9457do
9458  IFS=$as_save_IFS
9459  test -z "$as_dir" && as_dir=.
9460    for ac_exec_ext in '' $ac_executable_extensions; do
9461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9462    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9464    break 2
9465  fi
9466done
9467  done
9468IFS=$as_save_IFS
9469
9470  ;;
9471esac
9472fi
9473MKTEMP=$ac_cv_path_MKTEMP
9474if test -n "$MKTEMP"; then
9475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9476$as_echo "$MKTEMP" >&6; }
9477else
9478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9479$as_echo "no" >&6; }
9480fi
9481
9482
9483  test -n "$MKTEMP" && break
9484done
9485
9486  else
9487    # The variable is set, but is it from the command line or the environment?
9488
9489    # Try to remove the string !MKTEMP! from our list.
9490    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9491    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9492      # If it failed, the variable was not from the command line. Ignore it,
9493      # but warn the user (except for BASH, which is always set by the calling BASH).
9494      if test "xMKTEMP" != xBASH; then
9495        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9496$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9497      fi
9498      # Try to locate tool using the code snippet
9499      for ac_prog in mktemp
9500do
9501  # Extract the first word of "$ac_prog", so it can be a program name with args.
9502set dummy $ac_prog; ac_word=$2
9503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9504$as_echo_n "checking for $ac_word... " >&6; }
9505if ${ac_cv_path_MKTEMP+:} false; then :
9506  $as_echo_n "(cached) " >&6
9507else
9508  case $MKTEMP in
9509  [\\/]* | ?:[\\/]*)
9510  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9511  ;;
9512  *)
9513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9514for as_dir in $PATH
9515do
9516  IFS=$as_save_IFS
9517  test -z "$as_dir" && as_dir=.
9518    for ac_exec_ext in '' $ac_executable_extensions; do
9519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9520    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9522    break 2
9523  fi
9524done
9525  done
9526IFS=$as_save_IFS
9527
9528  ;;
9529esac
9530fi
9531MKTEMP=$ac_cv_path_MKTEMP
9532if test -n "$MKTEMP"; then
9533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9534$as_echo "$MKTEMP" >&6; }
9535else
9536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9537$as_echo "no" >&6; }
9538fi
9539
9540
9541  test -n "$MKTEMP" && break
9542done
9543
9544    else
9545      # If it succeeded, then it was overridden by the user. We will use it
9546      # for the tool.
9547
9548      # First remove it from the list of overridden variables, so we can test
9549      # for unknown variables in the end.
9550      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9551
9552      # Check if we try to supply an empty value
9553      if test "x$MKTEMP" = x; then
9554        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9555$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9556        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9557$as_echo_n "checking for MKTEMP... " >&6; }
9558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9559$as_echo "disabled" >&6; }
9560      else
9561        # Check if the provided tool contains a complete path.
9562        tool_specified="$MKTEMP"
9563        tool_basename="${tool_specified##*/}"
9564        if test "x$tool_basename" = "x$tool_specified"; then
9565          # A command without a complete path is provided, search $PATH.
9566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9567$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9568          # Extract the first word of "$tool_basename", so it can be a program name with args.
9569set dummy $tool_basename; ac_word=$2
9570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9571$as_echo_n "checking for $ac_word... " >&6; }
9572if ${ac_cv_path_MKTEMP+:} false; then :
9573  $as_echo_n "(cached) " >&6
9574else
9575  case $MKTEMP in
9576  [\\/]* | ?:[\\/]*)
9577  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9578  ;;
9579  *)
9580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9581for as_dir in $PATH
9582do
9583  IFS=$as_save_IFS
9584  test -z "$as_dir" && as_dir=.
9585    for ac_exec_ext in '' $ac_executable_extensions; do
9586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9587    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9589    break 2
9590  fi
9591done
9592  done
9593IFS=$as_save_IFS
9594
9595  ;;
9596esac
9597fi
9598MKTEMP=$ac_cv_path_MKTEMP
9599if test -n "$MKTEMP"; then
9600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9601$as_echo "$MKTEMP" >&6; }
9602else
9603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9604$as_echo "no" >&6; }
9605fi
9606
9607
9608          if test "x$MKTEMP" = x; then
9609            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9610          fi
9611        else
9612          # Otherwise we believe it is a complete path. Use it as it is.
9613          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9614$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9615          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9616$as_echo_n "checking for MKTEMP... " >&6; }
9617          if test ! -x "$tool_specified"; then
9618            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9619$as_echo "not found" >&6; }
9620            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9621          fi
9622          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9623$as_echo "$tool_specified" >&6; }
9624        fi
9625      fi
9626    fi
9627
9628  fi
9629
9630
9631
9632  if test "x$MKTEMP" = x; then
9633    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9634  fi
9635
9636
9637
9638
9639
9640  # Publish this variable in the help.
9641
9642
9643  if [ -z "${MV+x}" ]; then
9644    # The variable is not set by user, try to locate tool using the code snippet
9645    for ac_prog in mv
9646do
9647  # Extract the first word of "$ac_prog", so it can be a program name with args.
9648set dummy $ac_prog; ac_word=$2
9649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9650$as_echo_n "checking for $ac_word... " >&6; }
9651if ${ac_cv_path_MV+:} false; then :
9652  $as_echo_n "(cached) " >&6
9653else
9654  case $MV in
9655  [\\/]* | ?:[\\/]*)
9656  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9657  ;;
9658  *)
9659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9660for as_dir in $PATH
9661do
9662  IFS=$as_save_IFS
9663  test -z "$as_dir" && as_dir=.
9664    for ac_exec_ext in '' $ac_executable_extensions; do
9665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9666    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9668    break 2
9669  fi
9670done
9671  done
9672IFS=$as_save_IFS
9673
9674  ;;
9675esac
9676fi
9677MV=$ac_cv_path_MV
9678if test -n "$MV"; then
9679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9680$as_echo "$MV" >&6; }
9681else
9682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9683$as_echo "no" >&6; }
9684fi
9685
9686
9687  test -n "$MV" && break
9688done
9689
9690  else
9691    # The variable is set, but is it from the command line or the environment?
9692
9693    # Try to remove the string !MV! from our list.
9694    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9695    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9696      # If it failed, the variable was not from the command line. Ignore it,
9697      # but warn the user (except for BASH, which is always set by the calling BASH).
9698      if test "xMV" != xBASH; then
9699        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9700$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9701      fi
9702      # Try to locate tool using the code snippet
9703      for ac_prog in mv
9704do
9705  # Extract the first word of "$ac_prog", so it can be a program name with args.
9706set dummy $ac_prog; ac_word=$2
9707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9708$as_echo_n "checking for $ac_word... " >&6; }
9709if ${ac_cv_path_MV+:} false; then :
9710  $as_echo_n "(cached) " >&6
9711else
9712  case $MV in
9713  [\\/]* | ?:[\\/]*)
9714  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9715  ;;
9716  *)
9717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9718for as_dir in $PATH
9719do
9720  IFS=$as_save_IFS
9721  test -z "$as_dir" && as_dir=.
9722    for ac_exec_ext in '' $ac_executable_extensions; do
9723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9724    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9726    break 2
9727  fi
9728done
9729  done
9730IFS=$as_save_IFS
9731
9732  ;;
9733esac
9734fi
9735MV=$ac_cv_path_MV
9736if test -n "$MV"; then
9737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9738$as_echo "$MV" >&6; }
9739else
9740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9741$as_echo "no" >&6; }
9742fi
9743
9744
9745  test -n "$MV" && break
9746done
9747
9748    else
9749      # If it succeeded, then it was overridden by the user. We will use it
9750      # for the tool.
9751
9752      # First remove it from the list of overridden variables, so we can test
9753      # for unknown variables in the end.
9754      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9755
9756      # Check if we try to supply an empty value
9757      if test "x$MV" = x; then
9758        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9759$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9760        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9761$as_echo_n "checking for MV... " >&6; }
9762        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9763$as_echo "disabled" >&6; }
9764      else
9765        # Check if the provided tool contains a complete path.
9766        tool_specified="$MV"
9767        tool_basename="${tool_specified##*/}"
9768        if test "x$tool_basename" = "x$tool_specified"; then
9769          # A command without a complete path is provided, search $PATH.
9770          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9771$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9772          # Extract the first word of "$tool_basename", so it can be a program name with args.
9773set dummy $tool_basename; ac_word=$2
9774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9775$as_echo_n "checking for $ac_word... " >&6; }
9776if ${ac_cv_path_MV+:} false; then :
9777  $as_echo_n "(cached) " >&6
9778else
9779  case $MV in
9780  [\\/]* | ?:[\\/]*)
9781  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9782  ;;
9783  *)
9784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9785for as_dir in $PATH
9786do
9787  IFS=$as_save_IFS
9788  test -z "$as_dir" && as_dir=.
9789    for ac_exec_ext in '' $ac_executable_extensions; do
9790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9791    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9793    break 2
9794  fi
9795done
9796  done
9797IFS=$as_save_IFS
9798
9799  ;;
9800esac
9801fi
9802MV=$ac_cv_path_MV
9803if test -n "$MV"; then
9804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9805$as_echo "$MV" >&6; }
9806else
9807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9808$as_echo "no" >&6; }
9809fi
9810
9811
9812          if test "x$MV" = x; then
9813            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9814          fi
9815        else
9816          # Otherwise we believe it is a complete path. Use it as it is.
9817          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9818$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9819          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9820$as_echo_n "checking for MV... " >&6; }
9821          if test ! -x "$tool_specified"; then
9822            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9823$as_echo "not found" >&6; }
9824            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9825          fi
9826          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9827$as_echo "$tool_specified" >&6; }
9828        fi
9829      fi
9830    fi
9831
9832  fi
9833
9834
9835
9836  if test "x$MV" = x; then
9837    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9838  fi
9839
9840
9841
9842
9843
9844  # Publish this variable in the help.
9845
9846
9847  if [ -z "${NAWK+x}" ]; then
9848    # The variable is not set by user, try to locate tool using the code snippet
9849    for ac_prog in nawk gawk awk
9850do
9851  # Extract the first word of "$ac_prog", so it can be a program name with args.
9852set dummy $ac_prog; ac_word=$2
9853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9854$as_echo_n "checking for $ac_word... " >&6; }
9855if ${ac_cv_path_NAWK+:} false; then :
9856  $as_echo_n "(cached) " >&6
9857else
9858  case $NAWK in
9859  [\\/]* | ?:[\\/]*)
9860  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9861  ;;
9862  *)
9863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9864for as_dir in $PATH
9865do
9866  IFS=$as_save_IFS
9867  test -z "$as_dir" && as_dir=.
9868    for ac_exec_ext in '' $ac_executable_extensions; do
9869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9870    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9872    break 2
9873  fi
9874done
9875  done
9876IFS=$as_save_IFS
9877
9878  ;;
9879esac
9880fi
9881NAWK=$ac_cv_path_NAWK
9882if test -n "$NAWK"; then
9883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9884$as_echo "$NAWK" >&6; }
9885else
9886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9887$as_echo "no" >&6; }
9888fi
9889
9890
9891  test -n "$NAWK" && break
9892done
9893
9894  else
9895    # The variable is set, but is it from the command line or the environment?
9896
9897    # Try to remove the string !NAWK! from our list.
9898    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9899    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9900      # If it failed, the variable was not from the command line. Ignore it,
9901      # but warn the user (except for BASH, which is always set by the calling BASH).
9902      if test "xNAWK" != xBASH; then
9903        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9904$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9905      fi
9906      # Try to locate tool using the code snippet
9907      for ac_prog in nawk gawk awk
9908do
9909  # Extract the first word of "$ac_prog", so it can be a program name with args.
9910set dummy $ac_prog; ac_word=$2
9911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9912$as_echo_n "checking for $ac_word... " >&6; }
9913if ${ac_cv_path_NAWK+:} false; then :
9914  $as_echo_n "(cached) " >&6
9915else
9916  case $NAWK in
9917  [\\/]* | ?:[\\/]*)
9918  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9919  ;;
9920  *)
9921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9922for as_dir in $PATH
9923do
9924  IFS=$as_save_IFS
9925  test -z "$as_dir" && as_dir=.
9926    for ac_exec_ext in '' $ac_executable_extensions; do
9927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9928    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9930    break 2
9931  fi
9932done
9933  done
9934IFS=$as_save_IFS
9935
9936  ;;
9937esac
9938fi
9939NAWK=$ac_cv_path_NAWK
9940if test -n "$NAWK"; then
9941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9942$as_echo "$NAWK" >&6; }
9943else
9944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9945$as_echo "no" >&6; }
9946fi
9947
9948
9949  test -n "$NAWK" && break
9950done
9951
9952    else
9953      # If it succeeded, then it was overridden by the user. We will use it
9954      # for the tool.
9955
9956      # First remove it from the list of overridden variables, so we can test
9957      # for unknown variables in the end.
9958      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9959
9960      # Check if we try to supply an empty value
9961      if test "x$NAWK" = x; then
9962        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9963$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9964        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9965$as_echo_n "checking for NAWK... " >&6; }
9966        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9967$as_echo "disabled" >&6; }
9968      else
9969        # Check if the provided tool contains a complete path.
9970        tool_specified="$NAWK"
9971        tool_basename="${tool_specified##*/}"
9972        if test "x$tool_basename" = "x$tool_specified"; then
9973          # A command without a complete path is provided, search $PATH.
9974          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9975$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9976          # Extract the first word of "$tool_basename", so it can be a program name with args.
9977set dummy $tool_basename; ac_word=$2
9978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9979$as_echo_n "checking for $ac_word... " >&6; }
9980if ${ac_cv_path_NAWK+:} false; then :
9981  $as_echo_n "(cached) " >&6
9982else
9983  case $NAWK in
9984  [\\/]* | ?:[\\/]*)
9985  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9986  ;;
9987  *)
9988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9989for as_dir in $PATH
9990do
9991  IFS=$as_save_IFS
9992  test -z "$as_dir" && as_dir=.
9993    for ac_exec_ext in '' $ac_executable_extensions; do
9994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9995    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9997    break 2
9998  fi
9999done
10000  done
10001IFS=$as_save_IFS
10002
10003  ;;
10004esac
10005fi
10006NAWK=$ac_cv_path_NAWK
10007if test -n "$NAWK"; then
10008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10009$as_echo "$NAWK" >&6; }
10010else
10011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10012$as_echo "no" >&6; }
10013fi
10014
10015
10016          if test "x$NAWK" = x; then
10017            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10018          fi
10019        else
10020          # Otherwise we believe it is a complete path. Use it as it is.
10021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10022$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10023          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10024$as_echo_n "checking for NAWK... " >&6; }
10025          if test ! -x "$tool_specified"; then
10026            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10027$as_echo "not found" >&6; }
10028            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10029          fi
10030          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10031$as_echo "$tool_specified" >&6; }
10032        fi
10033      fi
10034    fi
10035
10036  fi
10037
10038
10039
10040  if test "x$NAWK" = x; then
10041    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10042  fi
10043
10044
10045
10046
10047
10048  # Publish this variable in the help.
10049
10050
10051  if [ -z "${PRINTF+x}" ]; then
10052    # The variable is not set by user, try to locate tool using the code snippet
10053    for ac_prog in printf
10054do
10055  # Extract the first word of "$ac_prog", so it can be a program name with args.
10056set dummy $ac_prog; ac_word=$2
10057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10058$as_echo_n "checking for $ac_word... " >&6; }
10059if ${ac_cv_path_PRINTF+:} false; then :
10060  $as_echo_n "(cached) " >&6
10061else
10062  case $PRINTF in
10063  [\\/]* | ?:[\\/]*)
10064  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10065  ;;
10066  *)
10067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10068for as_dir in $PATH
10069do
10070  IFS=$as_save_IFS
10071  test -z "$as_dir" && as_dir=.
10072    for ac_exec_ext in '' $ac_executable_extensions; do
10073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10074    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10076    break 2
10077  fi
10078done
10079  done
10080IFS=$as_save_IFS
10081
10082  ;;
10083esac
10084fi
10085PRINTF=$ac_cv_path_PRINTF
10086if test -n "$PRINTF"; then
10087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10088$as_echo "$PRINTF" >&6; }
10089else
10090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10091$as_echo "no" >&6; }
10092fi
10093
10094
10095  test -n "$PRINTF" && break
10096done
10097
10098  else
10099    # The variable is set, but is it from the command line or the environment?
10100
10101    # Try to remove the string !PRINTF! from our list.
10102    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10103    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10104      # If it failed, the variable was not from the command line. Ignore it,
10105      # but warn the user (except for BASH, which is always set by the calling BASH).
10106      if test "xPRINTF" != xBASH; then
10107        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10108$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10109      fi
10110      # Try to locate tool using the code snippet
10111      for ac_prog in printf
10112do
10113  # Extract the first word of "$ac_prog", so it can be a program name with args.
10114set dummy $ac_prog; ac_word=$2
10115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10116$as_echo_n "checking for $ac_word... " >&6; }
10117if ${ac_cv_path_PRINTF+:} false; then :
10118  $as_echo_n "(cached) " >&6
10119else
10120  case $PRINTF in
10121  [\\/]* | ?:[\\/]*)
10122  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10123  ;;
10124  *)
10125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10126for as_dir in $PATH
10127do
10128  IFS=$as_save_IFS
10129  test -z "$as_dir" && as_dir=.
10130    for ac_exec_ext in '' $ac_executable_extensions; do
10131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10132    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10134    break 2
10135  fi
10136done
10137  done
10138IFS=$as_save_IFS
10139
10140  ;;
10141esac
10142fi
10143PRINTF=$ac_cv_path_PRINTF
10144if test -n "$PRINTF"; then
10145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10146$as_echo "$PRINTF" >&6; }
10147else
10148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10149$as_echo "no" >&6; }
10150fi
10151
10152
10153  test -n "$PRINTF" && break
10154done
10155
10156    else
10157      # If it succeeded, then it was overridden by the user. We will use it
10158      # for the tool.
10159
10160      # First remove it from the list of overridden variables, so we can test
10161      # for unknown variables in the end.
10162      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10163
10164      # Check if we try to supply an empty value
10165      if test "x$PRINTF" = x; then
10166        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10167$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10168        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10169$as_echo_n "checking for PRINTF... " >&6; }
10170        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10171$as_echo "disabled" >&6; }
10172      else
10173        # Check if the provided tool contains a complete path.
10174        tool_specified="$PRINTF"
10175        tool_basename="${tool_specified##*/}"
10176        if test "x$tool_basename" = "x$tool_specified"; then
10177          # A command without a complete path is provided, search $PATH.
10178          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10179$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10180          # Extract the first word of "$tool_basename", so it can be a program name with args.
10181set dummy $tool_basename; ac_word=$2
10182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10183$as_echo_n "checking for $ac_word... " >&6; }
10184if ${ac_cv_path_PRINTF+:} false; then :
10185  $as_echo_n "(cached) " >&6
10186else
10187  case $PRINTF in
10188  [\\/]* | ?:[\\/]*)
10189  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10190  ;;
10191  *)
10192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10193for as_dir in $PATH
10194do
10195  IFS=$as_save_IFS
10196  test -z "$as_dir" && as_dir=.
10197    for ac_exec_ext in '' $ac_executable_extensions; do
10198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10199    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10201    break 2
10202  fi
10203done
10204  done
10205IFS=$as_save_IFS
10206
10207  ;;
10208esac
10209fi
10210PRINTF=$ac_cv_path_PRINTF
10211if test -n "$PRINTF"; then
10212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10213$as_echo "$PRINTF" >&6; }
10214else
10215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10216$as_echo "no" >&6; }
10217fi
10218
10219
10220          if test "x$PRINTF" = x; then
10221            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10222          fi
10223        else
10224          # Otherwise we believe it is a complete path. Use it as it is.
10225          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10226$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10227          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10228$as_echo_n "checking for PRINTF... " >&6; }
10229          if test ! -x "$tool_specified"; then
10230            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10231$as_echo "not found" >&6; }
10232            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10233          fi
10234          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10235$as_echo "$tool_specified" >&6; }
10236        fi
10237      fi
10238    fi
10239
10240  fi
10241
10242
10243
10244  if test "x$PRINTF" = x; then
10245    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10246  fi
10247
10248
10249
10250
10251
10252  # Publish this variable in the help.
10253
10254
10255  if [ -z "${RM+x}" ]; then
10256    # The variable is not set by user, try to locate tool using the code snippet
10257    for ac_prog in rm
10258do
10259  # Extract the first word of "$ac_prog", so it can be a program name with args.
10260set dummy $ac_prog; ac_word=$2
10261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10262$as_echo_n "checking for $ac_word... " >&6; }
10263if ${ac_cv_path_RM+:} false; then :
10264  $as_echo_n "(cached) " >&6
10265else
10266  case $RM in
10267  [\\/]* | ?:[\\/]*)
10268  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10269  ;;
10270  *)
10271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10272for as_dir in $PATH
10273do
10274  IFS=$as_save_IFS
10275  test -z "$as_dir" && as_dir=.
10276    for ac_exec_ext in '' $ac_executable_extensions; do
10277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10278    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10280    break 2
10281  fi
10282done
10283  done
10284IFS=$as_save_IFS
10285
10286  ;;
10287esac
10288fi
10289RM=$ac_cv_path_RM
10290if test -n "$RM"; then
10291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10292$as_echo "$RM" >&6; }
10293else
10294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10295$as_echo "no" >&6; }
10296fi
10297
10298
10299  test -n "$RM" && break
10300done
10301
10302  else
10303    # The variable is set, but is it from the command line or the environment?
10304
10305    # Try to remove the string !RM! from our list.
10306    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10307    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10308      # If it failed, the variable was not from the command line. Ignore it,
10309      # but warn the user (except for BASH, which is always set by the calling BASH).
10310      if test "xRM" != xBASH; then
10311        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10312$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10313      fi
10314      # Try to locate tool using the code snippet
10315      for ac_prog in rm
10316do
10317  # Extract the first word of "$ac_prog", so it can be a program name with args.
10318set dummy $ac_prog; ac_word=$2
10319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10320$as_echo_n "checking for $ac_word... " >&6; }
10321if ${ac_cv_path_RM+:} false; then :
10322  $as_echo_n "(cached) " >&6
10323else
10324  case $RM in
10325  [\\/]* | ?:[\\/]*)
10326  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10327  ;;
10328  *)
10329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10330for as_dir in $PATH
10331do
10332  IFS=$as_save_IFS
10333  test -z "$as_dir" && as_dir=.
10334    for ac_exec_ext in '' $ac_executable_extensions; do
10335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10336    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10338    break 2
10339  fi
10340done
10341  done
10342IFS=$as_save_IFS
10343
10344  ;;
10345esac
10346fi
10347RM=$ac_cv_path_RM
10348if test -n "$RM"; then
10349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10350$as_echo "$RM" >&6; }
10351else
10352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10353$as_echo "no" >&6; }
10354fi
10355
10356
10357  test -n "$RM" && break
10358done
10359
10360    else
10361      # If it succeeded, then it was overridden by the user. We will use it
10362      # for the tool.
10363
10364      # First remove it from the list of overridden variables, so we can test
10365      # for unknown variables in the end.
10366      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10367
10368      # Check if we try to supply an empty value
10369      if test "x$RM" = x; then
10370        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10371$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10372        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10373$as_echo_n "checking for RM... " >&6; }
10374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10375$as_echo "disabled" >&6; }
10376      else
10377        # Check if the provided tool contains a complete path.
10378        tool_specified="$RM"
10379        tool_basename="${tool_specified##*/}"
10380        if test "x$tool_basename" = "x$tool_specified"; then
10381          # A command without a complete path is provided, search $PATH.
10382          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10383$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10384          # Extract the first word of "$tool_basename", so it can be a program name with args.
10385set dummy $tool_basename; ac_word=$2
10386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10387$as_echo_n "checking for $ac_word... " >&6; }
10388if ${ac_cv_path_RM+:} false; then :
10389  $as_echo_n "(cached) " >&6
10390else
10391  case $RM in
10392  [\\/]* | ?:[\\/]*)
10393  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10394  ;;
10395  *)
10396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10397for as_dir in $PATH
10398do
10399  IFS=$as_save_IFS
10400  test -z "$as_dir" && as_dir=.
10401    for ac_exec_ext in '' $ac_executable_extensions; do
10402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10403    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10405    break 2
10406  fi
10407done
10408  done
10409IFS=$as_save_IFS
10410
10411  ;;
10412esac
10413fi
10414RM=$ac_cv_path_RM
10415if test -n "$RM"; then
10416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10417$as_echo "$RM" >&6; }
10418else
10419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10420$as_echo "no" >&6; }
10421fi
10422
10423
10424          if test "x$RM" = x; then
10425            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10426          fi
10427        else
10428          # Otherwise we believe it is a complete path. Use it as it is.
10429          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10430$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10431          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10432$as_echo_n "checking for RM... " >&6; }
10433          if test ! -x "$tool_specified"; then
10434            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10435$as_echo "not found" >&6; }
10436            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10437          fi
10438          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10439$as_echo "$tool_specified" >&6; }
10440        fi
10441      fi
10442    fi
10443
10444  fi
10445
10446
10447
10448  if test "x$RM" = x; then
10449    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10450  fi
10451
10452
10453
10454
10455
10456  # Publish this variable in the help.
10457
10458
10459  if [ -z "${RMDIR+x}" ]; then
10460    # The variable is not set by user, try to locate tool using the code snippet
10461    for ac_prog in rmdir
10462do
10463  # Extract the first word of "$ac_prog", so it can be a program name with args.
10464set dummy $ac_prog; ac_word=$2
10465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10466$as_echo_n "checking for $ac_word... " >&6; }
10467if ${ac_cv_path_RMDIR+:} false; then :
10468  $as_echo_n "(cached) " >&6
10469else
10470  case $RMDIR in
10471  [\\/]* | ?:[\\/]*)
10472  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10473  ;;
10474  *)
10475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10476for as_dir in $PATH
10477do
10478  IFS=$as_save_IFS
10479  test -z "$as_dir" && as_dir=.
10480    for ac_exec_ext in '' $ac_executable_extensions; do
10481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10482    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10484    break 2
10485  fi
10486done
10487  done
10488IFS=$as_save_IFS
10489
10490  ;;
10491esac
10492fi
10493RMDIR=$ac_cv_path_RMDIR
10494if test -n "$RMDIR"; then
10495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10496$as_echo "$RMDIR" >&6; }
10497else
10498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10499$as_echo "no" >&6; }
10500fi
10501
10502
10503  test -n "$RMDIR" && break
10504done
10505
10506  else
10507    # The variable is set, but is it from the command line or the environment?
10508
10509    # Try to remove the string !RMDIR! from our list.
10510    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10511    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10512      # If it failed, the variable was not from the command line. Ignore it,
10513      # but warn the user (except for BASH, which is always set by the calling BASH).
10514      if test "xRMDIR" != xBASH; then
10515        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10516$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10517      fi
10518      # Try to locate tool using the code snippet
10519      for ac_prog in rmdir
10520do
10521  # Extract the first word of "$ac_prog", so it can be a program name with args.
10522set dummy $ac_prog; ac_word=$2
10523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10524$as_echo_n "checking for $ac_word... " >&6; }
10525if ${ac_cv_path_RMDIR+:} false; then :
10526  $as_echo_n "(cached) " >&6
10527else
10528  case $RMDIR in
10529  [\\/]* | ?:[\\/]*)
10530  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10531  ;;
10532  *)
10533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10534for as_dir in $PATH
10535do
10536  IFS=$as_save_IFS
10537  test -z "$as_dir" && as_dir=.
10538    for ac_exec_ext in '' $ac_executable_extensions; do
10539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10540    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10542    break 2
10543  fi
10544done
10545  done
10546IFS=$as_save_IFS
10547
10548  ;;
10549esac
10550fi
10551RMDIR=$ac_cv_path_RMDIR
10552if test -n "$RMDIR"; then
10553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10554$as_echo "$RMDIR" >&6; }
10555else
10556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10557$as_echo "no" >&6; }
10558fi
10559
10560
10561  test -n "$RMDIR" && break
10562done
10563
10564    else
10565      # If it succeeded, then it was overridden by the user. We will use it
10566      # for the tool.
10567
10568      # First remove it from the list of overridden variables, so we can test
10569      # for unknown variables in the end.
10570      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10571
10572      # Check if we try to supply an empty value
10573      if test "x$RMDIR" = x; then
10574        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10575$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10576        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10577$as_echo_n "checking for RMDIR... " >&6; }
10578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10579$as_echo "disabled" >&6; }
10580      else
10581        # Check if the provided tool contains a complete path.
10582        tool_specified="$RMDIR"
10583        tool_basename="${tool_specified##*/}"
10584        if test "x$tool_basename" = "x$tool_specified"; then
10585          # A command without a complete path is provided, search $PATH.
10586          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10587$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10588          # Extract the first word of "$tool_basename", so it can be a program name with args.
10589set dummy $tool_basename; ac_word=$2
10590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10591$as_echo_n "checking for $ac_word... " >&6; }
10592if ${ac_cv_path_RMDIR+:} false; then :
10593  $as_echo_n "(cached) " >&6
10594else
10595  case $RMDIR in
10596  [\\/]* | ?:[\\/]*)
10597  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10598  ;;
10599  *)
10600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10601for as_dir in $PATH
10602do
10603  IFS=$as_save_IFS
10604  test -z "$as_dir" && as_dir=.
10605    for ac_exec_ext in '' $ac_executable_extensions; do
10606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10607    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10609    break 2
10610  fi
10611done
10612  done
10613IFS=$as_save_IFS
10614
10615  ;;
10616esac
10617fi
10618RMDIR=$ac_cv_path_RMDIR
10619if test -n "$RMDIR"; then
10620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10621$as_echo "$RMDIR" >&6; }
10622else
10623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10624$as_echo "no" >&6; }
10625fi
10626
10627
10628          if test "x$RMDIR" = x; then
10629            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10630          fi
10631        else
10632          # Otherwise we believe it is a complete path. Use it as it is.
10633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10634$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10635          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10636$as_echo_n "checking for RMDIR... " >&6; }
10637          if test ! -x "$tool_specified"; then
10638            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10639$as_echo "not found" >&6; }
10640            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10641          fi
10642          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10643$as_echo "$tool_specified" >&6; }
10644        fi
10645      fi
10646    fi
10647
10648  fi
10649
10650
10651
10652  if test "x$RMDIR" = x; then
10653    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10654  fi
10655
10656
10657
10658
10659
10660  # Publish this variable in the help.
10661
10662
10663  if [ -z "${SH+x}" ]; then
10664    # The variable is not set by user, try to locate tool using the code snippet
10665    for ac_prog in sh
10666do
10667  # Extract the first word of "$ac_prog", so it can be a program name with args.
10668set dummy $ac_prog; ac_word=$2
10669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10670$as_echo_n "checking for $ac_word... " >&6; }
10671if ${ac_cv_path_SH+:} false; then :
10672  $as_echo_n "(cached) " >&6
10673else
10674  case $SH in
10675  [\\/]* | ?:[\\/]*)
10676  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10677  ;;
10678  *)
10679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10680for as_dir in $PATH
10681do
10682  IFS=$as_save_IFS
10683  test -z "$as_dir" && as_dir=.
10684    for ac_exec_ext in '' $ac_executable_extensions; do
10685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10686    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10688    break 2
10689  fi
10690done
10691  done
10692IFS=$as_save_IFS
10693
10694  ;;
10695esac
10696fi
10697SH=$ac_cv_path_SH
10698if test -n "$SH"; then
10699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10700$as_echo "$SH" >&6; }
10701else
10702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10703$as_echo "no" >&6; }
10704fi
10705
10706
10707  test -n "$SH" && break
10708done
10709
10710  else
10711    # The variable is set, but is it from the command line or the environment?
10712
10713    # Try to remove the string !SH! from our list.
10714    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10715    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10716      # If it failed, the variable was not from the command line. Ignore it,
10717      # but warn the user (except for BASH, which is always set by the calling BASH).
10718      if test "xSH" != xBASH; then
10719        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10720$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10721      fi
10722      # Try to locate tool using the code snippet
10723      for ac_prog in sh
10724do
10725  # Extract the first word of "$ac_prog", so it can be a program name with args.
10726set dummy $ac_prog; ac_word=$2
10727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10728$as_echo_n "checking for $ac_word... " >&6; }
10729if ${ac_cv_path_SH+:} false; then :
10730  $as_echo_n "(cached) " >&6
10731else
10732  case $SH in
10733  [\\/]* | ?:[\\/]*)
10734  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10735  ;;
10736  *)
10737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10738for as_dir in $PATH
10739do
10740  IFS=$as_save_IFS
10741  test -z "$as_dir" && as_dir=.
10742    for ac_exec_ext in '' $ac_executable_extensions; do
10743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10744    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10746    break 2
10747  fi
10748done
10749  done
10750IFS=$as_save_IFS
10751
10752  ;;
10753esac
10754fi
10755SH=$ac_cv_path_SH
10756if test -n "$SH"; then
10757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10758$as_echo "$SH" >&6; }
10759else
10760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10761$as_echo "no" >&6; }
10762fi
10763
10764
10765  test -n "$SH" && break
10766done
10767
10768    else
10769      # If it succeeded, then it was overridden by the user. We will use it
10770      # for the tool.
10771
10772      # First remove it from the list of overridden variables, so we can test
10773      # for unknown variables in the end.
10774      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10775
10776      # Check if we try to supply an empty value
10777      if test "x$SH" = x; then
10778        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10779$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10780        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10781$as_echo_n "checking for SH... " >&6; }
10782        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10783$as_echo "disabled" >&6; }
10784      else
10785        # Check if the provided tool contains a complete path.
10786        tool_specified="$SH"
10787        tool_basename="${tool_specified##*/}"
10788        if test "x$tool_basename" = "x$tool_specified"; then
10789          # A command without a complete path is provided, search $PATH.
10790          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10791$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10792          # Extract the first word of "$tool_basename", so it can be a program name with args.
10793set dummy $tool_basename; ac_word=$2
10794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10795$as_echo_n "checking for $ac_word... " >&6; }
10796if ${ac_cv_path_SH+:} false; then :
10797  $as_echo_n "(cached) " >&6
10798else
10799  case $SH in
10800  [\\/]* | ?:[\\/]*)
10801  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10802  ;;
10803  *)
10804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10805for as_dir in $PATH
10806do
10807  IFS=$as_save_IFS
10808  test -z "$as_dir" && as_dir=.
10809    for ac_exec_ext in '' $ac_executable_extensions; do
10810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10811    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10813    break 2
10814  fi
10815done
10816  done
10817IFS=$as_save_IFS
10818
10819  ;;
10820esac
10821fi
10822SH=$ac_cv_path_SH
10823if test -n "$SH"; then
10824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10825$as_echo "$SH" >&6; }
10826else
10827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10828$as_echo "no" >&6; }
10829fi
10830
10831
10832          if test "x$SH" = x; then
10833            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10834          fi
10835        else
10836          # Otherwise we believe it is a complete path. Use it as it is.
10837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10838$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10839          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10840$as_echo_n "checking for SH... " >&6; }
10841          if test ! -x "$tool_specified"; then
10842            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10843$as_echo "not found" >&6; }
10844            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10845          fi
10846          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10847$as_echo "$tool_specified" >&6; }
10848        fi
10849      fi
10850    fi
10851
10852  fi
10853
10854
10855
10856  if test "x$SH" = x; then
10857    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10858  fi
10859
10860
10861
10862
10863
10864  # Publish this variable in the help.
10865
10866
10867  if [ -z "${SORT+x}" ]; then
10868    # The variable is not set by user, try to locate tool using the code snippet
10869    for ac_prog in sort
10870do
10871  # Extract the first word of "$ac_prog", so it can be a program name with args.
10872set dummy $ac_prog; ac_word=$2
10873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10874$as_echo_n "checking for $ac_word... " >&6; }
10875if ${ac_cv_path_SORT+:} false; then :
10876  $as_echo_n "(cached) " >&6
10877else
10878  case $SORT in
10879  [\\/]* | ?:[\\/]*)
10880  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10881  ;;
10882  *)
10883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10884for as_dir in $PATH
10885do
10886  IFS=$as_save_IFS
10887  test -z "$as_dir" && as_dir=.
10888    for ac_exec_ext in '' $ac_executable_extensions; do
10889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10890    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10892    break 2
10893  fi
10894done
10895  done
10896IFS=$as_save_IFS
10897
10898  ;;
10899esac
10900fi
10901SORT=$ac_cv_path_SORT
10902if test -n "$SORT"; then
10903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10904$as_echo "$SORT" >&6; }
10905else
10906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10907$as_echo "no" >&6; }
10908fi
10909
10910
10911  test -n "$SORT" && break
10912done
10913
10914  else
10915    # The variable is set, but is it from the command line or the environment?
10916
10917    # Try to remove the string !SORT! from our list.
10918    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10919    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10920      # If it failed, the variable was not from the command line. Ignore it,
10921      # but warn the user (except for BASH, which is always set by the calling BASH).
10922      if test "xSORT" != xBASH; then
10923        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10924$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10925      fi
10926      # Try to locate tool using the code snippet
10927      for ac_prog in sort
10928do
10929  # Extract the first word of "$ac_prog", so it can be a program name with args.
10930set dummy $ac_prog; ac_word=$2
10931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10932$as_echo_n "checking for $ac_word... " >&6; }
10933if ${ac_cv_path_SORT+:} false; then :
10934  $as_echo_n "(cached) " >&6
10935else
10936  case $SORT in
10937  [\\/]* | ?:[\\/]*)
10938  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10939  ;;
10940  *)
10941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10942for as_dir in $PATH
10943do
10944  IFS=$as_save_IFS
10945  test -z "$as_dir" && as_dir=.
10946    for ac_exec_ext in '' $ac_executable_extensions; do
10947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10948    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10950    break 2
10951  fi
10952done
10953  done
10954IFS=$as_save_IFS
10955
10956  ;;
10957esac
10958fi
10959SORT=$ac_cv_path_SORT
10960if test -n "$SORT"; then
10961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10962$as_echo "$SORT" >&6; }
10963else
10964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10965$as_echo "no" >&6; }
10966fi
10967
10968
10969  test -n "$SORT" && break
10970done
10971
10972    else
10973      # If it succeeded, then it was overridden by the user. We will use it
10974      # for the tool.
10975
10976      # First remove it from the list of overridden variables, so we can test
10977      # for unknown variables in the end.
10978      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10979
10980      # Check if we try to supply an empty value
10981      if test "x$SORT" = x; then
10982        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10983$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10984        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10985$as_echo_n "checking for SORT... " >&6; }
10986        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10987$as_echo "disabled" >&6; }
10988      else
10989        # Check if the provided tool contains a complete path.
10990        tool_specified="$SORT"
10991        tool_basename="${tool_specified##*/}"
10992        if test "x$tool_basename" = "x$tool_specified"; then
10993          # A command without a complete path is provided, search $PATH.
10994          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10995$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10996          # Extract the first word of "$tool_basename", so it can be a program name with args.
10997set dummy $tool_basename; ac_word=$2
10998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10999$as_echo_n "checking for $ac_word... " >&6; }
11000if ${ac_cv_path_SORT+:} false; then :
11001  $as_echo_n "(cached) " >&6
11002else
11003  case $SORT in
11004  [\\/]* | ?:[\\/]*)
11005  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11006  ;;
11007  *)
11008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11009for as_dir in $PATH
11010do
11011  IFS=$as_save_IFS
11012  test -z "$as_dir" && as_dir=.
11013    for ac_exec_ext in '' $ac_executable_extensions; do
11014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11015    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11017    break 2
11018  fi
11019done
11020  done
11021IFS=$as_save_IFS
11022
11023  ;;
11024esac
11025fi
11026SORT=$ac_cv_path_SORT
11027if test -n "$SORT"; then
11028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11029$as_echo "$SORT" >&6; }
11030else
11031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11032$as_echo "no" >&6; }
11033fi
11034
11035
11036          if test "x$SORT" = x; then
11037            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11038          fi
11039        else
11040          # Otherwise we believe it is a complete path. Use it as it is.
11041          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11042$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11043          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11044$as_echo_n "checking for SORT... " >&6; }
11045          if test ! -x "$tool_specified"; then
11046            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11047$as_echo "not found" >&6; }
11048            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11049          fi
11050          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11051$as_echo "$tool_specified" >&6; }
11052        fi
11053      fi
11054    fi
11055
11056  fi
11057
11058
11059
11060  if test "x$SORT" = x; then
11061    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11062  fi
11063
11064
11065
11066
11067
11068  # Publish this variable in the help.
11069
11070
11071  if [ -z "${TAIL+x}" ]; then
11072    # The variable is not set by user, try to locate tool using the code snippet
11073    for ac_prog in tail
11074do
11075  # Extract the first word of "$ac_prog", so it can be a program name with args.
11076set dummy $ac_prog; ac_word=$2
11077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11078$as_echo_n "checking for $ac_word... " >&6; }
11079if ${ac_cv_path_TAIL+:} false; then :
11080  $as_echo_n "(cached) " >&6
11081else
11082  case $TAIL in
11083  [\\/]* | ?:[\\/]*)
11084  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11085  ;;
11086  *)
11087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11088for as_dir in $PATH
11089do
11090  IFS=$as_save_IFS
11091  test -z "$as_dir" && as_dir=.
11092    for ac_exec_ext in '' $ac_executable_extensions; do
11093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11094    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11096    break 2
11097  fi
11098done
11099  done
11100IFS=$as_save_IFS
11101
11102  ;;
11103esac
11104fi
11105TAIL=$ac_cv_path_TAIL
11106if test -n "$TAIL"; then
11107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11108$as_echo "$TAIL" >&6; }
11109else
11110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11111$as_echo "no" >&6; }
11112fi
11113
11114
11115  test -n "$TAIL" && break
11116done
11117
11118  else
11119    # The variable is set, but is it from the command line or the environment?
11120
11121    # Try to remove the string !TAIL! from our list.
11122    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11123    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11124      # If it failed, the variable was not from the command line. Ignore it,
11125      # but warn the user (except for BASH, which is always set by the calling BASH).
11126      if test "xTAIL" != xBASH; then
11127        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11128$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11129      fi
11130      # Try to locate tool using the code snippet
11131      for ac_prog in tail
11132do
11133  # Extract the first word of "$ac_prog", so it can be a program name with args.
11134set dummy $ac_prog; ac_word=$2
11135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11136$as_echo_n "checking for $ac_word... " >&6; }
11137if ${ac_cv_path_TAIL+:} false; then :
11138  $as_echo_n "(cached) " >&6
11139else
11140  case $TAIL in
11141  [\\/]* | ?:[\\/]*)
11142  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11143  ;;
11144  *)
11145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11146for as_dir in $PATH
11147do
11148  IFS=$as_save_IFS
11149  test -z "$as_dir" && as_dir=.
11150    for ac_exec_ext in '' $ac_executable_extensions; do
11151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11152    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11154    break 2
11155  fi
11156done
11157  done
11158IFS=$as_save_IFS
11159
11160  ;;
11161esac
11162fi
11163TAIL=$ac_cv_path_TAIL
11164if test -n "$TAIL"; then
11165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11166$as_echo "$TAIL" >&6; }
11167else
11168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11169$as_echo "no" >&6; }
11170fi
11171
11172
11173  test -n "$TAIL" && break
11174done
11175
11176    else
11177      # If it succeeded, then it was overridden by the user. We will use it
11178      # for the tool.
11179
11180      # First remove it from the list of overridden variables, so we can test
11181      # for unknown variables in the end.
11182      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11183
11184      # Check if we try to supply an empty value
11185      if test "x$TAIL" = x; then
11186        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11187$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11188        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11189$as_echo_n "checking for TAIL... " >&6; }
11190        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11191$as_echo "disabled" >&6; }
11192      else
11193        # Check if the provided tool contains a complete path.
11194        tool_specified="$TAIL"
11195        tool_basename="${tool_specified##*/}"
11196        if test "x$tool_basename" = "x$tool_specified"; then
11197          # A command without a complete path is provided, search $PATH.
11198          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11199$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11200          # Extract the first word of "$tool_basename", so it can be a program name with args.
11201set dummy $tool_basename; ac_word=$2
11202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11203$as_echo_n "checking for $ac_word... " >&6; }
11204if ${ac_cv_path_TAIL+:} false; then :
11205  $as_echo_n "(cached) " >&6
11206else
11207  case $TAIL in
11208  [\\/]* | ?:[\\/]*)
11209  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11210  ;;
11211  *)
11212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11213for as_dir in $PATH
11214do
11215  IFS=$as_save_IFS
11216  test -z "$as_dir" && as_dir=.
11217    for ac_exec_ext in '' $ac_executable_extensions; do
11218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11219    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11221    break 2
11222  fi
11223done
11224  done
11225IFS=$as_save_IFS
11226
11227  ;;
11228esac
11229fi
11230TAIL=$ac_cv_path_TAIL
11231if test -n "$TAIL"; then
11232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11233$as_echo "$TAIL" >&6; }
11234else
11235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11236$as_echo "no" >&6; }
11237fi
11238
11239
11240          if test "x$TAIL" = x; then
11241            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11242          fi
11243        else
11244          # Otherwise we believe it is a complete path. Use it as it is.
11245          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11246$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11247          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11248$as_echo_n "checking for TAIL... " >&6; }
11249          if test ! -x "$tool_specified"; then
11250            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11251$as_echo "not found" >&6; }
11252            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11253          fi
11254          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11255$as_echo "$tool_specified" >&6; }
11256        fi
11257      fi
11258    fi
11259
11260  fi
11261
11262
11263
11264  if test "x$TAIL" = x; then
11265    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11266  fi
11267
11268
11269
11270
11271
11272  # Publish this variable in the help.
11273
11274
11275  if [ -z "${TAR+x}" ]; then
11276    # The variable is not set by user, try to locate tool using the code snippet
11277    for ac_prog in gtar tar
11278do
11279  # Extract the first word of "$ac_prog", so it can be a program name with args.
11280set dummy $ac_prog; ac_word=$2
11281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11282$as_echo_n "checking for $ac_word... " >&6; }
11283if ${ac_cv_path_TAR+:} false; then :
11284  $as_echo_n "(cached) " >&6
11285else
11286  case $TAR in
11287  [\\/]* | ?:[\\/]*)
11288  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11289  ;;
11290  *)
11291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11292for as_dir in $PATH
11293do
11294  IFS=$as_save_IFS
11295  test -z "$as_dir" && as_dir=.
11296    for ac_exec_ext in '' $ac_executable_extensions; do
11297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11298    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11300    break 2
11301  fi
11302done
11303  done
11304IFS=$as_save_IFS
11305
11306  ;;
11307esac
11308fi
11309TAR=$ac_cv_path_TAR
11310if test -n "$TAR"; then
11311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11312$as_echo "$TAR" >&6; }
11313else
11314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11315$as_echo "no" >&6; }
11316fi
11317
11318
11319  test -n "$TAR" && break
11320done
11321
11322  else
11323    # The variable is set, but is it from the command line or the environment?
11324
11325    # Try to remove the string !TAR! from our list.
11326    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11327    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11328      # If it failed, the variable was not from the command line. Ignore it,
11329      # but warn the user (except for BASH, which is always set by the calling BASH).
11330      if test "xTAR" != xBASH; then
11331        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11332$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11333      fi
11334      # Try to locate tool using the code snippet
11335      for ac_prog in gtar tar
11336do
11337  # Extract the first word of "$ac_prog", so it can be a program name with args.
11338set dummy $ac_prog; ac_word=$2
11339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11340$as_echo_n "checking for $ac_word... " >&6; }
11341if ${ac_cv_path_TAR+:} false; then :
11342  $as_echo_n "(cached) " >&6
11343else
11344  case $TAR in
11345  [\\/]* | ?:[\\/]*)
11346  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11347  ;;
11348  *)
11349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11350for as_dir in $PATH
11351do
11352  IFS=$as_save_IFS
11353  test -z "$as_dir" && as_dir=.
11354    for ac_exec_ext in '' $ac_executable_extensions; do
11355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11356    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11358    break 2
11359  fi
11360done
11361  done
11362IFS=$as_save_IFS
11363
11364  ;;
11365esac
11366fi
11367TAR=$ac_cv_path_TAR
11368if test -n "$TAR"; then
11369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11370$as_echo "$TAR" >&6; }
11371else
11372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11373$as_echo "no" >&6; }
11374fi
11375
11376
11377  test -n "$TAR" && break
11378done
11379
11380    else
11381      # If it succeeded, then it was overridden by the user. We will use it
11382      # for the tool.
11383
11384      # First remove it from the list of overridden variables, so we can test
11385      # for unknown variables in the end.
11386      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11387
11388      # Check if we try to supply an empty value
11389      if test "x$TAR" = x; then
11390        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11391$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11392        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11393$as_echo_n "checking for TAR... " >&6; }
11394        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11395$as_echo "disabled" >&6; }
11396      else
11397        # Check if the provided tool contains a complete path.
11398        tool_specified="$TAR"
11399        tool_basename="${tool_specified##*/}"
11400        if test "x$tool_basename" = "x$tool_specified"; then
11401          # A command without a complete path is provided, search $PATH.
11402          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11403$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11404          # Extract the first word of "$tool_basename", so it can be a program name with args.
11405set dummy $tool_basename; ac_word=$2
11406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11407$as_echo_n "checking for $ac_word... " >&6; }
11408if ${ac_cv_path_TAR+:} false; then :
11409  $as_echo_n "(cached) " >&6
11410else
11411  case $TAR in
11412  [\\/]* | ?:[\\/]*)
11413  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11414  ;;
11415  *)
11416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11417for as_dir in $PATH
11418do
11419  IFS=$as_save_IFS
11420  test -z "$as_dir" && as_dir=.
11421    for ac_exec_ext in '' $ac_executable_extensions; do
11422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11423    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11425    break 2
11426  fi
11427done
11428  done
11429IFS=$as_save_IFS
11430
11431  ;;
11432esac
11433fi
11434TAR=$ac_cv_path_TAR
11435if test -n "$TAR"; then
11436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11437$as_echo "$TAR" >&6; }
11438else
11439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11440$as_echo "no" >&6; }
11441fi
11442
11443
11444          if test "x$TAR" = x; then
11445            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11446          fi
11447        else
11448          # Otherwise we believe it is a complete path. Use it as it is.
11449          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11450$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11451          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11452$as_echo_n "checking for TAR... " >&6; }
11453          if test ! -x "$tool_specified"; then
11454            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11455$as_echo "not found" >&6; }
11456            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11457          fi
11458          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11459$as_echo "$tool_specified" >&6; }
11460        fi
11461      fi
11462    fi
11463
11464  fi
11465
11466
11467
11468  if test "x$TAR" = x; then
11469    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11470  fi
11471
11472
11473
11474
11475
11476  # Publish this variable in the help.
11477
11478
11479  if [ -z "${TEE+x}" ]; then
11480    # The variable is not set by user, try to locate tool using the code snippet
11481    for ac_prog in tee
11482do
11483  # Extract the first word of "$ac_prog", so it can be a program name with args.
11484set dummy $ac_prog; ac_word=$2
11485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11486$as_echo_n "checking for $ac_word... " >&6; }
11487if ${ac_cv_path_TEE+:} false; then :
11488  $as_echo_n "(cached) " >&6
11489else
11490  case $TEE in
11491  [\\/]* | ?:[\\/]*)
11492  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11493  ;;
11494  *)
11495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11496for as_dir in $PATH
11497do
11498  IFS=$as_save_IFS
11499  test -z "$as_dir" && as_dir=.
11500    for ac_exec_ext in '' $ac_executable_extensions; do
11501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11502    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11504    break 2
11505  fi
11506done
11507  done
11508IFS=$as_save_IFS
11509
11510  ;;
11511esac
11512fi
11513TEE=$ac_cv_path_TEE
11514if test -n "$TEE"; then
11515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11516$as_echo "$TEE" >&6; }
11517else
11518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11519$as_echo "no" >&6; }
11520fi
11521
11522
11523  test -n "$TEE" && break
11524done
11525
11526  else
11527    # The variable is set, but is it from the command line or the environment?
11528
11529    # Try to remove the string !TEE! from our list.
11530    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11531    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11532      # If it failed, the variable was not from the command line. Ignore it,
11533      # but warn the user (except for BASH, which is always set by the calling BASH).
11534      if test "xTEE" != xBASH; then
11535        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11536$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11537      fi
11538      # Try to locate tool using the code snippet
11539      for ac_prog in tee
11540do
11541  # Extract the first word of "$ac_prog", so it can be a program name with args.
11542set dummy $ac_prog; ac_word=$2
11543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11544$as_echo_n "checking for $ac_word... " >&6; }
11545if ${ac_cv_path_TEE+:} false; then :
11546  $as_echo_n "(cached) " >&6
11547else
11548  case $TEE in
11549  [\\/]* | ?:[\\/]*)
11550  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11551  ;;
11552  *)
11553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11554for as_dir in $PATH
11555do
11556  IFS=$as_save_IFS
11557  test -z "$as_dir" && as_dir=.
11558    for ac_exec_ext in '' $ac_executable_extensions; do
11559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11560    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11562    break 2
11563  fi
11564done
11565  done
11566IFS=$as_save_IFS
11567
11568  ;;
11569esac
11570fi
11571TEE=$ac_cv_path_TEE
11572if test -n "$TEE"; then
11573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11574$as_echo "$TEE" >&6; }
11575else
11576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11577$as_echo "no" >&6; }
11578fi
11579
11580
11581  test -n "$TEE" && break
11582done
11583
11584    else
11585      # If it succeeded, then it was overridden by the user. We will use it
11586      # for the tool.
11587
11588      # First remove it from the list of overridden variables, so we can test
11589      # for unknown variables in the end.
11590      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11591
11592      # Check if we try to supply an empty value
11593      if test "x$TEE" = x; then
11594        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11595$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11596        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11597$as_echo_n "checking for TEE... " >&6; }
11598        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11599$as_echo "disabled" >&6; }
11600      else
11601        # Check if the provided tool contains a complete path.
11602        tool_specified="$TEE"
11603        tool_basename="${tool_specified##*/}"
11604        if test "x$tool_basename" = "x$tool_specified"; then
11605          # A command without a complete path is provided, search $PATH.
11606          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11607$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11608          # Extract the first word of "$tool_basename", so it can be a program name with args.
11609set dummy $tool_basename; ac_word=$2
11610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11611$as_echo_n "checking for $ac_word... " >&6; }
11612if ${ac_cv_path_TEE+:} false; then :
11613  $as_echo_n "(cached) " >&6
11614else
11615  case $TEE in
11616  [\\/]* | ?:[\\/]*)
11617  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11618  ;;
11619  *)
11620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11621for as_dir in $PATH
11622do
11623  IFS=$as_save_IFS
11624  test -z "$as_dir" && as_dir=.
11625    for ac_exec_ext in '' $ac_executable_extensions; do
11626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11627    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11629    break 2
11630  fi
11631done
11632  done
11633IFS=$as_save_IFS
11634
11635  ;;
11636esac
11637fi
11638TEE=$ac_cv_path_TEE
11639if test -n "$TEE"; then
11640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11641$as_echo "$TEE" >&6; }
11642else
11643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11644$as_echo "no" >&6; }
11645fi
11646
11647
11648          if test "x$TEE" = x; then
11649            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11650          fi
11651        else
11652          # Otherwise we believe it is a complete path. Use it as it is.
11653          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11654$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11655          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11656$as_echo_n "checking for TEE... " >&6; }
11657          if test ! -x "$tool_specified"; then
11658            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11659$as_echo "not found" >&6; }
11660            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11661          fi
11662          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11663$as_echo "$tool_specified" >&6; }
11664        fi
11665      fi
11666    fi
11667
11668  fi
11669
11670
11671
11672  if test "x$TEE" = x; then
11673    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11674  fi
11675
11676
11677
11678
11679
11680  # Publish this variable in the help.
11681
11682
11683  if [ -z "${TOUCH+x}" ]; then
11684    # The variable is not set by user, try to locate tool using the code snippet
11685    for ac_prog in touch
11686do
11687  # Extract the first word of "$ac_prog", so it can be a program name with args.
11688set dummy $ac_prog; ac_word=$2
11689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11690$as_echo_n "checking for $ac_word... " >&6; }
11691if ${ac_cv_path_TOUCH+:} false; then :
11692  $as_echo_n "(cached) " >&6
11693else
11694  case $TOUCH in
11695  [\\/]* | ?:[\\/]*)
11696  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11697  ;;
11698  *)
11699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11700for as_dir in $PATH
11701do
11702  IFS=$as_save_IFS
11703  test -z "$as_dir" && as_dir=.
11704    for ac_exec_ext in '' $ac_executable_extensions; do
11705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11706    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11708    break 2
11709  fi
11710done
11711  done
11712IFS=$as_save_IFS
11713
11714  ;;
11715esac
11716fi
11717TOUCH=$ac_cv_path_TOUCH
11718if test -n "$TOUCH"; then
11719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11720$as_echo "$TOUCH" >&6; }
11721else
11722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11723$as_echo "no" >&6; }
11724fi
11725
11726
11727  test -n "$TOUCH" && break
11728done
11729
11730  else
11731    # The variable is set, but is it from the command line or the environment?
11732
11733    # Try to remove the string !TOUCH! from our list.
11734    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11735    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11736      # If it failed, the variable was not from the command line. Ignore it,
11737      # but warn the user (except for BASH, which is always set by the calling BASH).
11738      if test "xTOUCH" != xBASH; then
11739        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11740$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11741      fi
11742      # Try to locate tool using the code snippet
11743      for ac_prog in touch
11744do
11745  # Extract the first word of "$ac_prog", so it can be a program name with args.
11746set dummy $ac_prog; ac_word=$2
11747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11748$as_echo_n "checking for $ac_word... " >&6; }
11749if ${ac_cv_path_TOUCH+:} false; then :
11750  $as_echo_n "(cached) " >&6
11751else
11752  case $TOUCH in
11753  [\\/]* | ?:[\\/]*)
11754  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11755  ;;
11756  *)
11757  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11758for as_dir in $PATH
11759do
11760  IFS=$as_save_IFS
11761  test -z "$as_dir" && as_dir=.
11762    for ac_exec_ext in '' $ac_executable_extensions; do
11763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11764    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11766    break 2
11767  fi
11768done
11769  done
11770IFS=$as_save_IFS
11771
11772  ;;
11773esac
11774fi
11775TOUCH=$ac_cv_path_TOUCH
11776if test -n "$TOUCH"; then
11777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11778$as_echo "$TOUCH" >&6; }
11779else
11780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11781$as_echo "no" >&6; }
11782fi
11783
11784
11785  test -n "$TOUCH" && break
11786done
11787
11788    else
11789      # If it succeeded, then it was overridden by the user. We will use it
11790      # for the tool.
11791
11792      # First remove it from the list of overridden variables, so we can test
11793      # for unknown variables in the end.
11794      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11795
11796      # Check if we try to supply an empty value
11797      if test "x$TOUCH" = x; then
11798        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11799$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11800        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11801$as_echo_n "checking for TOUCH... " >&6; }
11802        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11803$as_echo "disabled" >&6; }
11804      else
11805        # Check if the provided tool contains a complete path.
11806        tool_specified="$TOUCH"
11807        tool_basename="${tool_specified##*/}"
11808        if test "x$tool_basename" = "x$tool_specified"; then
11809          # A command without a complete path is provided, search $PATH.
11810          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11811$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11812          # Extract the first word of "$tool_basename", so it can be a program name with args.
11813set dummy $tool_basename; ac_word=$2
11814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11815$as_echo_n "checking for $ac_word... " >&6; }
11816if ${ac_cv_path_TOUCH+:} false; then :
11817  $as_echo_n "(cached) " >&6
11818else
11819  case $TOUCH in
11820  [\\/]* | ?:[\\/]*)
11821  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11822  ;;
11823  *)
11824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11825for as_dir in $PATH
11826do
11827  IFS=$as_save_IFS
11828  test -z "$as_dir" && as_dir=.
11829    for ac_exec_ext in '' $ac_executable_extensions; do
11830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11831    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11833    break 2
11834  fi
11835done
11836  done
11837IFS=$as_save_IFS
11838
11839  ;;
11840esac
11841fi
11842TOUCH=$ac_cv_path_TOUCH
11843if test -n "$TOUCH"; then
11844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11845$as_echo "$TOUCH" >&6; }
11846else
11847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11848$as_echo "no" >&6; }
11849fi
11850
11851
11852          if test "x$TOUCH" = x; then
11853            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11854          fi
11855        else
11856          # Otherwise we believe it is a complete path. Use it as it is.
11857          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11858$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11859          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11860$as_echo_n "checking for TOUCH... " >&6; }
11861          if test ! -x "$tool_specified"; then
11862            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11863$as_echo "not found" >&6; }
11864            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11865          fi
11866          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11867$as_echo "$tool_specified" >&6; }
11868        fi
11869      fi
11870    fi
11871
11872  fi
11873
11874
11875
11876  if test "x$TOUCH" = x; then
11877    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11878  fi
11879
11880
11881
11882
11883
11884  # Publish this variable in the help.
11885
11886
11887  if [ -z "${TR+x}" ]; then
11888    # The variable is not set by user, try to locate tool using the code snippet
11889    for ac_prog in tr
11890do
11891  # Extract the first word of "$ac_prog", so it can be a program name with args.
11892set dummy $ac_prog; ac_word=$2
11893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11894$as_echo_n "checking for $ac_word... " >&6; }
11895if ${ac_cv_path_TR+:} false; then :
11896  $as_echo_n "(cached) " >&6
11897else
11898  case $TR in
11899  [\\/]* | ?:[\\/]*)
11900  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11901  ;;
11902  *)
11903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11904for as_dir in $PATH
11905do
11906  IFS=$as_save_IFS
11907  test -z "$as_dir" && as_dir=.
11908    for ac_exec_ext in '' $ac_executable_extensions; do
11909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11910    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11912    break 2
11913  fi
11914done
11915  done
11916IFS=$as_save_IFS
11917
11918  ;;
11919esac
11920fi
11921TR=$ac_cv_path_TR
11922if test -n "$TR"; then
11923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11924$as_echo "$TR" >&6; }
11925else
11926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11927$as_echo "no" >&6; }
11928fi
11929
11930
11931  test -n "$TR" && break
11932done
11933
11934  else
11935    # The variable is set, but is it from the command line or the environment?
11936
11937    # Try to remove the string !TR! from our list.
11938    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11939    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11940      # If it failed, the variable was not from the command line. Ignore it,
11941      # but warn the user (except for BASH, which is always set by the calling BASH).
11942      if test "xTR" != xBASH; then
11943        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11944$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11945      fi
11946      # Try to locate tool using the code snippet
11947      for ac_prog in tr
11948do
11949  # Extract the first word of "$ac_prog", so it can be a program name with args.
11950set dummy $ac_prog; ac_word=$2
11951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11952$as_echo_n "checking for $ac_word... " >&6; }
11953if ${ac_cv_path_TR+:} false; then :
11954  $as_echo_n "(cached) " >&6
11955else
11956  case $TR in
11957  [\\/]* | ?:[\\/]*)
11958  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11959  ;;
11960  *)
11961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11962for as_dir in $PATH
11963do
11964  IFS=$as_save_IFS
11965  test -z "$as_dir" && as_dir=.
11966    for ac_exec_ext in '' $ac_executable_extensions; do
11967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11968    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11970    break 2
11971  fi
11972done
11973  done
11974IFS=$as_save_IFS
11975
11976  ;;
11977esac
11978fi
11979TR=$ac_cv_path_TR
11980if test -n "$TR"; then
11981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11982$as_echo "$TR" >&6; }
11983else
11984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11985$as_echo "no" >&6; }
11986fi
11987
11988
11989  test -n "$TR" && break
11990done
11991
11992    else
11993      # If it succeeded, then it was overridden by the user. We will use it
11994      # for the tool.
11995
11996      # First remove it from the list of overridden variables, so we can test
11997      # for unknown variables in the end.
11998      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11999
12000      # Check if we try to supply an empty value
12001      if test "x$TR" = x; then
12002        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12003$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12004        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12005$as_echo_n "checking for TR... " >&6; }
12006        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12007$as_echo "disabled" >&6; }
12008      else
12009        # Check if the provided tool contains a complete path.
12010        tool_specified="$TR"
12011        tool_basename="${tool_specified##*/}"
12012        if test "x$tool_basename" = "x$tool_specified"; then
12013          # A command without a complete path is provided, search $PATH.
12014          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12015$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12016          # Extract the first word of "$tool_basename", so it can be a program name with args.
12017set dummy $tool_basename; ac_word=$2
12018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12019$as_echo_n "checking for $ac_word... " >&6; }
12020if ${ac_cv_path_TR+:} false; then :
12021  $as_echo_n "(cached) " >&6
12022else
12023  case $TR in
12024  [\\/]* | ?:[\\/]*)
12025  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12026  ;;
12027  *)
12028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12029for as_dir in $PATH
12030do
12031  IFS=$as_save_IFS
12032  test -z "$as_dir" && as_dir=.
12033    for ac_exec_ext in '' $ac_executable_extensions; do
12034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12035    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12037    break 2
12038  fi
12039done
12040  done
12041IFS=$as_save_IFS
12042
12043  ;;
12044esac
12045fi
12046TR=$ac_cv_path_TR
12047if test -n "$TR"; then
12048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12049$as_echo "$TR" >&6; }
12050else
12051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12052$as_echo "no" >&6; }
12053fi
12054
12055
12056          if test "x$TR" = x; then
12057            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12058          fi
12059        else
12060          # Otherwise we believe it is a complete path. Use it as it is.
12061          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12062$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12063          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12064$as_echo_n "checking for TR... " >&6; }
12065          if test ! -x "$tool_specified"; then
12066            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12067$as_echo "not found" >&6; }
12068            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12069          fi
12070          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12071$as_echo "$tool_specified" >&6; }
12072        fi
12073      fi
12074    fi
12075
12076  fi
12077
12078
12079
12080  if test "x$TR" = x; then
12081    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12082  fi
12083
12084
12085
12086
12087
12088  # Publish this variable in the help.
12089
12090
12091  if [ -z "${UNAME+x}" ]; then
12092    # The variable is not set by user, try to locate tool using the code snippet
12093    for ac_prog in uname
12094do
12095  # Extract the first word of "$ac_prog", so it can be a program name with args.
12096set dummy $ac_prog; ac_word=$2
12097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12098$as_echo_n "checking for $ac_word... " >&6; }
12099if ${ac_cv_path_UNAME+:} false; then :
12100  $as_echo_n "(cached) " >&6
12101else
12102  case $UNAME in
12103  [\\/]* | ?:[\\/]*)
12104  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12105  ;;
12106  *)
12107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12108for as_dir in $PATH
12109do
12110  IFS=$as_save_IFS
12111  test -z "$as_dir" && as_dir=.
12112    for ac_exec_ext in '' $ac_executable_extensions; do
12113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12114    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12116    break 2
12117  fi
12118done
12119  done
12120IFS=$as_save_IFS
12121
12122  ;;
12123esac
12124fi
12125UNAME=$ac_cv_path_UNAME
12126if test -n "$UNAME"; then
12127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12128$as_echo "$UNAME" >&6; }
12129else
12130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12131$as_echo "no" >&6; }
12132fi
12133
12134
12135  test -n "$UNAME" && break
12136done
12137
12138  else
12139    # The variable is set, but is it from the command line or the environment?
12140
12141    # Try to remove the string !UNAME! from our list.
12142    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12143    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12144      # If it failed, the variable was not from the command line. Ignore it,
12145      # but warn the user (except for BASH, which is always set by the calling BASH).
12146      if test "xUNAME" != xBASH; then
12147        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12148$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12149      fi
12150      # Try to locate tool using the code snippet
12151      for ac_prog in uname
12152do
12153  # Extract the first word of "$ac_prog", so it can be a program name with args.
12154set dummy $ac_prog; ac_word=$2
12155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12156$as_echo_n "checking for $ac_word... " >&6; }
12157if ${ac_cv_path_UNAME+:} false; then :
12158  $as_echo_n "(cached) " >&6
12159else
12160  case $UNAME in
12161  [\\/]* | ?:[\\/]*)
12162  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12163  ;;
12164  *)
12165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12166for as_dir in $PATH
12167do
12168  IFS=$as_save_IFS
12169  test -z "$as_dir" && as_dir=.
12170    for ac_exec_ext in '' $ac_executable_extensions; do
12171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12172    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12174    break 2
12175  fi
12176done
12177  done
12178IFS=$as_save_IFS
12179
12180  ;;
12181esac
12182fi
12183UNAME=$ac_cv_path_UNAME
12184if test -n "$UNAME"; then
12185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12186$as_echo "$UNAME" >&6; }
12187else
12188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12189$as_echo "no" >&6; }
12190fi
12191
12192
12193  test -n "$UNAME" && break
12194done
12195
12196    else
12197      # If it succeeded, then it was overridden by the user. We will use it
12198      # for the tool.
12199
12200      # First remove it from the list of overridden variables, so we can test
12201      # for unknown variables in the end.
12202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12203
12204      # Check if we try to supply an empty value
12205      if test "x$UNAME" = x; then
12206        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12207$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12208        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12209$as_echo_n "checking for UNAME... " >&6; }
12210        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12211$as_echo "disabled" >&6; }
12212      else
12213        # Check if the provided tool contains a complete path.
12214        tool_specified="$UNAME"
12215        tool_basename="${tool_specified##*/}"
12216        if test "x$tool_basename" = "x$tool_specified"; then
12217          # A command without a complete path is provided, search $PATH.
12218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12219$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12220          # Extract the first word of "$tool_basename", so it can be a program name with args.
12221set dummy $tool_basename; ac_word=$2
12222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12223$as_echo_n "checking for $ac_word... " >&6; }
12224if ${ac_cv_path_UNAME+:} false; then :
12225  $as_echo_n "(cached) " >&6
12226else
12227  case $UNAME in
12228  [\\/]* | ?:[\\/]*)
12229  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12230  ;;
12231  *)
12232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12233for as_dir in $PATH
12234do
12235  IFS=$as_save_IFS
12236  test -z "$as_dir" && as_dir=.
12237    for ac_exec_ext in '' $ac_executable_extensions; do
12238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12239    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12241    break 2
12242  fi
12243done
12244  done
12245IFS=$as_save_IFS
12246
12247  ;;
12248esac
12249fi
12250UNAME=$ac_cv_path_UNAME
12251if test -n "$UNAME"; then
12252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12253$as_echo "$UNAME" >&6; }
12254else
12255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12256$as_echo "no" >&6; }
12257fi
12258
12259
12260          if test "x$UNAME" = x; then
12261            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12262          fi
12263        else
12264          # Otherwise we believe it is a complete path. Use it as it is.
12265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12266$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12267          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12268$as_echo_n "checking for UNAME... " >&6; }
12269          if test ! -x "$tool_specified"; then
12270            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12271$as_echo "not found" >&6; }
12272            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12273          fi
12274          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12275$as_echo "$tool_specified" >&6; }
12276        fi
12277      fi
12278    fi
12279
12280  fi
12281
12282
12283
12284  if test "x$UNAME" = x; then
12285    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12286  fi
12287
12288
12289
12290
12291
12292  # Publish this variable in the help.
12293
12294
12295  if [ -z "${UNIQ+x}" ]; then
12296    # The variable is not set by user, try to locate tool using the code snippet
12297    for ac_prog in uniq
12298do
12299  # Extract the first word of "$ac_prog", so it can be a program name with args.
12300set dummy $ac_prog; ac_word=$2
12301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12302$as_echo_n "checking for $ac_word... " >&6; }
12303if ${ac_cv_path_UNIQ+:} false; then :
12304  $as_echo_n "(cached) " >&6
12305else
12306  case $UNIQ in
12307  [\\/]* | ?:[\\/]*)
12308  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12309  ;;
12310  *)
12311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12312for as_dir in $PATH
12313do
12314  IFS=$as_save_IFS
12315  test -z "$as_dir" && as_dir=.
12316    for ac_exec_ext in '' $ac_executable_extensions; do
12317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12318    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12320    break 2
12321  fi
12322done
12323  done
12324IFS=$as_save_IFS
12325
12326  ;;
12327esac
12328fi
12329UNIQ=$ac_cv_path_UNIQ
12330if test -n "$UNIQ"; then
12331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12332$as_echo "$UNIQ" >&6; }
12333else
12334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12335$as_echo "no" >&6; }
12336fi
12337
12338
12339  test -n "$UNIQ" && break
12340done
12341
12342  else
12343    # The variable is set, but is it from the command line or the environment?
12344
12345    # Try to remove the string !UNIQ! from our list.
12346    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12347    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12348      # If it failed, the variable was not from the command line. Ignore it,
12349      # but warn the user (except for BASH, which is always set by the calling BASH).
12350      if test "xUNIQ" != xBASH; then
12351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12352$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12353      fi
12354      # Try to locate tool using the code snippet
12355      for ac_prog in uniq
12356do
12357  # Extract the first word of "$ac_prog", so it can be a program name with args.
12358set dummy $ac_prog; ac_word=$2
12359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12360$as_echo_n "checking for $ac_word... " >&6; }
12361if ${ac_cv_path_UNIQ+:} false; then :
12362  $as_echo_n "(cached) " >&6
12363else
12364  case $UNIQ in
12365  [\\/]* | ?:[\\/]*)
12366  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12367  ;;
12368  *)
12369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12370for as_dir in $PATH
12371do
12372  IFS=$as_save_IFS
12373  test -z "$as_dir" && as_dir=.
12374    for ac_exec_ext in '' $ac_executable_extensions; do
12375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12376    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12378    break 2
12379  fi
12380done
12381  done
12382IFS=$as_save_IFS
12383
12384  ;;
12385esac
12386fi
12387UNIQ=$ac_cv_path_UNIQ
12388if test -n "$UNIQ"; then
12389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12390$as_echo "$UNIQ" >&6; }
12391else
12392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12393$as_echo "no" >&6; }
12394fi
12395
12396
12397  test -n "$UNIQ" && break
12398done
12399
12400    else
12401      # If it succeeded, then it was overridden by the user. We will use it
12402      # for the tool.
12403
12404      # First remove it from the list of overridden variables, so we can test
12405      # for unknown variables in the end.
12406      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12407
12408      # Check if we try to supply an empty value
12409      if test "x$UNIQ" = x; then
12410        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12411$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12412        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12413$as_echo_n "checking for UNIQ... " >&6; }
12414        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12415$as_echo "disabled" >&6; }
12416      else
12417        # Check if the provided tool contains a complete path.
12418        tool_specified="$UNIQ"
12419        tool_basename="${tool_specified##*/}"
12420        if test "x$tool_basename" = "x$tool_specified"; then
12421          # A command without a complete path is provided, search $PATH.
12422          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12423$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12424          # Extract the first word of "$tool_basename", so it can be a program name with args.
12425set dummy $tool_basename; ac_word=$2
12426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12427$as_echo_n "checking for $ac_word... " >&6; }
12428if ${ac_cv_path_UNIQ+:} false; then :
12429  $as_echo_n "(cached) " >&6
12430else
12431  case $UNIQ in
12432  [\\/]* | ?:[\\/]*)
12433  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12434  ;;
12435  *)
12436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12437for as_dir in $PATH
12438do
12439  IFS=$as_save_IFS
12440  test -z "$as_dir" && as_dir=.
12441    for ac_exec_ext in '' $ac_executable_extensions; do
12442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12443    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12445    break 2
12446  fi
12447done
12448  done
12449IFS=$as_save_IFS
12450
12451  ;;
12452esac
12453fi
12454UNIQ=$ac_cv_path_UNIQ
12455if test -n "$UNIQ"; then
12456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12457$as_echo "$UNIQ" >&6; }
12458else
12459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12460$as_echo "no" >&6; }
12461fi
12462
12463
12464          if test "x$UNIQ" = x; then
12465            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12466          fi
12467        else
12468          # Otherwise we believe it is a complete path. Use it as it is.
12469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12470$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12471          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12472$as_echo_n "checking for UNIQ... " >&6; }
12473          if test ! -x "$tool_specified"; then
12474            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12475$as_echo "not found" >&6; }
12476            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12477          fi
12478          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12479$as_echo "$tool_specified" >&6; }
12480        fi
12481      fi
12482    fi
12483
12484  fi
12485
12486
12487
12488  if test "x$UNIQ" = x; then
12489    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12490  fi
12491
12492
12493
12494
12495
12496  # Publish this variable in the help.
12497
12498
12499  if [ -z "${WC+x}" ]; then
12500    # The variable is not set by user, try to locate tool using the code snippet
12501    for ac_prog in wc
12502do
12503  # Extract the first word of "$ac_prog", so it can be a program name with args.
12504set dummy $ac_prog; ac_word=$2
12505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12506$as_echo_n "checking for $ac_word... " >&6; }
12507if ${ac_cv_path_WC+:} false; then :
12508  $as_echo_n "(cached) " >&6
12509else
12510  case $WC in
12511  [\\/]* | ?:[\\/]*)
12512  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12513  ;;
12514  *)
12515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12516for as_dir in $PATH
12517do
12518  IFS=$as_save_IFS
12519  test -z "$as_dir" && as_dir=.
12520    for ac_exec_ext in '' $ac_executable_extensions; do
12521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12522    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12524    break 2
12525  fi
12526done
12527  done
12528IFS=$as_save_IFS
12529
12530  ;;
12531esac
12532fi
12533WC=$ac_cv_path_WC
12534if test -n "$WC"; then
12535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12536$as_echo "$WC" >&6; }
12537else
12538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12539$as_echo "no" >&6; }
12540fi
12541
12542
12543  test -n "$WC" && break
12544done
12545
12546  else
12547    # The variable is set, but is it from the command line or the environment?
12548
12549    # Try to remove the string !WC! from our list.
12550    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12551    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12552      # If it failed, the variable was not from the command line. Ignore it,
12553      # but warn the user (except for BASH, which is always set by the calling BASH).
12554      if test "xWC" != xBASH; then
12555        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12556$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12557      fi
12558      # Try to locate tool using the code snippet
12559      for ac_prog in wc
12560do
12561  # Extract the first word of "$ac_prog", so it can be a program name with args.
12562set dummy $ac_prog; ac_word=$2
12563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12564$as_echo_n "checking for $ac_word... " >&6; }
12565if ${ac_cv_path_WC+:} false; then :
12566  $as_echo_n "(cached) " >&6
12567else
12568  case $WC in
12569  [\\/]* | ?:[\\/]*)
12570  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12571  ;;
12572  *)
12573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12574for as_dir in $PATH
12575do
12576  IFS=$as_save_IFS
12577  test -z "$as_dir" && as_dir=.
12578    for ac_exec_ext in '' $ac_executable_extensions; do
12579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12580    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12582    break 2
12583  fi
12584done
12585  done
12586IFS=$as_save_IFS
12587
12588  ;;
12589esac
12590fi
12591WC=$ac_cv_path_WC
12592if test -n "$WC"; then
12593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12594$as_echo "$WC" >&6; }
12595else
12596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12597$as_echo "no" >&6; }
12598fi
12599
12600
12601  test -n "$WC" && break
12602done
12603
12604    else
12605      # If it succeeded, then it was overridden by the user. We will use it
12606      # for the tool.
12607
12608      # First remove it from the list of overridden variables, so we can test
12609      # for unknown variables in the end.
12610      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12611
12612      # Check if we try to supply an empty value
12613      if test "x$WC" = x; then
12614        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12615$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12616        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12617$as_echo_n "checking for WC... " >&6; }
12618        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12619$as_echo "disabled" >&6; }
12620      else
12621        # Check if the provided tool contains a complete path.
12622        tool_specified="$WC"
12623        tool_basename="${tool_specified##*/}"
12624        if test "x$tool_basename" = "x$tool_specified"; then
12625          # A command without a complete path is provided, search $PATH.
12626          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12627$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12628          # Extract the first word of "$tool_basename", so it can be a program name with args.
12629set dummy $tool_basename; ac_word=$2
12630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12631$as_echo_n "checking for $ac_word... " >&6; }
12632if ${ac_cv_path_WC+:} false; then :
12633  $as_echo_n "(cached) " >&6
12634else
12635  case $WC in
12636  [\\/]* | ?:[\\/]*)
12637  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12638  ;;
12639  *)
12640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12641for as_dir in $PATH
12642do
12643  IFS=$as_save_IFS
12644  test -z "$as_dir" && as_dir=.
12645    for ac_exec_ext in '' $ac_executable_extensions; do
12646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12647    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12649    break 2
12650  fi
12651done
12652  done
12653IFS=$as_save_IFS
12654
12655  ;;
12656esac
12657fi
12658WC=$ac_cv_path_WC
12659if test -n "$WC"; then
12660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12661$as_echo "$WC" >&6; }
12662else
12663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12664$as_echo "no" >&6; }
12665fi
12666
12667
12668          if test "x$WC" = x; then
12669            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12670          fi
12671        else
12672          # Otherwise we believe it is a complete path. Use it as it is.
12673          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12674$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12675          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12676$as_echo_n "checking for WC... " >&6; }
12677          if test ! -x "$tool_specified"; then
12678            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12679$as_echo "not found" >&6; }
12680            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12681          fi
12682          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12683$as_echo "$tool_specified" >&6; }
12684        fi
12685      fi
12686    fi
12687
12688  fi
12689
12690
12691
12692  if test "x$WC" = x; then
12693    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12694  fi
12695
12696
12697
12698
12699
12700  # Publish this variable in the help.
12701
12702
12703  if [ -z "${WHICH+x}" ]; then
12704    # The variable is not set by user, try to locate tool using the code snippet
12705    for ac_prog in which
12706do
12707  # Extract the first word of "$ac_prog", so it can be a program name with args.
12708set dummy $ac_prog; ac_word=$2
12709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12710$as_echo_n "checking for $ac_word... " >&6; }
12711if ${ac_cv_path_WHICH+:} false; then :
12712  $as_echo_n "(cached) " >&6
12713else
12714  case $WHICH in
12715  [\\/]* | ?:[\\/]*)
12716  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12717  ;;
12718  *)
12719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12720for as_dir in $PATH
12721do
12722  IFS=$as_save_IFS
12723  test -z "$as_dir" && as_dir=.
12724    for ac_exec_ext in '' $ac_executable_extensions; do
12725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12726    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12728    break 2
12729  fi
12730done
12731  done
12732IFS=$as_save_IFS
12733
12734  ;;
12735esac
12736fi
12737WHICH=$ac_cv_path_WHICH
12738if test -n "$WHICH"; then
12739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12740$as_echo "$WHICH" >&6; }
12741else
12742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12743$as_echo "no" >&6; }
12744fi
12745
12746
12747  test -n "$WHICH" && break
12748done
12749
12750  else
12751    # The variable is set, but is it from the command line or the environment?
12752
12753    # Try to remove the string !WHICH! from our list.
12754    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12755    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12756      # If it failed, the variable was not from the command line. Ignore it,
12757      # but warn the user (except for BASH, which is always set by the calling BASH).
12758      if test "xWHICH" != xBASH; then
12759        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12760$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12761      fi
12762      # Try to locate tool using the code snippet
12763      for ac_prog in which
12764do
12765  # Extract the first word of "$ac_prog", so it can be a program name with args.
12766set dummy $ac_prog; ac_word=$2
12767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12768$as_echo_n "checking for $ac_word... " >&6; }
12769if ${ac_cv_path_WHICH+:} false; then :
12770  $as_echo_n "(cached) " >&6
12771else
12772  case $WHICH in
12773  [\\/]* | ?:[\\/]*)
12774  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12775  ;;
12776  *)
12777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12778for as_dir in $PATH
12779do
12780  IFS=$as_save_IFS
12781  test -z "$as_dir" && as_dir=.
12782    for ac_exec_ext in '' $ac_executable_extensions; do
12783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12784    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12786    break 2
12787  fi
12788done
12789  done
12790IFS=$as_save_IFS
12791
12792  ;;
12793esac
12794fi
12795WHICH=$ac_cv_path_WHICH
12796if test -n "$WHICH"; then
12797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12798$as_echo "$WHICH" >&6; }
12799else
12800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12801$as_echo "no" >&6; }
12802fi
12803
12804
12805  test -n "$WHICH" && break
12806done
12807
12808    else
12809      # If it succeeded, then it was overridden by the user. We will use it
12810      # for the tool.
12811
12812      # First remove it from the list of overridden variables, so we can test
12813      # for unknown variables in the end.
12814      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12815
12816      # Check if we try to supply an empty value
12817      if test "x$WHICH" = x; then
12818        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12819$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12820        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12821$as_echo_n "checking for WHICH... " >&6; }
12822        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12823$as_echo "disabled" >&6; }
12824      else
12825        # Check if the provided tool contains a complete path.
12826        tool_specified="$WHICH"
12827        tool_basename="${tool_specified##*/}"
12828        if test "x$tool_basename" = "x$tool_specified"; then
12829          # A command without a complete path is provided, search $PATH.
12830          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12831$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12832          # Extract the first word of "$tool_basename", so it can be a program name with args.
12833set dummy $tool_basename; ac_word=$2
12834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12835$as_echo_n "checking for $ac_word... " >&6; }
12836if ${ac_cv_path_WHICH+:} false; then :
12837  $as_echo_n "(cached) " >&6
12838else
12839  case $WHICH in
12840  [\\/]* | ?:[\\/]*)
12841  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12842  ;;
12843  *)
12844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12845for as_dir in $PATH
12846do
12847  IFS=$as_save_IFS
12848  test -z "$as_dir" && as_dir=.
12849    for ac_exec_ext in '' $ac_executable_extensions; do
12850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12851    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12853    break 2
12854  fi
12855done
12856  done
12857IFS=$as_save_IFS
12858
12859  ;;
12860esac
12861fi
12862WHICH=$ac_cv_path_WHICH
12863if test -n "$WHICH"; then
12864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12865$as_echo "$WHICH" >&6; }
12866else
12867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12868$as_echo "no" >&6; }
12869fi
12870
12871
12872          if test "x$WHICH" = x; then
12873            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12874          fi
12875        else
12876          # Otherwise we believe it is a complete path. Use it as it is.
12877          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12878$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12879          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12880$as_echo_n "checking for WHICH... " >&6; }
12881          if test ! -x "$tool_specified"; then
12882            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12883$as_echo "not found" >&6; }
12884            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12885          fi
12886          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12887$as_echo "$tool_specified" >&6; }
12888        fi
12889      fi
12890    fi
12891
12892  fi
12893
12894
12895
12896  if test "x$WHICH" = x; then
12897    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12898  fi
12899
12900
12901
12902
12903
12904  # Publish this variable in the help.
12905
12906
12907  if [ -z "${XARGS+x}" ]; then
12908    # The variable is not set by user, try to locate tool using the code snippet
12909    for ac_prog in xargs
12910do
12911  # Extract the first word of "$ac_prog", so it can be a program name with args.
12912set dummy $ac_prog; ac_word=$2
12913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12914$as_echo_n "checking for $ac_word... " >&6; }
12915if ${ac_cv_path_XARGS+:} false; then :
12916  $as_echo_n "(cached) " >&6
12917else
12918  case $XARGS in
12919  [\\/]* | ?:[\\/]*)
12920  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12921  ;;
12922  *)
12923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12924for as_dir in $PATH
12925do
12926  IFS=$as_save_IFS
12927  test -z "$as_dir" && as_dir=.
12928    for ac_exec_ext in '' $ac_executable_extensions; do
12929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12930    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12932    break 2
12933  fi
12934done
12935  done
12936IFS=$as_save_IFS
12937
12938  ;;
12939esac
12940fi
12941XARGS=$ac_cv_path_XARGS
12942if test -n "$XARGS"; then
12943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12944$as_echo "$XARGS" >&6; }
12945else
12946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12947$as_echo "no" >&6; }
12948fi
12949
12950
12951  test -n "$XARGS" && break
12952done
12953
12954  else
12955    # The variable is set, but is it from the command line or the environment?
12956
12957    # Try to remove the string !XARGS! from our list.
12958    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12959    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12960      # If it failed, the variable was not from the command line. Ignore it,
12961      # but warn the user (except for BASH, which is always set by the calling BASH).
12962      if test "xXARGS" != xBASH; then
12963        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12964$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12965      fi
12966      # Try to locate tool using the code snippet
12967      for ac_prog in xargs
12968do
12969  # Extract the first word of "$ac_prog", so it can be a program name with args.
12970set dummy $ac_prog; ac_word=$2
12971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12972$as_echo_n "checking for $ac_word... " >&6; }
12973if ${ac_cv_path_XARGS+:} false; then :
12974  $as_echo_n "(cached) " >&6
12975else
12976  case $XARGS in
12977  [\\/]* | ?:[\\/]*)
12978  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12979  ;;
12980  *)
12981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12982for as_dir in $PATH
12983do
12984  IFS=$as_save_IFS
12985  test -z "$as_dir" && as_dir=.
12986    for ac_exec_ext in '' $ac_executable_extensions; do
12987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12988    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12990    break 2
12991  fi
12992done
12993  done
12994IFS=$as_save_IFS
12995
12996  ;;
12997esac
12998fi
12999XARGS=$ac_cv_path_XARGS
13000if test -n "$XARGS"; then
13001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13002$as_echo "$XARGS" >&6; }
13003else
13004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13005$as_echo "no" >&6; }
13006fi
13007
13008
13009  test -n "$XARGS" && break
13010done
13011
13012    else
13013      # If it succeeded, then it was overridden by the user. We will use it
13014      # for the tool.
13015
13016      # First remove it from the list of overridden variables, so we can test
13017      # for unknown variables in the end.
13018      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13019
13020      # Check if we try to supply an empty value
13021      if test "x$XARGS" = x; then
13022        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13023$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13024        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13025$as_echo_n "checking for XARGS... " >&6; }
13026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13027$as_echo "disabled" >&6; }
13028      else
13029        # Check if the provided tool contains a complete path.
13030        tool_specified="$XARGS"
13031        tool_basename="${tool_specified##*/}"
13032        if test "x$tool_basename" = "x$tool_specified"; then
13033          # A command without a complete path is provided, search $PATH.
13034          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13035$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13036          # Extract the first word of "$tool_basename", so it can be a program name with args.
13037set dummy $tool_basename; ac_word=$2
13038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13039$as_echo_n "checking for $ac_word... " >&6; }
13040if ${ac_cv_path_XARGS+:} false; then :
13041  $as_echo_n "(cached) " >&6
13042else
13043  case $XARGS in
13044  [\\/]* | ?:[\\/]*)
13045  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13046  ;;
13047  *)
13048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13049for as_dir in $PATH
13050do
13051  IFS=$as_save_IFS
13052  test -z "$as_dir" && as_dir=.
13053    for ac_exec_ext in '' $ac_executable_extensions; do
13054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13055    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13057    break 2
13058  fi
13059done
13060  done
13061IFS=$as_save_IFS
13062
13063  ;;
13064esac
13065fi
13066XARGS=$ac_cv_path_XARGS
13067if test -n "$XARGS"; then
13068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13069$as_echo "$XARGS" >&6; }
13070else
13071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13072$as_echo "no" >&6; }
13073fi
13074
13075
13076          if test "x$XARGS" = x; then
13077            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13078          fi
13079        else
13080          # Otherwise we believe it is a complete path. Use it as it is.
13081          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13082$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13083          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13084$as_echo_n "checking for XARGS... " >&6; }
13085          if test ! -x "$tool_specified"; then
13086            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13087$as_echo "not found" >&6; }
13088            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13089          fi
13090          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13091$as_echo "$tool_specified" >&6; }
13092        fi
13093      fi
13094    fi
13095
13096  fi
13097
13098
13099
13100  if test "x$XARGS" = x; then
13101    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13102  fi
13103
13104
13105
13106  # Then required tools that require some special treatment.
13107
13108
13109  # Publish this variable in the help.
13110
13111
13112  if [ -z "${AWK+x}" ]; then
13113    # The variable is not set by user, try to locate tool using the code snippet
13114    for ac_prog in gawk mawk nawk awk
13115do
13116  # Extract the first word of "$ac_prog", so it can be a program name with args.
13117set dummy $ac_prog; ac_word=$2
13118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13119$as_echo_n "checking for $ac_word... " >&6; }
13120if ${ac_cv_prog_AWK+:} false; then :
13121  $as_echo_n "(cached) " >&6
13122else
13123  if test -n "$AWK"; then
13124  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13125else
13126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13127for as_dir in $PATH
13128do
13129  IFS=$as_save_IFS
13130  test -z "$as_dir" && as_dir=.
13131    for ac_exec_ext in '' $ac_executable_extensions; do
13132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13133    ac_cv_prog_AWK="$ac_prog"
13134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13135    break 2
13136  fi
13137done
13138  done
13139IFS=$as_save_IFS
13140
13141fi
13142fi
13143AWK=$ac_cv_prog_AWK
13144if test -n "$AWK"; then
13145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13146$as_echo "$AWK" >&6; }
13147else
13148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13149$as_echo "no" >&6; }
13150fi
13151
13152
13153  test -n "$AWK" && break
13154done
13155
13156  else
13157    # The variable is set, but is it from the command line or the environment?
13158
13159    # Try to remove the string !AWK! from our list.
13160    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13161    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13162      # If it failed, the variable was not from the command line. Ignore it,
13163      # but warn the user (except for BASH, which is always set by the calling BASH).
13164      if test "xAWK" != xBASH; then
13165        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13166$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13167      fi
13168      # Try to locate tool using the code snippet
13169      for ac_prog in gawk mawk nawk awk
13170do
13171  # Extract the first word of "$ac_prog", so it can be a program name with args.
13172set dummy $ac_prog; ac_word=$2
13173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13174$as_echo_n "checking for $ac_word... " >&6; }
13175if ${ac_cv_prog_AWK+:} false; then :
13176  $as_echo_n "(cached) " >&6
13177else
13178  if test -n "$AWK"; then
13179  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13180else
13181as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13182for as_dir in $PATH
13183do
13184  IFS=$as_save_IFS
13185  test -z "$as_dir" && as_dir=.
13186    for ac_exec_ext in '' $ac_executable_extensions; do
13187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13188    ac_cv_prog_AWK="$ac_prog"
13189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13190    break 2
13191  fi
13192done
13193  done
13194IFS=$as_save_IFS
13195
13196fi
13197fi
13198AWK=$ac_cv_prog_AWK
13199if test -n "$AWK"; then
13200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13201$as_echo "$AWK" >&6; }
13202else
13203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13204$as_echo "no" >&6; }
13205fi
13206
13207
13208  test -n "$AWK" && break
13209done
13210
13211    else
13212      # If it succeeded, then it was overridden by the user. We will use it
13213      # for the tool.
13214
13215      # First remove it from the list of overridden variables, so we can test
13216      # for unknown variables in the end.
13217      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13218
13219      # Check if we try to supply an empty value
13220      if test "x$AWK" = x; then
13221        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13222$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13223        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13224$as_echo_n "checking for AWK... " >&6; }
13225        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13226$as_echo "disabled" >&6; }
13227      else
13228        # Check if the provided tool contains a complete path.
13229        tool_specified="$AWK"
13230        tool_basename="${tool_specified##*/}"
13231        if test "x$tool_basename" = "x$tool_specified"; then
13232          # A command without a complete path is provided, search $PATH.
13233          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13234$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13235          # Extract the first word of "$tool_basename", so it can be a program name with args.
13236set dummy $tool_basename; ac_word=$2
13237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13238$as_echo_n "checking for $ac_word... " >&6; }
13239if ${ac_cv_path_AWK+:} false; then :
13240  $as_echo_n "(cached) " >&6
13241else
13242  case $AWK in
13243  [\\/]* | ?:[\\/]*)
13244  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13245  ;;
13246  *)
13247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13248for as_dir in $PATH
13249do
13250  IFS=$as_save_IFS
13251  test -z "$as_dir" && as_dir=.
13252    for ac_exec_ext in '' $ac_executable_extensions; do
13253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13254    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13256    break 2
13257  fi
13258done
13259  done
13260IFS=$as_save_IFS
13261
13262  ;;
13263esac
13264fi
13265AWK=$ac_cv_path_AWK
13266if test -n "$AWK"; then
13267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13268$as_echo "$AWK" >&6; }
13269else
13270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13271$as_echo "no" >&6; }
13272fi
13273
13274
13275          if test "x$AWK" = x; then
13276            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13277          fi
13278        else
13279          # Otherwise we believe it is a complete path. Use it as it is.
13280          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13281$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13282          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13283$as_echo_n "checking for AWK... " >&6; }
13284          if test ! -x "$tool_specified"; then
13285            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13286$as_echo "not found" >&6; }
13287            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13288          fi
13289          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13290$as_echo "$tool_specified" >&6; }
13291        fi
13292      fi
13293    fi
13294
13295  fi
13296
13297
13298  if test "x$AWK" = x; then
13299    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13300  fi
13301
13302
13303
13304
13305  # Publish this variable in the help.
13306
13307
13308  if [ -z "${GREP+x}" ]; then
13309    # The variable is not set by user, try to locate tool using the code snippet
13310    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13311$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13312if ${ac_cv_path_GREP+:} false; then :
13313  $as_echo_n "(cached) " >&6
13314else
13315  if test -z "$GREP"; then
13316  ac_path_GREP_found=false
13317  # Loop through the user's path and test for each of PROGNAME-LIST
13318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13319for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13320do
13321  IFS=$as_save_IFS
13322  test -z "$as_dir" && as_dir=.
13323    for ac_prog in grep ggrep; do
13324    for ac_exec_ext in '' $ac_executable_extensions; do
13325      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13326      as_fn_executable_p "$ac_path_GREP" || continue
13327# Check for GNU ac_path_GREP and select it if it is found.
13328  # Check for GNU $ac_path_GREP
13329case `"$ac_path_GREP" --version 2>&1` in
13330*GNU*)
13331  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13332*)
13333  ac_count=0
13334  $as_echo_n 0123456789 >"conftest.in"
13335  while :
13336  do
13337    cat "conftest.in" "conftest.in" >"conftest.tmp"
13338    mv "conftest.tmp" "conftest.in"
13339    cp "conftest.in" "conftest.nl"
13340    $as_echo 'GREP' >> "conftest.nl"
13341    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13342    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13343    as_fn_arith $ac_count + 1 && ac_count=$as_val
13344    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13345      # Best one so far, save it but keep looking for a better one
13346      ac_cv_path_GREP="$ac_path_GREP"
13347      ac_path_GREP_max=$ac_count
13348    fi
13349    # 10*(2^10) chars as input seems more than enough
13350    test $ac_count -gt 10 && break
13351  done
13352  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13353esac
13354
13355      $ac_path_GREP_found && break 3
13356    done
13357  done
13358  done
13359IFS=$as_save_IFS
13360  if test -z "$ac_cv_path_GREP"; then
13361    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13362  fi
13363else
13364  ac_cv_path_GREP=$GREP
13365fi
13366
13367fi
13368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13369$as_echo "$ac_cv_path_GREP" >&6; }
13370 GREP="$ac_cv_path_GREP"
13371
13372
13373  else
13374    # The variable is set, but is it from the command line or the environment?
13375
13376    # Try to remove the string !GREP! from our list.
13377    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13378    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13379      # If it failed, the variable was not from the command line. Ignore it,
13380      # but warn the user (except for BASH, which is always set by the calling BASH).
13381      if test "xGREP" != xBASH; then
13382        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13383$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13384      fi
13385      # Try to locate tool using the code snippet
13386      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13387$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13388if ${ac_cv_path_GREP+:} false; then :
13389  $as_echo_n "(cached) " >&6
13390else
13391  if test -z "$GREP"; then
13392  ac_path_GREP_found=false
13393  # Loop through the user's path and test for each of PROGNAME-LIST
13394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13395for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13396do
13397  IFS=$as_save_IFS
13398  test -z "$as_dir" && as_dir=.
13399    for ac_prog in grep ggrep; do
13400    for ac_exec_ext in '' $ac_executable_extensions; do
13401      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13402      as_fn_executable_p "$ac_path_GREP" || continue
13403# Check for GNU ac_path_GREP and select it if it is found.
13404  # Check for GNU $ac_path_GREP
13405case `"$ac_path_GREP" --version 2>&1` in
13406*GNU*)
13407  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13408*)
13409  ac_count=0
13410  $as_echo_n 0123456789 >"conftest.in"
13411  while :
13412  do
13413    cat "conftest.in" "conftest.in" >"conftest.tmp"
13414    mv "conftest.tmp" "conftest.in"
13415    cp "conftest.in" "conftest.nl"
13416    $as_echo 'GREP' >> "conftest.nl"
13417    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13418    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13419    as_fn_arith $ac_count + 1 && ac_count=$as_val
13420    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13421      # Best one so far, save it but keep looking for a better one
13422      ac_cv_path_GREP="$ac_path_GREP"
13423      ac_path_GREP_max=$ac_count
13424    fi
13425    # 10*(2^10) chars as input seems more than enough
13426    test $ac_count -gt 10 && break
13427  done
13428  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13429esac
13430
13431      $ac_path_GREP_found && break 3
13432    done
13433  done
13434  done
13435IFS=$as_save_IFS
13436  if test -z "$ac_cv_path_GREP"; then
13437    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13438  fi
13439else
13440  ac_cv_path_GREP=$GREP
13441fi
13442
13443fi
13444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13445$as_echo "$ac_cv_path_GREP" >&6; }
13446 GREP="$ac_cv_path_GREP"
13447
13448
13449    else
13450      # If it succeeded, then it was overridden by the user. We will use it
13451      # for the tool.
13452
13453      # First remove it from the list of overridden variables, so we can test
13454      # for unknown variables in the end.
13455      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13456
13457      # Check if we try to supply an empty value
13458      if test "x$GREP" = x; then
13459        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13460$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13461        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13462$as_echo_n "checking for GREP... " >&6; }
13463        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13464$as_echo "disabled" >&6; }
13465      else
13466        # Check if the provided tool contains a complete path.
13467        tool_specified="$GREP"
13468        tool_basename="${tool_specified##*/}"
13469        if test "x$tool_basename" = "x$tool_specified"; then
13470          # A command without a complete path is provided, search $PATH.
13471          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13472$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13473          # Extract the first word of "$tool_basename", so it can be a program name with args.
13474set dummy $tool_basename; ac_word=$2
13475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13476$as_echo_n "checking for $ac_word... " >&6; }
13477if ${ac_cv_path_GREP+:} false; then :
13478  $as_echo_n "(cached) " >&6
13479else
13480  case $GREP in
13481  [\\/]* | ?:[\\/]*)
13482  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13483  ;;
13484  *)
13485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13486for as_dir in $PATH
13487do
13488  IFS=$as_save_IFS
13489  test -z "$as_dir" && as_dir=.
13490    for ac_exec_ext in '' $ac_executable_extensions; do
13491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13492    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13494    break 2
13495  fi
13496done
13497  done
13498IFS=$as_save_IFS
13499
13500  ;;
13501esac
13502fi
13503GREP=$ac_cv_path_GREP
13504if test -n "$GREP"; then
13505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13506$as_echo "$GREP" >&6; }
13507else
13508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13509$as_echo "no" >&6; }
13510fi
13511
13512
13513          if test "x$GREP" = x; then
13514            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13515          fi
13516        else
13517          # Otherwise we believe it is a complete path. Use it as it is.
13518          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13519$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13520          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13521$as_echo_n "checking for GREP... " >&6; }
13522          if test ! -x "$tool_specified"; then
13523            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13524$as_echo "not found" >&6; }
13525            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13526          fi
13527          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13528$as_echo "$tool_specified" >&6; }
13529        fi
13530      fi
13531    fi
13532
13533  fi
13534
13535
13536  if test "x$GREP" = x; then
13537    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13538  fi
13539
13540
13541
13542
13543  # Publish this variable in the help.
13544
13545
13546  if [ -z "${EGREP+x}" ]; then
13547    # The variable is not set by user, try to locate tool using the code snippet
13548    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13549$as_echo_n "checking for egrep... " >&6; }
13550if ${ac_cv_path_EGREP+:} false; then :
13551  $as_echo_n "(cached) " >&6
13552else
13553  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13554   then ac_cv_path_EGREP="$GREP -E"
13555   else
13556     if test -z "$EGREP"; then
13557  ac_path_EGREP_found=false
13558  # Loop through the user's path and test for each of PROGNAME-LIST
13559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13560for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13561do
13562  IFS=$as_save_IFS
13563  test -z "$as_dir" && as_dir=.
13564    for ac_prog in egrep; do
13565    for ac_exec_ext in '' $ac_executable_extensions; do
13566      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13567      as_fn_executable_p "$ac_path_EGREP" || continue
13568# Check for GNU ac_path_EGREP and select it if it is found.
13569  # Check for GNU $ac_path_EGREP
13570case `"$ac_path_EGREP" --version 2>&1` in
13571*GNU*)
13572  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13573*)
13574  ac_count=0
13575  $as_echo_n 0123456789 >"conftest.in"
13576  while :
13577  do
13578    cat "conftest.in" "conftest.in" >"conftest.tmp"
13579    mv "conftest.tmp" "conftest.in"
13580    cp "conftest.in" "conftest.nl"
13581    $as_echo 'EGREP' >> "conftest.nl"
13582    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13583    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13584    as_fn_arith $ac_count + 1 && ac_count=$as_val
13585    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13586      # Best one so far, save it but keep looking for a better one
13587      ac_cv_path_EGREP="$ac_path_EGREP"
13588      ac_path_EGREP_max=$ac_count
13589    fi
13590    # 10*(2^10) chars as input seems more than enough
13591    test $ac_count -gt 10 && break
13592  done
13593  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13594esac
13595
13596      $ac_path_EGREP_found && break 3
13597    done
13598  done
13599  done
13600IFS=$as_save_IFS
13601  if test -z "$ac_cv_path_EGREP"; then
13602    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13603  fi
13604else
13605  ac_cv_path_EGREP=$EGREP
13606fi
13607
13608   fi
13609fi
13610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13611$as_echo "$ac_cv_path_EGREP" >&6; }
13612 EGREP="$ac_cv_path_EGREP"
13613
13614
13615  else
13616    # The variable is set, but is it from the command line or the environment?
13617
13618    # Try to remove the string !EGREP! from our list.
13619    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13620    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13621      # If it failed, the variable was not from the command line. Ignore it,
13622      # but warn the user (except for BASH, which is always set by the calling BASH).
13623      if test "xEGREP" != xBASH; then
13624        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13625$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13626      fi
13627      # Try to locate tool using the code snippet
13628      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13629$as_echo_n "checking for egrep... " >&6; }
13630if ${ac_cv_path_EGREP+:} false; then :
13631  $as_echo_n "(cached) " >&6
13632else
13633  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13634   then ac_cv_path_EGREP="$GREP -E"
13635   else
13636     if test -z "$EGREP"; then
13637  ac_path_EGREP_found=false
13638  # Loop through the user's path and test for each of PROGNAME-LIST
13639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13640for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13641do
13642  IFS=$as_save_IFS
13643  test -z "$as_dir" && as_dir=.
13644    for ac_prog in egrep; do
13645    for ac_exec_ext in '' $ac_executable_extensions; do
13646      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13647      as_fn_executable_p "$ac_path_EGREP" || continue
13648# Check for GNU ac_path_EGREP and select it if it is found.
13649  # Check for GNU $ac_path_EGREP
13650case `"$ac_path_EGREP" --version 2>&1` in
13651*GNU*)
13652  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13653*)
13654  ac_count=0
13655  $as_echo_n 0123456789 >"conftest.in"
13656  while :
13657  do
13658    cat "conftest.in" "conftest.in" >"conftest.tmp"
13659    mv "conftest.tmp" "conftest.in"
13660    cp "conftest.in" "conftest.nl"
13661    $as_echo 'EGREP' >> "conftest.nl"
13662    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13663    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13664    as_fn_arith $ac_count + 1 && ac_count=$as_val
13665    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13666      # Best one so far, save it but keep looking for a better one
13667      ac_cv_path_EGREP="$ac_path_EGREP"
13668      ac_path_EGREP_max=$ac_count
13669    fi
13670    # 10*(2^10) chars as input seems more than enough
13671    test $ac_count -gt 10 && break
13672  done
13673  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13674esac
13675
13676      $ac_path_EGREP_found && break 3
13677    done
13678  done
13679  done
13680IFS=$as_save_IFS
13681  if test -z "$ac_cv_path_EGREP"; then
13682    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13683  fi
13684else
13685  ac_cv_path_EGREP=$EGREP
13686fi
13687
13688   fi
13689fi
13690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13691$as_echo "$ac_cv_path_EGREP" >&6; }
13692 EGREP="$ac_cv_path_EGREP"
13693
13694
13695    else
13696      # If it succeeded, then it was overridden by the user. We will use it
13697      # for the tool.
13698
13699      # First remove it from the list of overridden variables, so we can test
13700      # for unknown variables in the end.
13701      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13702
13703      # Check if we try to supply an empty value
13704      if test "x$EGREP" = x; then
13705        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13706$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13707        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13708$as_echo_n "checking for EGREP... " >&6; }
13709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13710$as_echo "disabled" >&6; }
13711      else
13712        # Check if the provided tool contains a complete path.
13713        tool_specified="$EGREP"
13714        tool_basename="${tool_specified##*/}"
13715        if test "x$tool_basename" = "x$tool_specified"; then
13716          # A command without a complete path is provided, search $PATH.
13717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13718$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13719          # Extract the first word of "$tool_basename", so it can be a program name with args.
13720set dummy $tool_basename; ac_word=$2
13721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13722$as_echo_n "checking for $ac_word... " >&6; }
13723if ${ac_cv_path_EGREP+:} false; then :
13724  $as_echo_n "(cached) " >&6
13725else
13726  case $EGREP in
13727  [\\/]* | ?:[\\/]*)
13728  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13729  ;;
13730  *)
13731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13732for as_dir in $PATH
13733do
13734  IFS=$as_save_IFS
13735  test -z "$as_dir" && as_dir=.
13736    for ac_exec_ext in '' $ac_executable_extensions; do
13737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13738    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13740    break 2
13741  fi
13742done
13743  done
13744IFS=$as_save_IFS
13745
13746  ;;
13747esac
13748fi
13749EGREP=$ac_cv_path_EGREP
13750if test -n "$EGREP"; then
13751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13752$as_echo "$EGREP" >&6; }
13753else
13754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13755$as_echo "no" >&6; }
13756fi
13757
13758
13759          if test "x$EGREP" = x; then
13760            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13761          fi
13762        else
13763          # Otherwise we believe it is a complete path. Use it as it is.
13764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13765$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13766          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13767$as_echo_n "checking for EGREP... " >&6; }
13768          if test ! -x "$tool_specified"; then
13769            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13770$as_echo "not found" >&6; }
13771            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13772          fi
13773          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13774$as_echo "$tool_specified" >&6; }
13775        fi
13776      fi
13777    fi
13778
13779  fi
13780
13781
13782  if test "x$EGREP" = x; then
13783    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13784  fi
13785
13786
13787
13788
13789  # Publish this variable in the help.
13790
13791
13792  if [ -z "${FGREP+x}" ]; then
13793    # The variable is not set by user, try to locate tool using the code snippet
13794    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13795$as_echo_n "checking for fgrep... " >&6; }
13796if ${ac_cv_path_FGREP+:} false; then :
13797  $as_echo_n "(cached) " >&6
13798else
13799  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13800   then ac_cv_path_FGREP="$GREP -F"
13801   else
13802     if test -z "$FGREP"; then
13803  ac_path_FGREP_found=false
13804  # Loop through the user's path and test for each of PROGNAME-LIST
13805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13806for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13807do
13808  IFS=$as_save_IFS
13809  test -z "$as_dir" && as_dir=.
13810    for ac_prog in fgrep; do
13811    for ac_exec_ext in '' $ac_executable_extensions; do
13812      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13813      as_fn_executable_p "$ac_path_FGREP" || continue
13814# Check for GNU ac_path_FGREP and select it if it is found.
13815  # Check for GNU $ac_path_FGREP
13816case `"$ac_path_FGREP" --version 2>&1` in
13817*GNU*)
13818  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13819*)
13820  ac_count=0
13821  $as_echo_n 0123456789 >"conftest.in"
13822  while :
13823  do
13824    cat "conftest.in" "conftest.in" >"conftest.tmp"
13825    mv "conftest.tmp" "conftest.in"
13826    cp "conftest.in" "conftest.nl"
13827    $as_echo 'FGREP' >> "conftest.nl"
13828    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13829    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13830    as_fn_arith $ac_count + 1 && ac_count=$as_val
13831    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13832      # Best one so far, save it but keep looking for a better one
13833      ac_cv_path_FGREP="$ac_path_FGREP"
13834      ac_path_FGREP_max=$ac_count
13835    fi
13836    # 10*(2^10) chars as input seems more than enough
13837    test $ac_count -gt 10 && break
13838  done
13839  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13840esac
13841
13842      $ac_path_FGREP_found && break 3
13843    done
13844  done
13845  done
13846IFS=$as_save_IFS
13847  if test -z "$ac_cv_path_FGREP"; then
13848    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13849  fi
13850else
13851  ac_cv_path_FGREP=$FGREP
13852fi
13853
13854   fi
13855fi
13856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13857$as_echo "$ac_cv_path_FGREP" >&6; }
13858 FGREP="$ac_cv_path_FGREP"
13859
13860
13861  else
13862    # The variable is set, but is it from the command line or the environment?
13863
13864    # Try to remove the string !FGREP! from our list.
13865    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13866    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13867      # If it failed, the variable was not from the command line. Ignore it,
13868      # but warn the user (except for BASH, which is always set by the calling BASH).
13869      if test "xFGREP" != xBASH; then
13870        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13871$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13872      fi
13873      # Try to locate tool using the code snippet
13874      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13875$as_echo_n "checking for fgrep... " >&6; }
13876if ${ac_cv_path_FGREP+:} false; then :
13877  $as_echo_n "(cached) " >&6
13878else
13879  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13880   then ac_cv_path_FGREP="$GREP -F"
13881   else
13882     if test -z "$FGREP"; then
13883  ac_path_FGREP_found=false
13884  # Loop through the user's path and test for each of PROGNAME-LIST
13885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13886for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13887do
13888  IFS=$as_save_IFS
13889  test -z "$as_dir" && as_dir=.
13890    for ac_prog in fgrep; do
13891    for ac_exec_ext in '' $ac_executable_extensions; do
13892      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13893      as_fn_executable_p "$ac_path_FGREP" || continue
13894# Check for GNU ac_path_FGREP and select it if it is found.
13895  # Check for GNU $ac_path_FGREP
13896case `"$ac_path_FGREP" --version 2>&1` in
13897*GNU*)
13898  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13899*)
13900  ac_count=0
13901  $as_echo_n 0123456789 >"conftest.in"
13902  while :
13903  do
13904    cat "conftest.in" "conftest.in" >"conftest.tmp"
13905    mv "conftest.tmp" "conftest.in"
13906    cp "conftest.in" "conftest.nl"
13907    $as_echo 'FGREP' >> "conftest.nl"
13908    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13909    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13910    as_fn_arith $ac_count + 1 && ac_count=$as_val
13911    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13912      # Best one so far, save it but keep looking for a better one
13913      ac_cv_path_FGREP="$ac_path_FGREP"
13914      ac_path_FGREP_max=$ac_count
13915    fi
13916    # 10*(2^10) chars as input seems more than enough
13917    test $ac_count -gt 10 && break
13918  done
13919  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13920esac
13921
13922      $ac_path_FGREP_found && break 3
13923    done
13924  done
13925  done
13926IFS=$as_save_IFS
13927  if test -z "$ac_cv_path_FGREP"; then
13928    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13929  fi
13930else
13931  ac_cv_path_FGREP=$FGREP
13932fi
13933
13934   fi
13935fi
13936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13937$as_echo "$ac_cv_path_FGREP" >&6; }
13938 FGREP="$ac_cv_path_FGREP"
13939
13940
13941    else
13942      # If it succeeded, then it was overridden by the user. We will use it
13943      # for the tool.
13944
13945      # First remove it from the list of overridden variables, so we can test
13946      # for unknown variables in the end.
13947      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13948
13949      # Check if we try to supply an empty value
13950      if test "x$FGREP" = x; then
13951        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13952$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13953        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13954$as_echo_n "checking for FGREP... " >&6; }
13955        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13956$as_echo "disabled" >&6; }
13957      else
13958        # Check if the provided tool contains a complete path.
13959        tool_specified="$FGREP"
13960        tool_basename="${tool_specified##*/}"
13961        if test "x$tool_basename" = "x$tool_specified"; then
13962          # A command without a complete path is provided, search $PATH.
13963          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13964$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13965          # Extract the first word of "$tool_basename", so it can be a program name with args.
13966set dummy $tool_basename; ac_word=$2
13967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13968$as_echo_n "checking for $ac_word... " >&6; }
13969if ${ac_cv_path_FGREP+:} false; then :
13970  $as_echo_n "(cached) " >&6
13971else
13972  case $FGREP in
13973  [\\/]* | ?:[\\/]*)
13974  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13975  ;;
13976  *)
13977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13978for as_dir in $PATH
13979do
13980  IFS=$as_save_IFS
13981  test -z "$as_dir" && as_dir=.
13982    for ac_exec_ext in '' $ac_executable_extensions; do
13983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13984    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13986    break 2
13987  fi
13988done
13989  done
13990IFS=$as_save_IFS
13991
13992  ;;
13993esac
13994fi
13995FGREP=$ac_cv_path_FGREP
13996if test -n "$FGREP"; then
13997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13998$as_echo "$FGREP" >&6; }
13999else
14000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14001$as_echo "no" >&6; }
14002fi
14003
14004
14005          if test "x$FGREP" = x; then
14006            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14007          fi
14008        else
14009          # Otherwise we believe it is a complete path. Use it as it is.
14010          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14011$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14012          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14013$as_echo_n "checking for FGREP... " >&6; }
14014          if test ! -x "$tool_specified"; then
14015            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14016$as_echo "not found" >&6; }
14017            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14018          fi
14019          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14020$as_echo "$tool_specified" >&6; }
14021        fi
14022      fi
14023    fi
14024
14025  fi
14026
14027
14028  if test "x$FGREP" = x; then
14029    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14030  fi
14031
14032
14033
14034
14035  # Publish this variable in the help.
14036
14037
14038  if [ -z "${SED+x}" ]; then
14039    # The variable is not set by user, try to locate tool using the code snippet
14040    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14041$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14042if ${ac_cv_path_SED+:} false; then :
14043  $as_echo_n "(cached) " >&6
14044else
14045            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14046     for ac_i in 1 2 3 4 5 6 7; do
14047       ac_script="$ac_script$as_nl$ac_script"
14048     done
14049     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14050     { ac_script=; unset ac_script;}
14051     if test -z "$SED"; then
14052  ac_path_SED_found=false
14053  # Loop through the user's path and test for each of PROGNAME-LIST
14054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14055for as_dir in $PATH
14056do
14057  IFS=$as_save_IFS
14058  test -z "$as_dir" && as_dir=.
14059    for ac_prog in sed gsed; do
14060    for ac_exec_ext in '' $ac_executable_extensions; do
14061      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14062      as_fn_executable_p "$ac_path_SED" || continue
14063# Check for GNU ac_path_SED and select it if it is found.
14064  # Check for GNU $ac_path_SED
14065case `"$ac_path_SED" --version 2>&1` in
14066*GNU*)
14067  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14068*)
14069  ac_count=0
14070  $as_echo_n 0123456789 >"conftest.in"
14071  while :
14072  do
14073    cat "conftest.in" "conftest.in" >"conftest.tmp"
14074    mv "conftest.tmp" "conftest.in"
14075    cp "conftest.in" "conftest.nl"
14076    $as_echo '' >> "conftest.nl"
14077    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14078    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14079    as_fn_arith $ac_count + 1 && ac_count=$as_val
14080    if test $ac_count -gt ${ac_path_SED_max-0}; then
14081      # Best one so far, save it but keep looking for a better one
14082      ac_cv_path_SED="$ac_path_SED"
14083      ac_path_SED_max=$ac_count
14084    fi
14085    # 10*(2^10) chars as input seems more than enough
14086    test $ac_count -gt 10 && break
14087  done
14088  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14089esac
14090
14091      $ac_path_SED_found && break 3
14092    done
14093  done
14094  done
14095IFS=$as_save_IFS
14096  if test -z "$ac_cv_path_SED"; then
14097    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14098  fi
14099else
14100  ac_cv_path_SED=$SED
14101fi
14102
14103fi
14104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14105$as_echo "$ac_cv_path_SED" >&6; }
14106 SED="$ac_cv_path_SED"
14107  rm -f conftest.sed
14108
14109  else
14110    # The variable is set, but is it from the command line or the environment?
14111
14112    # Try to remove the string !SED! from our list.
14113    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14114    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14115      # If it failed, the variable was not from the command line. Ignore it,
14116      # but warn the user (except for BASH, which is always set by the calling BASH).
14117      if test "xSED" != xBASH; then
14118        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14119$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14120      fi
14121      # Try to locate tool using the code snippet
14122      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14123$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14124if ${ac_cv_path_SED+:} false; then :
14125  $as_echo_n "(cached) " >&6
14126else
14127            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14128     for ac_i in 1 2 3 4 5 6 7; do
14129       ac_script="$ac_script$as_nl$ac_script"
14130     done
14131     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14132     { ac_script=; unset ac_script;}
14133     if test -z "$SED"; then
14134  ac_path_SED_found=false
14135  # Loop through the user's path and test for each of PROGNAME-LIST
14136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14137for as_dir in $PATH
14138do
14139  IFS=$as_save_IFS
14140  test -z "$as_dir" && as_dir=.
14141    for ac_prog in sed gsed; do
14142    for ac_exec_ext in '' $ac_executable_extensions; do
14143      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14144      as_fn_executable_p "$ac_path_SED" || continue
14145# Check for GNU ac_path_SED and select it if it is found.
14146  # Check for GNU $ac_path_SED
14147case `"$ac_path_SED" --version 2>&1` in
14148*GNU*)
14149  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14150*)
14151  ac_count=0
14152  $as_echo_n 0123456789 >"conftest.in"
14153  while :
14154  do
14155    cat "conftest.in" "conftest.in" >"conftest.tmp"
14156    mv "conftest.tmp" "conftest.in"
14157    cp "conftest.in" "conftest.nl"
14158    $as_echo '' >> "conftest.nl"
14159    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14160    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14161    as_fn_arith $ac_count + 1 && ac_count=$as_val
14162    if test $ac_count -gt ${ac_path_SED_max-0}; then
14163      # Best one so far, save it but keep looking for a better one
14164      ac_cv_path_SED="$ac_path_SED"
14165      ac_path_SED_max=$ac_count
14166    fi
14167    # 10*(2^10) chars as input seems more than enough
14168    test $ac_count -gt 10 && break
14169  done
14170  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14171esac
14172
14173      $ac_path_SED_found && break 3
14174    done
14175  done
14176  done
14177IFS=$as_save_IFS
14178  if test -z "$ac_cv_path_SED"; then
14179    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14180  fi
14181else
14182  ac_cv_path_SED=$SED
14183fi
14184
14185fi
14186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14187$as_echo "$ac_cv_path_SED" >&6; }
14188 SED="$ac_cv_path_SED"
14189  rm -f conftest.sed
14190
14191    else
14192      # If it succeeded, then it was overridden by the user. We will use it
14193      # for the tool.
14194
14195      # First remove it from the list of overridden variables, so we can test
14196      # for unknown variables in the end.
14197      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14198
14199      # Check if we try to supply an empty value
14200      if test "x$SED" = x; then
14201        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14202$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14203        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14204$as_echo_n "checking for SED... " >&6; }
14205        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14206$as_echo "disabled" >&6; }
14207      else
14208        # Check if the provided tool contains a complete path.
14209        tool_specified="$SED"
14210        tool_basename="${tool_specified##*/}"
14211        if test "x$tool_basename" = "x$tool_specified"; then
14212          # A command without a complete path is provided, search $PATH.
14213          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14214$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14215          # Extract the first word of "$tool_basename", so it can be a program name with args.
14216set dummy $tool_basename; ac_word=$2
14217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14218$as_echo_n "checking for $ac_word... " >&6; }
14219if ${ac_cv_path_SED+:} false; then :
14220  $as_echo_n "(cached) " >&6
14221else
14222  case $SED in
14223  [\\/]* | ?:[\\/]*)
14224  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14225  ;;
14226  *)
14227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14228for as_dir in $PATH
14229do
14230  IFS=$as_save_IFS
14231  test -z "$as_dir" && as_dir=.
14232    for ac_exec_ext in '' $ac_executable_extensions; do
14233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14234    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14236    break 2
14237  fi
14238done
14239  done
14240IFS=$as_save_IFS
14241
14242  ;;
14243esac
14244fi
14245SED=$ac_cv_path_SED
14246if test -n "$SED"; then
14247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14248$as_echo "$SED" >&6; }
14249else
14250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14251$as_echo "no" >&6; }
14252fi
14253
14254
14255          if test "x$SED" = x; then
14256            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14257          fi
14258        else
14259          # Otherwise we believe it is a complete path. Use it as it is.
14260          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14261$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14262          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14263$as_echo_n "checking for SED... " >&6; }
14264          if test ! -x "$tool_specified"; then
14265            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14266$as_echo "not found" >&6; }
14267            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14268          fi
14269          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14270$as_echo "$tool_specified" >&6; }
14271        fi
14272      fi
14273    fi
14274
14275  fi
14276
14277
14278  if test "x$SED" = x; then
14279    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14280  fi
14281
14282
14283
14284  # Always force rm.
14285  RM="$RM -f"
14286
14287  # pwd behaves differently on various platforms and some don't support the -L flag.
14288  # Always use the bash builtin pwd to get uniform behavior.
14289  THEPWDCMD=pwd
14290
14291  # These are not required on all platforms
14292
14293
14294  # Publish this variable in the help.
14295
14296
14297  if [ -z "${CYGPATH+x}" ]; then
14298    # The variable is not set by user, try to locate tool using the code snippet
14299    for ac_prog in cygpath
14300do
14301  # Extract the first word of "$ac_prog", so it can be a program name with args.
14302set dummy $ac_prog; ac_word=$2
14303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14304$as_echo_n "checking for $ac_word... " >&6; }
14305if ${ac_cv_path_CYGPATH+:} false; then :
14306  $as_echo_n "(cached) " >&6
14307else
14308  case $CYGPATH in
14309  [\\/]* | ?:[\\/]*)
14310  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14311  ;;
14312  *)
14313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14314for as_dir in $PATH
14315do
14316  IFS=$as_save_IFS
14317  test -z "$as_dir" && as_dir=.
14318    for ac_exec_ext in '' $ac_executable_extensions; do
14319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14320    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14322    break 2
14323  fi
14324done
14325  done
14326IFS=$as_save_IFS
14327
14328  ;;
14329esac
14330fi
14331CYGPATH=$ac_cv_path_CYGPATH
14332if test -n "$CYGPATH"; then
14333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14334$as_echo "$CYGPATH" >&6; }
14335else
14336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14337$as_echo "no" >&6; }
14338fi
14339
14340
14341  test -n "$CYGPATH" && break
14342done
14343
14344  else
14345    # The variable is set, but is it from the command line or the environment?
14346
14347    # Try to remove the string !CYGPATH! from our list.
14348    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14349    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14350      # If it failed, the variable was not from the command line. Ignore it,
14351      # but warn the user (except for BASH, which is always set by the calling BASH).
14352      if test "xCYGPATH" != xBASH; then
14353        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14354$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14355      fi
14356      # Try to locate tool using the code snippet
14357      for ac_prog in cygpath
14358do
14359  # Extract the first word of "$ac_prog", so it can be a program name with args.
14360set dummy $ac_prog; ac_word=$2
14361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14362$as_echo_n "checking for $ac_word... " >&6; }
14363if ${ac_cv_path_CYGPATH+:} false; then :
14364  $as_echo_n "(cached) " >&6
14365else
14366  case $CYGPATH in
14367  [\\/]* | ?:[\\/]*)
14368  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14369  ;;
14370  *)
14371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14372for as_dir in $PATH
14373do
14374  IFS=$as_save_IFS
14375  test -z "$as_dir" && as_dir=.
14376    for ac_exec_ext in '' $ac_executable_extensions; do
14377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14378    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14380    break 2
14381  fi
14382done
14383  done
14384IFS=$as_save_IFS
14385
14386  ;;
14387esac
14388fi
14389CYGPATH=$ac_cv_path_CYGPATH
14390if test -n "$CYGPATH"; then
14391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14392$as_echo "$CYGPATH" >&6; }
14393else
14394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14395$as_echo "no" >&6; }
14396fi
14397
14398
14399  test -n "$CYGPATH" && break
14400done
14401
14402    else
14403      # If it succeeded, then it was overridden by the user. We will use it
14404      # for the tool.
14405
14406      # First remove it from the list of overridden variables, so we can test
14407      # for unknown variables in the end.
14408      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14409
14410      # Check if we try to supply an empty value
14411      if test "x$CYGPATH" = x; then
14412        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14413$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14414        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14415$as_echo_n "checking for CYGPATH... " >&6; }
14416        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14417$as_echo "disabled" >&6; }
14418      else
14419        # Check if the provided tool contains a complete path.
14420        tool_specified="$CYGPATH"
14421        tool_basename="${tool_specified##*/}"
14422        if test "x$tool_basename" = "x$tool_specified"; then
14423          # A command without a complete path is provided, search $PATH.
14424          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14425$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14426          # Extract the first word of "$tool_basename", so it can be a program name with args.
14427set dummy $tool_basename; ac_word=$2
14428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14429$as_echo_n "checking for $ac_word... " >&6; }
14430if ${ac_cv_path_CYGPATH+:} false; then :
14431  $as_echo_n "(cached) " >&6
14432else
14433  case $CYGPATH in
14434  [\\/]* | ?:[\\/]*)
14435  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14436  ;;
14437  *)
14438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14439for as_dir in $PATH
14440do
14441  IFS=$as_save_IFS
14442  test -z "$as_dir" && as_dir=.
14443    for ac_exec_ext in '' $ac_executable_extensions; do
14444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14445    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14447    break 2
14448  fi
14449done
14450  done
14451IFS=$as_save_IFS
14452
14453  ;;
14454esac
14455fi
14456CYGPATH=$ac_cv_path_CYGPATH
14457if test -n "$CYGPATH"; then
14458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14459$as_echo "$CYGPATH" >&6; }
14460else
14461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14462$as_echo "no" >&6; }
14463fi
14464
14465
14466          if test "x$CYGPATH" = x; then
14467            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14468          fi
14469        else
14470          # Otherwise we believe it is a complete path. Use it as it is.
14471          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14472$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14473          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14474$as_echo_n "checking for CYGPATH... " >&6; }
14475          if test ! -x "$tool_specified"; then
14476            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14477$as_echo "not found" >&6; }
14478            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14479          fi
14480          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14481$as_echo "$tool_specified" >&6; }
14482        fi
14483      fi
14484    fi
14485
14486  fi
14487
14488
14489
14490
14491  # Publish this variable in the help.
14492
14493
14494  if [ -z "${READLINK+x}" ]; then
14495    # The variable is not set by user, try to locate tool using the code snippet
14496    for ac_prog in greadlink readlink
14497do
14498  # Extract the first word of "$ac_prog", so it can be a program name with args.
14499set dummy $ac_prog; ac_word=$2
14500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14501$as_echo_n "checking for $ac_word... " >&6; }
14502if ${ac_cv_path_READLINK+:} false; then :
14503  $as_echo_n "(cached) " >&6
14504else
14505  case $READLINK in
14506  [\\/]* | ?:[\\/]*)
14507  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14508  ;;
14509  *)
14510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14511for as_dir in $PATH
14512do
14513  IFS=$as_save_IFS
14514  test -z "$as_dir" && as_dir=.
14515    for ac_exec_ext in '' $ac_executable_extensions; do
14516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14517    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14519    break 2
14520  fi
14521done
14522  done
14523IFS=$as_save_IFS
14524
14525  ;;
14526esac
14527fi
14528READLINK=$ac_cv_path_READLINK
14529if test -n "$READLINK"; then
14530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14531$as_echo "$READLINK" >&6; }
14532else
14533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14534$as_echo "no" >&6; }
14535fi
14536
14537
14538  test -n "$READLINK" && break
14539done
14540
14541  else
14542    # The variable is set, but is it from the command line or the environment?
14543
14544    # Try to remove the string !READLINK! from our list.
14545    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14546    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14547      # If it failed, the variable was not from the command line. Ignore it,
14548      # but warn the user (except for BASH, which is always set by the calling BASH).
14549      if test "xREADLINK" != xBASH; then
14550        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14551$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14552      fi
14553      # Try to locate tool using the code snippet
14554      for ac_prog in greadlink readlink
14555do
14556  # Extract the first word of "$ac_prog", so it can be a program name with args.
14557set dummy $ac_prog; ac_word=$2
14558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14559$as_echo_n "checking for $ac_word... " >&6; }
14560if ${ac_cv_path_READLINK+:} false; then :
14561  $as_echo_n "(cached) " >&6
14562else
14563  case $READLINK in
14564  [\\/]* | ?:[\\/]*)
14565  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14566  ;;
14567  *)
14568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14569for as_dir in $PATH
14570do
14571  IFS=$as_save_IFS
14572  test -z "$as_dir" && as_dir=.
14573    for ac_exec_ext in '' $ac_executable_extensions; do
14574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14575    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14577    break 2
14578  fi
14579done
14580  done
14581IFS=$as_save_IFS
14582
14583  ;;
14584esac
14585fi
14586READLINK=$ac_cv_path_READLINK
14587if test -n "$READLINK"; then
14588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14589$as_echo "$READLINK" >&6; }
14590else
14591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14592$as_echo "no" >&6; }
14593fi
14594
14595
14596  test -n "$READLINK" && break
14597done
14598
14599    else
14600      # If it succeeded, then it was overridden by the user. We will use it
14601      # for the tool.
14602
14603      # First remove it from the list of overridden variables, so we can test
14604      # for unknown variables in the end.
14605      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14606
14607      # Check if we try to supply an empty value
14608      if test "x$READLINK" = x; then
14609        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14610$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14611        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14612$as_echo_n "checking for READLINK... " >&6; }
14613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14614$as_echo "disabled" >&6; }
14615      else
14616        # Check if the provided tool contains a complete path.
14617        tool_specified="$READLINK"
14618        tool_basename="${tool_specified##*/}"
14619        if test "x$tool_basename" = "x$tool_specified"; then
14620          # A command without a complete path is provided, search $PATH.
14621          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14622$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14623          # Extract the first word of "$tool_basename", so it can be a program name with args.
14624set dummy $tool_basename; ac_word=$2
14625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14626$as_echo_n "checking for $ac_word... " >&6; }
14627if ${ac_cv_path_READLINK+:} false; then :
14628  $as_echo_n "(cached) " >&6
14629else
14630  case $READLINK in
14631  [\\/]* | ?:[\\/]*)
14632  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14633  ;;
14634  *)
14635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14636for as_dir in $PATH
14637do
14638  IFS=$as_save_IFS
14639  test -z "$as_dir" && as_dir=.
14640    for ac_exec_ext in '' $ac_executable_extensions; do
14641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14642    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14644    break 2
14645  fi
14646done
14647  done
14648IFS=$as_save_IFS
14649
14650  ;;
14651esac
14652fi
14653READLINK=$ac_cv_path_READLINK
14654if test -n "$READLINK"; then
14655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14656$as_echo "$READLINK" >&6; }
14657else
14658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14659$as_echo "no" >&6; }
14660fi
14661
14662
14663          if test "x$READLINK" = x; then
14664            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14665          fi
14666        else
14667          # Otherwise we believe it is a complete path. Use it as it is.
14668          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14669$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14670          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14671$as_echo_n "checking for READLINK... " >&6; }
14672          if test ! -x "$tool_specified"; then
14673            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14674$as_echo "not found" >&6; }
14675            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14676          fi
14677          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14678$as_echo "$tool_specified" >&6; }
14679        fi
14680      fi
14681    fi
14682
14683  fi
14684
14685
14686
14687
14688  # Publish this variable in the help.
14689
14690
14691  if [ -z "${DF+x}" ]; then
14692    # The variable is not set by user, try to locate tool using the code snippet
14693    for ac_prog in df
14694do
14695  # Extract the first word of "$ac_prog", so it can be a program name with args.
14696set dummy $ac_prog; ac_word=$2
14697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14698$as_echo_n "checking for $ac_word... " >&6; }
14699if ${ac_cv_path_DF+:} false; then :
14700  $as_echo_n "(cached) " >&6
14701else
14702  case $DF in
14703  [\\/]* | ?:[\\/]*)
14704  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14705  ;;
14706  *)
14707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14708for as_dir in $PATH
14709do
14710  IFS=$as_save_IFS
14711  test -z "$as_dir" && as_dir=.
14712    for ac_exec_ext in '' $ac_executable_extensions; do
14713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14714    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14716    break 2
14717  fi
14718done
14719  done
14720IFS=$as_save_IFS
14721
14722  ;;
14723esac
14724fi
14725DF=$ac_cv_path_DF
14726if test -n "$DF"; then
14727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14728$as_echo "$DF" >&6; }
14729else
14730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14731$as_echo "no" >&6; }
14732fi
14733
14734
14735  test -n "$DF" && break
14736done
14737
14738  else
14739    # The variable is set, but is it from the command line or the environment?
14740
14741    # Try to remove the string !DF! from our list.
14742    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14743    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14744      # If it failed, the variable was not from the command line. Ignore it,
14745      # but warn the user (except for BASH, which is always set by the calling BASH).
14746      if test "xDF" != xBASH; then
14747        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14748$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14749      fi
14750      # Try to locate tool using the code snippet
14751      for ac_prog in df
14752do
14753  # Extract the first word of "$ac_prog", so it can be a program name with args.
14754set dummy $ac_prog; ac_word=$2
14755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14756$as_echo_n "checking for $ac_word... " >&6; }
14757if ${ac_cv_path_DF+:} false; then :
14758  $as_echo_n "(cached) " >&6
14759else
14760  case $DF in
14761  [\\/]* | ?:[\\/]*)
14762  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14763  ;;
14764  *)
14765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14766for as_dir in $PATH
14767do
14768  IFS=$as_save_IFS
14769  test -z "$as_dir" && as_dir=.
14770    for ac_exec_ext in '' $ac_executable_extensions; do
14771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14772    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14774    break 2
14775  fi
14776done
14777  done
14778IFS=$as_save_IFS
14779
14780  ;;
14781esac
14782fi
14783DF=$ac_cv_path_DF
14784if test -n "$DF"; then
14785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14786$as_echo "$DF" >&6; }
14787else
14788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14789$as_echo "no" >&6; }
14790fi
14791
14792
14793  test -n "$DF" && break
14794done
14795
14796    else
14797      # If it succeeded, then it was overridden by the user. We will use it
14798      # for the tool.
14799
14800      # First remove it from the list of overridden variables, so we can test
14801      # for unknown variables in the end.
14802      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14803
14804      # Check if we try to supply an empty value
14805      if test "x$DF" = x; then
14806        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14807$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14808        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14809$as_echo_n "checking for DF... " >&6; }
14810        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14811$as_echo "disabled" >&6; }
14812      else
14813        # Check if the provided tool contains a complete path.
14814        tool_specified="$DF"
14815        tool_basename="${tool_specified##*/}"
14816        if test "x$tool_basename" = "x$tool_specified"; then
14817          # A command without a complete path is provided, search $PATH.
14818          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14819$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14820          # Extract the first word of "$tool_basename", so it can be a program name with args.
14821set dummy $tool_basename; ac_word=$2
14822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14823$as_echo_n "checking for $ac_word... " >&6; }
14824if ${ac_cv_path_DF+:} false; then :
14825  $as_echo_n "(cached) " >&6
14826else
14827  case $DF in
14828  [\\/]* | ?:[\\/]*)
14829  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14830  ;;
14831  *)
14832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14833for as_dir in $PATH
14834do
14835  IFS=$as_save_IFS
14836  test -z "$as_dir" && as_dir=.
14837    for ac_exec_ext in '' $ac_executable_extensions; do
14838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14839    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14841    break 2
14842  fi
14843done
14844  done
14845IFS=$as_save_IFS
14846
14847  ;;
14848esac
14849fi
14850DF=$ac_cv_path_DF
14851if test -n "$DF"; then
14852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14853$as_echo "$DF" >&6; }
14854else
14855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14856$as_echo "no" >&6; }
14857fi
14858
14859
14860          if test "x$DF" = x; then
14861            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14862          fi
14863        else
14864          # Otherwise we believe it is a complete path. Use it as it is.
14865          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14866$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14867          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14868$as_echo_n "checking for DF... " >&6; }
14869          if test ! -x "$tool_specified"; then
14870            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14871$as_echo "not found" >&6; }
14872            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14873          fi
14874          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14875$as_echo "$tool_specified" >&6; }
14876        fi
14877      fi
14878    fi
14879
14880  fi
14881
14882
14883
14884
14885  # Publish this variable in the help.
14886
14887
14888  if [ -z "${CPIO+x}" ]; then
14889    # The variable is not set by user, try to locate tool using the code snippet
14890    for ac_prog in cpio bsdcpio
14891do
14892  # Extract the first word of "$ac_prog", so it can be a program name with args.
14893set dummy $ac_prog; ac_word=$2
14894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14895$as_echo_n "checking for $ac_word... " >&6; }
14896if ${ac_cv_path_CPIO+:} false; then :
14897  $as_echo_n "(cached) " >&6
14898else
14899  case $CPIO in
14900  [\\/]* | ?:[\\/]*)
14901  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14902  ;;
14903  *)
14904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14905for as_dir in $PATH
14906do
14907  IFS=$as_save_IFS
14908  test -z "$as_dir" && as_dir=.
14909    for ac_exec_ext in '' $ac_executable_extensions; do
14910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14911    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14913    break 2
14914  fi
14915done
14916  done
14917IFS=$as_save_IFS
14918
14919  ;;
14920esac
14921fi
14922CPIO=$ac_cv_path_CPIO
14923if test -n "$CPIO"; then
14924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14925$as_echo "$CPIO" >&6; }
14926else
14927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14928$as_echo "no" >&6; }
14929fi
14930
14931
14932  test -n "$CPIO" && break
14933done
14934
14935  else
14936    # The variable is set, but is it from the command line or the environment?
14937
14938    # Try to remove the string !CPIO! from our list.
14939    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14940    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14941      # If it failed, the variable was not from the command line. Ignore it,
14942      # but warn the user (except for BASH, which is always set by the calling BASH).
14943      if test "xCPIO" != xBASH; then
14944        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14945$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14946      fi
14947      # Try to locate tool using the code snippet
14948      for ac_prog in cpio bsdcpio
14949do
14950  # Extract the first word of "$ac_prog", so it can be a program name with args.
14951set dummy $ac_prog; ac_word=$2
14952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14953$as_echo_n "checking for $ac_word... " >&6; }
14954if ${ac_cv_path_CPIO+:} false; then :
14955  $as_echo_n "(cached) " >&6
14956else
14957  case $CPIO in
14958  [\\/]* | ?:[\\/]*)
14959  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14960  ;;
14961  *)
14962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14963for as_dir in $PATH
14964do
14965  IFS=$as_save_IFS
14966  test -z "$as_dir" && as_dir=.
14967    for ac_exec_ext in '' $ac_executable_extensions; do
14968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14969    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14971    break 2
14972  fi
14973done
14974  done
14975IFS=$as_save_IFS
14976
14977  ;;
14978esac
14979fi
14980CPIO=$ac_cv_path_CPIO
14981if test -n "$CPIO"; then
14982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14983$as_echo "$CPIO" >&6; }
14984else
14985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14986$as_echo "no" >&6; }
14987fi
14988
14989
14990  test -n "$CPIO" && break
14991done
14992
14993    else
14994      # If it succeeded, then it was overridden by the user. We will use it
14995      # for the tool.
14996
14997      # First remove it from the list of overridden variables, so we can test
14998      # for unknown variables in the end.
14999      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15000
15001      # Check if we try to supply an empty value
15002      if test "x$CPIO" = x; then
15003        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15004$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15005        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15006$as_echo_n "checking for CPIO... " >&6; }
15007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15008$as_echo "disabled" >&6; }
15009      else
15010        # Check if the provided tool contains a complete path.
15011        tool_specified="$CPIO"
15012        tool_basename="${tool_specified##*/}"
15013        if test "x$tool_basename" = "x$tool_specified"; then
15014          # A command without a complete path is provided, search $PATH.
15015          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15016$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15017          # Extract the first word of "$tool_basename", so it can be a program name with args.
15018set dummy $tool_basename; ac_word=$2
15019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15020$as_echo_n "checking for $ac_word... " >&6; }
15021if ${ac_cv_path_CPIO+:} false; then :
15022  $as_echo_n "(cached) " >&6
15023else
15024  case $CPIO in
15025  [\\/]* | ?:[\\/]*)
15026  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15027  ;;
15028  *)
15029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15030for as_dir in $PATH
15031do
15032  IFS=$as_save_IFS
15033  test -z "$as_dir" && as_dir=.
15034    for ac_exec_ext in '' $ac_executable_extensions; do
15035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15036    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15038    break 2
15039  fi
15040done
15041  done
15042IFS=$as_save_IFS
15043
15044  ;;
15045esac
15046fi
15047CPIO=$ac_cv_path_CPIO
15048if test -n "$CPIO"; then
15049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15050$as_echo "$CPIO" >&6; }
15051else
15052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15053$as_echo "no" >&6; }
15054fi
15055
15056
15057          if test "x$CPIO" = x; then
15058            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15059          fi
15060        else
15061          # Otherwise we believe it is a complete path. Use it as it is.
15062          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15063$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15064          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15065$as_echo_n "checking for CPIO... " >&6; }
15066          if test ! -x "$tool_specified"; then
15067            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15068$as_echo "not found" >&6; }
15069            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15070          fi
15071          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15072$as_echo "$tool_specified" >&6; }
15073        fi
15074      fi
15075    fi
15076
15077  fi
15078
15079
15080
15081
15082  # Publish this variable in the help.
15083
15084
15085  if [ -z "${NICE+x}" ]; then
15086    # The variable is not set by user, try to locate tool using the code snippet
15087    for ac_prog in nice
15088do
15089  # Extract the first word of "$ac_prog", so it can be a program name with args.
15090set dummy $ac_prog; ac_word=$2
15091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15092$as_echo_n "checking for $ac_word... " >&6; }
15093if ${ac_cv_path_NICE+:} false; then :
15094  $as_echo_n "(cached) " >&6
15095else
15096  case $NICE in
15097  [\\/]* | ?:[\\/]*)
15098  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15099  ;;
15100  *)
15101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15102for as_dir in $PATH
15103do
15104  IFS=$as_save_IFS
15105  test -z "$as_dir" && as_dir=.
15106    for ac_exec_ext in '' $ac_executable_extensions; do
15107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15108    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15110    break 2
15111  fi
15112done
15113  done
15114IFS=$as_save_IFS
15115
15116  ;;
15117esac
15118fi
15119NICE=$ac_cv_path_NICE
15120if test -n "$NICE"; then
15121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15122$as_echo "$NICE" >&6; }
15123else
15124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15125$as_echo "no" >&6; }
15126fi
15127
15128
15129  test -n "$NICE" && break
15130done
15131
15132  else
15133    # The variable is set, but is it from the command line or the environment?
15134
15135    # Try to remove the string !NICE! from our list.
15136    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15137    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15138      # If it failed, the variable was not from the command line. Ignore it,
15139      # but warn the user (except for BASH, which is always set by the calling BASH).
15140      if test "xNICE" != xBASH; then
15141        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15142$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15143      fi
15144      # Try to locate tool using the code snippet
15145      for ac_prog in nice
15146do
15147  # Extract the first word of "$ac_prog", so it can be a program name with args.
15148set dummy $ac_prog; ac_word=$2
15149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15150$as_echo_n "checking for $ac_word... " >&6; }
15151if ${ac_cv_path_NICE+:} false; then :
15152  $as_echo_n "(cached) " >&6
15153else
15154  case $NICE in
15155  [\\/]* | ?:[\\/]*)
15156  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15157  ;;
15158  *)
15159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15160for as_dir in $PATH
15161do
15162  IFS=$as_save_IFS
15163  test -z "$as_dir" && as_dir=.
15164    for ac_exec_ext in '' $ac_executable_extensions; do
15165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15166    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15168    break 2
15169  fi
15170done
15171  done
15172IFS=$as_save_IFS
15173
15174  ;;
15175esac
15176fi
15177NICE=$ac_cv_path_NICE
15178if test -n "$NICE"; then
15179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15180$as_echo "$NICE" >&6; }
15181else
15182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15183$as_echo "no" >&6; }
15184fi
15185
15186
15187  test -n "$NICE" && break
15188done
15189
15190    else
15191      # If it succeeded, then it was overridden by the user. We will use it
15192      # for the tool.
15193
15194      # First remove it from the list of overridden variables, so we can test
15195      # for unknown variables in the end.
15196      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15197
15198      # Check if we try to supply an empty value
15199      if test "x$NICE" = x; then
15200        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15201$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15202        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15203$as_echo_n "checking for NICE... " >&6; }
15204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15205$as_echo "disabled" >&6; }
15206      else
15207        # Check if the provided tool contains a complete path.
15208        tool_specified="$NICE"
15209        tool_basename="${tool_specified##*/}"
15210        if test "x$tool_basename" = "x$tool_specified"; then
15211          # A command without a complete path is provided, search $PATH.
15212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15213$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15214          # Extract the first word of "$tool_basename", so it can be a program name with args.
15215set dummy $tool_basename; ac_word=$2
15216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15217$as_echo_n "checking for $ac_word... " >&6; }
15218if ${ac_cv_path_NICE+:} false; then :
15219  $as_echo_n "(cached) " >&6
15220else
15221  case $NICE in
15222  [\\/]* | ?:[\\/]*)
15223  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15224  ;;
15225  *)
15226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15227for as_dir in $PATH
15228do
15229  IFS=$as_save_IFS
15230  test -z "$as_dir" && as_dir=.
15231    for ac_exec_ext in '' $ac_executable_extensions; do
15232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15233    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15235    break 2
15236  fi
15237done
15238  done
15239IFS=$as_save_IFS
15240
15241  ;;
15242esac
15243fi
15244NICE=$ac_cv_path_NICE
15245if test -n "$NICE"; then
15246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15247$as_echo "$NICE" >&6; }
15248else
15249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15250$as_echo "no" >&6; }
15251fi
15252
15253
15254          if test "x$NICE" = x; then
15255            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15256          fi
15257        else
15258          # Otherwise we believe it is a complete path. Use it as it is.
15259          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15260$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15261          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15262$as_echo_n "checking for NICE... " >&6; }
15263          if test ! -x "$tool_specified"; then
15264            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15265$as_echo "not found" >&6; }
15266            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15267          fi
15268          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15269$as_echo "$tool_specified" >&6; }
15270        fi
15271      fi
15272    fi
15273
15274  fi
15275
15276
15277
15278
15279# Now we can determine OpenJDK build and target platforms. This is required to
15280# have early on.
15281# Make sure we can run config.sub.
15282$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15283  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15284
15285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15286$as_echo_n "checking build system type... " >&6; }
15287if ${ac_cv_build+:} false; then :
15288  $as_echo_n "(cached) " >&6
15289else
15290  ac_build_alias=$build_alias
15291test "x$ac_build_alias" = x &&
15292  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15293test "x$ac_build_alias" = x &&
15294  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15295ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15296  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15297
15298fi
15299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15300$as_echo "$ac_cv_build" >&6; }
15301case $ac_cv_build in
15302*-*-*) ;;
15303*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15304esac
15305build=$ac_cv_build
15306ac_save_IFS=$IFS; IFS='-'
15307set x $ac_cv_build
15308shift
15309build_cpu=$1
15310build_vendor=$2
15311shift; shift
15312# Remember, the first character of IFS is used to create $*,
15313# except with old shells:
15314build_os=$*
15315IFS=$ac_save_IFS
15316case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15317
15318
15319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15320$as_echo_n "checking host system type... " >&6; }
15321if ${ac_cv_host+:} false; then :
15322  $as_echo_n "(cached) " >&6
15323else
15324  if test "x$host_alias" = x; then
15325  ac_cv_host=$ac_cv_build
15326else
15327  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15328    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15329fi
15330
15331fi
15332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15333$as_echo "$ac_cv_host" >&6; }
15334case $ac_cv_host in
15335*-*-*) ;;
15336*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15337esac
15338host=$ac_cv_host
15339ac_save_IFS=$IFS; IFS='-'
15340set x $ac_cv_host
15341shift
15342host_cpu=$1
15343host_vendor=$2
15344shift; shift
15345# Remember, the first character of IFS is used to create $*,
15346# except with old shells:
15347host_os=$*
15348IFS=$ac_save_IFS
15349case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15350
15351
15352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15353$as_echo_n "checking target system type... " >&6; }
15354if ${ac_cv_target+:} false; then :
15355  $as_echo_n "(cached) " >&6
15356else
15357  if test "x$target_alias" = x; then
15358  ac_cv_target=$ac_cv_host
15359else
15360  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15361    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15362fi
15363
15364fi
15365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15366$as_echo "$ac_cv_target" >&6; }
15367case $ac_cv_target in
15368*-*-*) ;;
15369*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15370esac
15371target=$ac_cv_target
15372ac_save_IFS=$IFS; IFS='-'
15373set x $ac_cv_target
15374shift
15375target_cpu=$1
15376target_vendor=$2
15377shift; shift
15378# Remember, the first character of IFS is used to create $*,
15379# except with old shells:
15380target_os=$*
15381IFS=$ac_save_IFS
15382case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15383
15384
15385# The aliases save the names the user supplied, while $host etc.
15386# will get canonicalized.
15387test -n "$target_alias" &&
15388  test "$program_prefix$program_suffix$program_transform_name" = \
15389    NONENONEs,x,x, &&
15390  program_prefix=${target_alias}-
15391
15392  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15393  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15394  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15395  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15396  # to use the configure naming style.
15397
15398
15399
15400
15401
15402  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15403  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15404  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15405  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15406  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15407  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15408
15409
15410
15411  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15412
15413  case "$build_os" in
15414    *linux*)
15415      VAR_OS=linux
15416      VAR_OS_TYPE=unix
15417      ;;
15418    *solaris*)
15419      VAR_OS=solaris
15420      VAR_OS_TYPE=unix
15421      ;;
15422    *darwin*)
15423      VAR_OS=macosx
15424      VAR_OS_TYPE=unix
15425      ;;
15426    *bsd*)
15427      VAR_OS=bsd
15428      VAR_OS_TYPE=unix
15429      ;;
15430    *cygwin*)
15431      VAR_OS=windows
15432      VAR_OS_ENV=windows.cygwin
15433      ;;
15434    *mingw*)
15435      VAR_OS=windows
15436      VAR_OS_ENV=windows.msys
15437      ;;
15438    *aix*)
15439      VAR_OS=aix
15440      VAR_OS_TYPE=unix
15441      ;;
15442    *)
15443      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15444      ;;
15445  esac
15446
15447
15448  # First argument is the cpu name from the trip/quad
15449  case "$build_cpu" in
15450    x86_64)
15451      VAR_CPU=x86_64
15452      VAR_CPU_ARCH=x86
15453      VAR_CPU_BITS=64
15454      VAR_CPU_ENDIAN=little
15455      ;;
15456    i?86)
15457      VAR_CPU=x86
15458      VAR_CPU_ARCH=x86
15459      VAR_CPU_BITS=32
15460      VAR_CPU_ENDIAN=little
15461      ;;
15462    arm*)
15463      VAR_CPU=arm
15464      VAR_CPU_ARCH=arm
15465      VAR_CPU_BITS=32
15466      VAR_CPU_ENDIAN=little
15467      ;;
15468    aarch64)
15469      VAR_CPU=aarch64
15470      VAR_CPU_ARCH=aarch64
15471      VAR_CPU_BITS=64
15472      VAR_CPU_ENDIAN=little
15473      ;;
15474    powerpc)
15475      VAR_CPU=ppc
15476      VAR_CPU_ARCH=ppc
15477      VAR_CPU_BITS=32
15478      VAR_CPU_ENDIAN=big
15479      ;;
15480    powerpc64)
15481      VAR_CPU=ppc64
15482      VAR_CPU_ARCH=ppc
15483      VAR_CPU_BITS=64
15484      VAR_CPU_ENDIAN=big
15485      ;;
15486    powerpc64le)
15487      VAR_CPU=ppc64le
15488      VAR_CPU_ARCH=ppc
15489      VAR_CPU_BITS=64
15490      VAR_CPU_ENDIAN=little
15491      ;;
15492    s390)
15493      VAR_CPU=s390
15494      VAR_CPU_ARCH=s390
15495      VAR_CPU_BITS=32
15496      VAR_CPU_ENDIAN=big
15497      ;;
15498    s390x)
15499      VAR_CPU=s390x
15500      VAR_CPU_ARCH=s390
15501      VAR_CPU_BITS=64
15502      VAR_CPU_ENDIAN=big
15503      ;;
15504    sparc)
15505      VAR_CPU=sparc
15506      VAR_CPU_ARCH=sparc
15507      VAR_CPU_BITS=32
15508      VAR_CPU_ENDIAN=big
15509      ;;
15510    sparcv9|sparc64)
15511      VAR_CPU=sparcv9
15512      VAR_CPU_ARCH=sparc
15513      VAR_CPU_BITS=64
15514      VAR_CPU_ENDIAN=big
15515      ;;
15516    *)
15517      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15518      ;;
15519  esac
15520
15521  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15522  OPENJDK_BUILD_OS="$VAR_OS"
15523  if test "x$VAR_OS_TYPE" != x; then
15524    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15525  else
15526    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15527  fi
15528  if test "x$VAR_OS_ENV" != x; then
15529    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15530  else
15531    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15532  fi
15533  OPENJDK_BUILD_CPU="$VAR_CPU"
15534  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15535  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15536  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15537
15538
15539
15540
15541
15542
15543
15544
15545  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15546$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15548$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15549
15550  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15551
15552  case "$host_os" in
15553    *linux*)
15554      VAR_OS=linux
15555      VAR_OS_TYPE=unix
15556      ;;
15557    *solaris*)
15558      VAR_OS=solaris
15559      VAR_OS_TYPE=unix
15560      ;;
15561    *darwin*)
15562      VAR_OS=macosx
15563      VAR_OS_TYPE=unix
15564      ;;
15565    *bsd*)
15566      VAR_OS=bsd
15567      VAR_OS_TYPE=unix
15568      ;;
15569    *cygwin*)
15570      VAR_OS=windows
15571      VAR_OS_ENV=windows.cygwin
15572      ;;
15573    *mingw*)
15574      VAR_OS=windows
15575      VAR_OS_ENV=windows.msys
15576      ;;
15577    *aix*)
15578      VAR_OS=aix
15579      VAR_OS_TYPE=unix
15580      ;;
15581    *)
15582      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15583      ;;
15584  esac
15585
15586
15587  # First argument is the cpu name from the trip/quad
15588  case "$host_cpu" in
15589    x86_64)
15590      VAR_CPU=x86_64
15591      VAR_CPU_ARCH=x86
15592      VAR_CPU_BITS=64
15593      VAR_CPU_ENDIAN=little
15594      ;;
15595    i?86)
15596      VAR_CPU=x86
15597      VAR_CPU_ARCH=x86
15598      VAR_CPU_BITS=32
15599      VAR_CPU_ENDIAN=little
15600      ;;
15601    arm*)
15602      VAR_CPU=arm
15603      VAR_CPU_ARCH=arm
15604      VAR_CPU_BITS=32
15605      VAR_CPU_ENDIAN=little
15606      ;;
15607    aarch64)
15608      VAR_CPU=aarch64
15609      VAR_CPU_ARCH=aarch64
15610      VAR_CPU_BITS=64
15611      VAR_CPU_ENDIAN=little
15612      ;;
15613    powerpc)
15614      VAR_CPU=ppc
15615      VAR_CPU_ARCH=ppc
15616      VAR_CPU_BITS=32
15617      VAR_CPU_ENDIAN=big
15618      ;;
15619    powerpc64)
15620      VAR_CPU=ppc64
15621      VAR_CPU_ARCH=ppc
15622      VAR_CPU_BITS=64
15623      VAR_CPU_ENDIAN=big
15624      ;;
15625    powerpc64le)
15626      VAR_CPU=ppc64le
15627      VAR_CPU_ARCH=ppc
15628      VAR_CPU_BITS=64
15629      VAR_CPU_ENDIAN=little
15630      ;;
15631    s390)
15632      VAR_CPU=s390
15633      VAR_CPU_ARCH=s390
15634      VAR_CPU_BITS=32
15635      VAR_CPU_ENDIAN=big
15636      ;;
15637    s390x)
15638      VAR_CPU=s390x
15639      VAR_CPU_ARCH=s390
15640      VAR_CPU_BITS=64
15641      VAR_CPU_ENDIAN=big
15642      ;;
15643    sparc)
15644      VAR_CPU=sparc
15645      VAR_CPU_ARCH=sparc
15646      VAR_CPU_BITS=32
15647      VAR_CPU_ENDIAN=big
15648      ;;
15649    sparcv9|sparc64)
15650      VAR_CPU=sparcv9
15651      VAR_CPU_ARCH=sparc
15652      VAR_CPU_BITS=64
15653      VAR_CPU_ENDIAN=big
15654      ;;
15655    *)
15656      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15657      ;;
15658  esac
15659
15660  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15661  OPENJDK_TARGET_OS="$VAR_OS"
15662  if test "x$VAR_OS_TYPE" != x; then
15663    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15664  else
15665    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15666  fi
15667  if test "x$VAR_OS_ENV" != x; then
15668    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15669  else
15670    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15671  fi
15672  OPENJDK_TARGET_CPU="$VAR_CPU"
15673  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15674  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15675  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15676
15677
15678
15679
15680
15681
15682
15683
15684  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15685$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15687$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15688
15689
15690
15691# Check whether --with-target-bits was given.
15692if test "${with_target_bits+set}" = set; then :
15693  withval=$with_target_bits;
15694fi
15695
15696
15697  # We have three types of compiles:
15698  # native  == normal compilation, target system == build system
15699  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15700  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15701  #
15702  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15703    # We're doing a proper cross-compilation
15704    COMPILE_TYPE="cross"
15705  else
15706    COMPILE_TYPE="native"
15707  fi
15708
15709  if test "x$with_target_bits" != x; then
15710    if test "x$COMPILE_TYPE" = "xcross"; then
15711      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15712    fi
15713
15714    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15715      # A reduced build is requested
15716      COMPILE_TYPE="reduced"
15717      OPENJDK_TARGET_CPU_BITS=32
15718      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15719        OPENJDK_TARGET_CPU=x86
15720      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15721        OPENJDK_TARGET_CPU=sparc
15722      else
15723        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15724      fi
15725    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15726      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
15727    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15728      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15729$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15730    else
15731      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15732    fi
15733  fi
15734
15735
15736  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15737$as_echo_n "checking compilation type... " >&6; }
15738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15739$as_echo "$COMPILE_TYPE" >&6; }
15740
15741
15742  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15743    REQUIRED_OS_NAME=SunOS
15744    REQUIRED_OS_VERSION=5.10
15745  fi
15746  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15747    REQUIRED_OS_NAME=Linux
15748    REQUIRED_OS_VERSION=2.6
15749  fi
15750  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15751    REQUIRED_OS_NAME=Windows
15752    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15753      REQUIRED_OS_VERSION=5.2
15754    else
15755      REQUIRED_OS_VERSION=5.1
15756    fi
15757  fi
15758  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15759    REQUIRED_OS_NAME=Darwin
15760    REQUIRED_OS_VERSION=11.2
15761  fi
15762  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15763    REQUIRED_OS_NAME=AIX
15764    REQUIRED_OS_VERSION=7.1
15765  fi
15766
15767
15768
15769
15770
15771
15772  # Also store the legacy naming of the cpu.
15773  # Ie i586 and amd64 instead of x86 and x86_64
15774  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15775  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15776    OPENJDK_TARGET_CPU_LEGACY="i586"
15777  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15778    # On all platforms except MacOSX replace x86_64 with amd64.
15779    OPENJDK_TARGET_CPU_LEGACY="amd64"
15780  fi
15781
15782
15783  # And the second legacy naming of the cpu.
15784  # Ie i386 and amd64 instead of x86 and x86_64.
15785  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15786  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15787    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15788  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15789    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15790  fi
15791
15792
15793  # This is the name of the cpu (but using i386 and amd64 instead of
15794  # x86 and x86_64, respectively), preceeded by a /, to be used when
15795  # locating libraries. On macosx, it's empty, though.
15796  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15797  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15798    OPENJDK_TARGET_CPU_LIBDIR=""
15799  fi
15800
15801
15802  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15803  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15804  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15805  OPENJDK_TARGET_CPU_ISADIR=""
15806  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15807    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15808      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15809    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15810      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15811    fi
15812  fi
15813
15814
15815  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15816  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15817  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15818    # On linux only, we replace x86 with i386.
15819    OPENJDK_TARGET_CPU_OSARCH="i386"
15820  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15821    # On all platforms except macosx, we replace x86_64 with amd64.
15822    OPENJDK_TARGET_CPU_OSARCH="amd64"
15823  fi
15824
15825
15826  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15827  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15828    OPENJDK_TARGET_CPU_JLI="i386"
15829  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15830    # On all platforms except macosx, we replace x86_64 with amd64.
15831    OPENJDK_TARGET_CPU_JLI="amd64"
15832  fi
15833  # Now setup the -D flags for building libjli.
15834  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15835  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15836    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15837      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15838    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15839      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15840    fi
15841  fi
15842
15843
15844  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15845      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15846  else
15847      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15848  fi
15849
15850
15851  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15852  # Macosx is osx and x86_64 is x64
15853  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15854    OPENJDK_TARGET_OS_BUNDLE="osx"
15855  else
15856    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15857  fi
15858  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15859    OPENJDK_TARGET_CPU_BUNDLE="x64"
15860  else
15861    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15862  fi
15863  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15864
15865
15866
15867
15868  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15869    A_LP64="LP64:="
15870    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15871    # unpack200.exe
15872    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15873      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15874    fi
15875  fi
15876  LP64=$A_LP64
15877
15878
15879  if test "x$COMPILE_TYPE" = "xcross"; then
15880    # FIXME: ... or should this include reduced builds..?
15881    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15882  else
15883    DEFINE_CROSS_COMPILE_ARCH=""
15884  fi
15885
15886
15887  # Convert openjdk platform names to hotspot names
15888
15889  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15890  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15891    HOTSPOT_TARGET_OS=bsd
15892  fi
15893
15894
15895  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15896  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15897    HOTSPOT_TARGET_OS_TYPE=posix
15898  fi
15899
15900
15901  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15902  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15903    HOTSPOT_TARGET_CPU=x86_32
15904  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15905    HOTSPOT_TARGET_CPU=sparc
15906  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15907    HOTSPOT_TARGET_CPU=ppc_64
15908  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15909    HOTSPOT_TARGET_CPU=ppc_64
15910  fi
15911
15912
15913  # This is identical with OPENJDK_*, but define anyway for consistency.
15914  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15915
15916
15917  # Setup HOTSPOT_TARGET_CPU_DEFINE
15918  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15919    HOTSPOT_TARGET_CPU_DEFINE=IA32
15920  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15921    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15922  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15923    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15924  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15925    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15926  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15927    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15928  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15929    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15930
15931  # The cpu defines below are for zero, we don't support them directly.
15932  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15933    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15934  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15935    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15936  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15937    HOTSPOT_TARGET_CPU_DEFINE=S390
15938  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15939    HOTSPOT_TARGET_CPU_DEFINE=S390
15940  elif test "x$OPENJDK_TARGET_CPU" != x; then
15941    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
15942  fi
15943
15944
15945
15946
15947  # Also store the legacy naming of the cpu.
15948  # Ie i586 and amd64 instead of x86 and x86_64
15949  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15950  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15951    OPENJDK_BUILD_CPU_LEGACY="i586"
15952  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15953    # On all platforms except MacOSX replace x86_64 with amd64.
15954    OPENJDK_BUILD_CPU_LEGACY="amd64"
15955  fi
15956
15957
15958  # And the second legacy naming of the cpu.
15959  # Ie i386 and amd64 instead of x86 and x86_64.
15960  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15961  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15962    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15963  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15964    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15965  fi
15966
15967
15968  # This is the name of the cpu (but using i386 and amd64 instead of
15969  # x86 and x86_64, respectively), preceeded by a /, to be used when
15970  # locating libraries. On macosx, it's empty, though.
15971  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15972  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15973    OPENJDK_BUILD_CPU_LIBDIR=""
15974  fi
15975
15976
15977  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15978  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15979  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15980  OPENJDK_BUILD_CPU_ISADIR=""
15981  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15982    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15983      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15984    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15985      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15986    fi
15987  fi
15988
15989
15990  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15991  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15992  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15993    # On linux only, we replace x86 with i386.
15994    OPENJDK_BUILD_CPU_OSARCH="i386"
15995  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15996    # On all platforms except macosx, we replace x86_64 with amd64.
15997    OPENJDK_BUILD_CPU_OSARCH="amd64"
15998  fi
15999
16000
16001  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16002  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16003    OPENJDK_BUILD_CPU_JLI="i386"
16004  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16005    # On all platforms except macosx, we replace x86_64 with amd64.
16006    OPENJDK_BUILD_CPU_JLI="amd64"
16007  fi
16008  # Now setup the -D flags for building libjli.
16009  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16010  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16011    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16012      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16013    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16014      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16015    fi
16016  fi
16017
16018
16019  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16020      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16021  else
16022      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16023  fi
16024
16025
16026  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16027  # Macosx is osx and x86_64 is x64
16028  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16029    OPENJDK_BUILD_OS_BUNDLE="osx"
16030  else
16031    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16032  fi
16033  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16034    OPENJDK_BUILD_CPU_BUNDLE="x64"
16035  else
16036    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16037  fi
16038  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16039
16040
16041
16042
16043  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16044    A_LP64="LP64:="
16045    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16046    # unpack200.exe
16047    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16048      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16049    fi
16050  fi
16051  LP64=$A_LP64
16052
16053
16054  if test "x$COMPILE_TYPE" = "xcross"; then
16055    # FIXME: ... or should this include reduced builds..?
16056    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16057  else
16058    DEFINE_CROSS_COMPILE_ARCH=""
16059  fi
16060
16061
16062  # Convert openjdk platform names to hotspot names
16063
16064  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16065  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16066    HOTSPOT_BUILD_OS=bsd
16067  fi
16068
16069
16070  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16071  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16072    HOTSPOT_BUILD_OS_TYPE=posix
16073  fi
16074
16075
16076  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16077  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16078    HOTSPOT_BUILD_CPU=x86_32
16079  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16080    HOTSPOT_BUILD_CPU=sparc
16081  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16082    HOTSPOT_BUILD_CPU=ppc_64
16083  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16084    HOTSPOT_BUILD_CPU=ppc_64
16085  fi
16086
16087
16088  # This is identical with OPENJDK_*, but define anyway for consistency.
16089  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16090
16091
16092  # Setup HOTSPOT_BUILD_CPU_DEFINE
16093  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16094    HOTSPOT_BUILD_CPU_DEFINE=IA32
16095  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16096    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16097  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16098    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16099  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16100    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16101  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16102    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16103  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16104    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16105
16106  # The cpu defines below are for zero, we don't support them directly.
16107  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16108    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16109  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16110    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16111  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16112    HOTSPOT_BUILD_CPU_DEFINE=S390
16113  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16114    HOTSPOT_BUILD_CPU_DEFINE=S390
16115  elif test "x$OPENJDK_BUILD_CPU" != x; then
16116    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16117  fi
16118
16119
16120
16121
16122  # ZERO_ARCHDEF is used to enable architecture-specific code.
16123  # This is used in legacy hotspot build.
16124  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16125
16126
16127
16128
16129
16130# Continue setting up basic stuff. Most remaining code require fundamental tools.
16131
16132  # Save the current directory this script was started from
16133  CURDIR="$PWD"
16134
16135  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16136  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16137  # was not available at that time.
16138  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16139  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16140    ORIGINAL_PATH="$REWRITTEN_PATH"
16141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16142$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16143  fi
16144
16145  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16146    PATH_SEP=";"
16147
16148  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16149  if test $SRC_ROOT_LENGTH -gt 100; then
16150    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16151  fi
16152
16153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16154    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16155$as_echo_n "checking cygwin release... " >&6; }
16156    CYGWIN_VERSION=`$UNAME -r`
16157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16158$as_echo "$CYGWIN_VERSION" >&6; }
16159    WINDOWS_ENV_VENDOR='cygwin'
16160    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16161
16162    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16163    if test "x$CYGWIN_VERSION_OLD" != x; then
16164      { $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
16165$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;}
16166      as_fn_error $? "Cannot continue" "$LINENO" 5
16167    fi
16168    if test "x$CYGPATH" = x; then
16169      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16170    fi
16171    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16172$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16173    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16174    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16175    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16176    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16177    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16178$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16179    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16180    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16181    if test "x$test_cygdrive_prefix" = x; then
16182      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16183    fi
16184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16185    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16186$as_echo_n "checking msys release... " >&6; }
16187    MSYS_VERSION=`$UNAME -r`
16188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16189$as_echo "$MSYS_VERSION" >&6; }
16190
16191    WINDOWS_ENV_VENDOR='msys'
16192    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16193
16194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16195$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16196    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16197    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16198
16199  windows_path="$MSYS_ROOT_PATH"
16200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16201    unix_path=`$CYGPATH -u "$windows_path"`
16202    MSYS_ROOT_PATH="$unix_path"
16203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16205    MSYS_ROOT_PATH="$unix_path"
16206  fi
16207
16208    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16209$as_echo "$MSYS_ROOT_PATH" >&6; }
16210    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16211  else
16212    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16213  fi
16214
16215  # Test if windows or unix (cygwin/msys) find is first in path.
16216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16217$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16218  FIND_BINARY_OUTPUT=`find --version 2>&1`
16219  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16220    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16221$as_echo "unix style" >&6; }
16222  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16224$as_echo "Windows" >&6; }
16225    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16226$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16227    { $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
16228$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16229    as_fn_error $? "Cannot continue" "$LINENO" 5
16230  else
16231    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16232$as_echo "unknown" >&6; }
16233    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16234$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16235  fi
16236
16237  else
16238    PATH_SEP=":"
16239  fi
16240
16241
16242  # We get the top-level directory from the supporting wrappers.
16243  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16244$as_echo_n "checking for top-level directory... " >&6; }
16245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16246$as_echo "$TOPDIR" >&6; }
16247
16248
16249  # Save the original version of TOPDIR for string comparisons
16250  ORIGINAL_TOPDIR="$TOPDIR"
16251
16252
16253  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16254
16255  # Only process if variable expands to non-empty
16256
16257  if test "x$CURDIR" != x; then
16258    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16259
16260  # Input might be given as Windows format, start by converting to
16261  # unix format.
16262  path="$CURDIR"
16263  new_path=`$CYGPATH -u "$path"`
16264
16265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16268  # "foo.exe" is OK but "foo" is an error.
16269  #
16270  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16271  # It is also a way to make sure we got the proper file name for the real test later on.
16272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16273  if test "x$test_shortpath" = x; then
16274    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16275$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16276    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16277  fi
16278
16279  # Call helper function which possibly converts this using DOS-style short mode.
16280  # If so, the updated path is stored in $new_path.
16281
16282  input_path="$new_path"
16283  # Check if we need to convert this using DOS-style short mode. If the path
16284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16285  # take no chances and rewrite it.
16286  # Note: m4 eats our [], so we need to use [ and ] instead.
16287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16288  if test "x$has_forbidden_chars" != x; then
16289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16293      # Going to short mode and back again did indeed matter. Since short mode is
16294      # case insensitive, let's make it lowercase to improve readability.
16295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16296      # Now convert it back to Unix-style (cygpath)
16297      input_path=`$CYGPATH -u "$shortmode_path"`
16298      new_path="$input_path"
16299    fi
16300  fi
16301
16302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16303  if test "x$test_cygdrive_prefix" = x; then
16304    # As a simple fix, exclude /usr/bin since it's not a real path.
16305    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16307      # a path prefixed by /cygdrive for fixpath to work.
16308      new_path="$CYGWIN_ROOT_PATH$input_path"
16309    fi
16310  fi
16311
16312
16313  if test "x$path" != "x$new_path"; then
16314    CURDIR="$new_path"
16315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16316$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16317  fi
16318
16319    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16320
16321  path="$CURDIR"
16322  has_colon=`$ECHO $path | $GREP ^.:`
16323  new_path="$path"
16324  if test "x$has_colon" = x; then
16325    # Not in mixed or Windows style, start by that.
16326    new_path=`cmd //c echo $path`
16327  fi
16328
16329
16330  input_path="$new_path"
16331  # Check if we need to convert this using DOS-style short mode. If the path
16332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16333  # take no chances and rewrite it.
16334  # Note: m4 eats our [], so we need to use [ and ] instead.
16335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16336  if test "x$has_forbidden_chars" != x; then
16337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16339  fi
16340
16341
16342  windows_path="$new_path"
16343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16344    unix_path=`$CYGPATH -u "$windows_path"`
16345    new_path="$unix_path"
16346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16348    new_path="$unix_path"
16349  fi
16350
16351  if test "x$path" != "x$new_path"; then
16352    CURDIR="$new_path"
16353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16354$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16355  fi
16356
16357  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16358  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16359
16360    else
16361      # We're on a unix platform. Hooray! :)
16362      path="$CURDIR"
16363      has_space=`$ECHO "$path" | $GREP " "`
16364      if test "x$has_space" != x; then
16365        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16366$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16367        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16368      fi
16369
16370      # Use eval to expand a potential ~
16371      eval path="$path"
16372      if test ! -f "$path" && test ! -d "$path"; then
16373        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16374      fi
16375
16376      if test -d "$path"; then
16377        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16378      else
16379        dir="`$DIRNAME "$path"`"
16380        base="`$BASENAME "$path"`"
16381        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16382      fi
16383    fi
16384  fi
16385
16386
16387  # Only process if variable expands to non-empty
16388
16389  if test "x$TOPDIR" != x; then
16390    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16391
16392  # Input might be given as Windows format, start by converting to
16393  # unix format.
16394  path="$TOPDIR"
16395  new_path=`$CYGPATH -u "$path"`
16396
16397  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16398  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16399  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16400  # "foo.exe" is OK but "foo" is an error.
16401  #
16402  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16403  # It is also a way to make sure we got the proper file name for the real test later on.
16404  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16405  if test "x$test_shortpath" = x; then
16406    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16407$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16408    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16409  fi
16410
16411  # Call helper function which possibly converts this using DOS-style short mode.
16412  # If so, the updated path is stored in $new_path.
16413
16414  input_path="$new_path"
16415  # Check if we need to convert this using DOS-style short mode. If the path
16416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16417  # take no chances and rewrite it.
16418  # Note: m4 eats our [], so we need to use [ and ] instead.
16419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16420  if test "x$has_forbidden_chars" != x; then
16421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16422    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16425      # Going to short mode and back again did indeed matter. Since short mode is
16426      # case insensitive, let's make it lowercase to improve readability.
16427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16428      # Now convert it back to Unix-style (cygpath)
16429      input_path=`$CYGPATH -u "$shortmode_path"`
16430      new_path="$input_path"
16431    fi
16432  fi
16433
16434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16435  if test "x$test_cygdrive_prefix" = x; then
16436    # As a simple fix, exclude /usr/bin since it's not a real path.
16437    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16439      # a path prefixed by /cygdrive for fixpath to work.
16440      new_path="$CYGWIN_ROOT_PATH$input_path"
16441    fi
16442  fi
16443
16444
16445  if test "x$path" != "x$new_path"; then
16446    TOPDIR="$new_path"
16447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16448$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16449  fi
16450
16451    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16452
16453  path="$TOPDIR"
16454  has_colon=`$ECHO $path | $GREP ^.:`
16455  new_path="$path"
16456  if test "x$has_colon" = x; then
16457    # Not in mixed or Windows style, start by that.
16458    new_path=`cmd //c echo $path`
16459  fi
16460
16461
16462  input_path="$new_path"
16463  # Check if we need to convert this using DOS-style short mode. If the path
16464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16465  # take no chances and rewrite it.
16466  # Note: m4 eats our [], so we need to use [ and ] instead.
16467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16468  if test "x$has_forbidden_chars" != x; then
16469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16471  fi
16472
16473
16474  windows_path="$new_path"
16475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16476    unix_path=`$CYGPATH -u "$windows_path"`
16477    new_path="$unix_path"
16478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16480    new_path="$unix_path"
16481  fi
16482
16483  if test "x$path" != "x$new_path"; then
16484    TOPDIR="$new_path"
16485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16486$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16487  fi
16488
16489  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16490  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16491
16492    else
16493      # We're on a unix platform. Hooray! :)
16494      path="$TOPDIR"
16495      has_space=`$ECHO "$path" | $GREP " "`
16496      if test "x$has_space" != x; then
16497        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16498$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16499        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16500      fi
16501
16502      # Use eval to expand a potential ~
16503      eval path="$path"
16504      if test ! -f "$path" && test ! -d "$path"; then
16505        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16506      fi
16507
16508      if test -d "$path"; then
16509        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16510      else
16511        dir="`$DIRNAME "$path"`"
16512        base="`$BASENAME "$path"`"
16513        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16514      fi
16515    fi
16516  fi
16517
16518  # SRC_ROOT is a traditional alias for TOPDIR.
16519  SRC_ROOT=$TOPDIR
16520
16521  # Calculate a canonical version of TOPDIR for string comparisons
16522  CANONICAL_TOPDIR=$TOPDIR
16523
16524  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16525    # Follow a chain of symbolic links. Use readlink
16526    # where it exists, else fall back to horribly
16527    # complicated shell code.
16528    if test "x$READLINK_TESTED" != yes; then
16529      # On MacOSX there is a readlink tool with a different
16530      # purpose than the GNU readlink tool. Check the found readlink.
16531      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16532      if test "x$ISGNU" = x; then
16533        # A readlink that we do not know how to use.
16534        # Are there other non-GNU readlinks out there?
16535        READLINK_TESTED=yes
16536        READLINK=
16537      fi
16538    fi
16539
16540    if test "x$READLINK" != x; then
16541      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16542    else
16543      # Save the current directory for restoring afterwards
16544      STARTDIR=$PWD
16545      COUNTER=0
16546      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16547      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16548      cd $sym_link_dir
16549      # Use -P flag to resolve symlinks in directories.
16550      cd `$THEPWDCMD -P`
16551      sym_link_dir=`$THEPWDCMD -P`
16552      # Resolve file symlinks
16553      while test $COUNTER -lt 20; do
16554        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16555        if test "x$ISLINK" == x; then
16556          # This is not a symbolic link! We are done!
16557          break
16558        fi
16559        # Again resolve directory symlinks since the target of the just found
16560        # link could be in a different directory
16561        cd `$DIRNAME $ISLINK`
16562        sym_link_dir=`$THEPWDCMD -P`
16563        sym_link_file=`$BASENAME $ISLINK`
16564        let COUNTER=COUNTER+1
16565      done
16566      cd $STARTDIR
16567      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16568    fi
16569  fi
16570
16571
16572
16573  # Locate the directory of this script.
16574  AUTOCONF_DIR=$TOPDIR/common/autoconf
16575
16576  # Setup username (for use in adhoc version strings etc)
16577  # Outer [ ] to quote m4.
16578   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16579
16580
16581
16582# Check if it's a pure open build or if custom sources are to be used.
16583
16584  # Check whether --enable-openjdk-only was given.
16585if test "${enable_openjdk_only+set}" = set; then :
16586  enableval=$enable_openjdk_only;
16587else
16588  enable_openjdk_only="no"
16589fi
16590
16591
16592  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16593$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16595$as_echo "$enable_openjdk_only" >&6; }
16596  if test "x$enable_openjdk_only" = "xyes"; then
16597    SUPPRESS_CUSTOM_EXTENSIONS="true"
16598  elif test "x$enable_openjdk_only" = "xno"; then
16599    SUPPRESS_CUSTOM_EXTENSIONS="false"
16600  else
16601    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16602  fi
16603
16604  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16605  # the IncludeCustomExtension macro.
16606
16607
16608# Check whether --with-custom-make-dir was given.
16609if test "${with_custom_make_dir+set}" = set; then :
16610  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
16611$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16612fi
16613
16614
16615
16616
16617# These are needed to be able to create a configuration name (and thus the output directory)
16618
16619  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16620$as_echo_n "checking which variant of the JDK to build... " >&6; }
16621
16622# Check whether --with-jdk-variant was given.
16623if test "${with_jdk_variant+set}" = set; then :
16624  withval=$with_jdk_variant;
16625fi
16626
16627
16628  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16629    JDK_VARIANT="normal"
16630  else
16631    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16632  fi
16633
16634
16635
16636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16637$as_echo "$JDK_VARIANT" >&6; }
16638
16639
16640  DEBUG_LEVEL="release"
16641  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16642$as_echo_n "checking which debug level to use... " >&6; }
16643  # Check whether --enable-debug was given.
16644if test "${enable_debug+set}" = set; then :
16645  enableval=$enable_debug;
16646        ENABLE_DEBUG="${enableval}"
16647        DEBUG_LEVEL="fastdebug"
16648
16649else
16650  ENABLE_DEBUG="no"
16651fi
16652
16653
16654
16655# Check whether --with-debug-level was given.
16656if test "${with_debug_level+set}" = set; then :
16657  withval=$with_debug_level;
16658        DEBUG_LEVEL="${withval}"
16659        if test "x$ENABLE_DEBUG" = xyes; then
16660          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16661        fi
16662
16663fi
16664
16665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16666$as_echo "$DEBUG_LEVEL" >&6; }
16667
16668  if test "x$DEBUG_LEVEL" != xrelease && \
16669      test "x$DEBUG_LEVEL" != xoptimized && \
16670      test "x$DEBUG_LEVEL" != xfastdebug && \
16671      test "x$DEBUG_LEVEL" != xslowdebug; then
16672    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16673  fi
16674
16675  # Translate DEBUG_LEVEL to debug level used by Hotspot
16676  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16677  if test "x$DEBUG_LEVEL" = xrelease; then
16678    HOTSPOT_DEBUG_LEVEL="product"
16679  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16680    HOTSPOT_DEBUG_LEVEL="debug"
16681  fi
16682
16683  if test "x$DEBUG_LEVEL" = xoptimized; then
16684    # The debug level 'optimized' is a little special because it is currently only
16685    # applicable to the HotSpot build where it means to build a completely
16686    # optimized version of the VM without any debugging code (like for the
16687    # 'release' debug level which is called 'product' in the HotSpot build) but
16688    # with the exception that it can contain additional code which is otherwise
16689    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16690    # test new and/or experimental features which are not intended for customer
16691    # shipment. Because these new features need to be tested and benchmarked in
16692    # real world scenarios, we want to build the containing JDK at the 'release'
16693    # debug level.
16694    DEBUG_LEVEL="release"
16695  fi
16696
16697
16698
16699
16700
16701
16702# Check whether --with-jvm-variants was given.
16703if test "${with_jvm_variants+set}" = set; then :
16704  withval=$with_jvm_variants;
16705fi
16706
16707
16708  if test "x$with_jvm_variants" = x; then
16709    with_jvm_variants="server"
16710  fi
16711  JVM_VARIANTS_OPT="$with_jvm_variants"
16712
16713  # Has the user listed more than one variant?
16714  # Additional [] needed to keep m4 from mangling shell constructs.
16715  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16716    BUILDING_MULTIPLE_JVM_VARIANTS=true
16717  else
16718    BUILDING_MULTIPLE_JVM_VARIANTS=false
16719  fi
16720  # Replace the commas with AND for use in the build directory name.
16721  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16722
16723  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16724$as_echo_n "checking which variants of the JVM to build... " >&6; }
16725  # JVM_VARIANTS is a space-separated list.
16726  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16727  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16729$as_echo "$JVM_VARIANTS" >&6; }
16730
16731  # Check that the selected variants are valid
16732
16733  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16734  # Notice that the original variant failes on SLES 10 and 11
16735  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16736  STACK=${JVM_VARIANTS// /$'\n'}
16737  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16738  if test "x$INVALID_VARIANTS" != x; then
16739    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16740$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16741    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16742  fi
16743
16744  # All "special" variants share the same output directory ("server")
16745  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16746  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16747  STACK=${JVM_VARIANTS// /$'\n'}
16748  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16749  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16750    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16751  fi
16752
16753  # The "main" variant is the one used by other libs to link against during the
16754  # build.
16755  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16756    MAIN_VARIANT_PRIO_ORDER="server client minimal"
16757    for variant in $MAIN_VARIANT_PRIO_ORDER; do
16758      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16759        JVM_VARIANT_MAIN="$variant"
16760        break
16761      fi
16762    done
16763  else
16764    JVM_VARIANT_MAIN="$JVM_VARIANTS"
16765  fi
16766
16767
16768
16769
16770
16771  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16772    # zero behaves as a platform and rewrites these values. This is really weird. :(
16773    # We are guaranteed that we do not build any other variants when building zero.
16774    HOTSPOT_TARGET_CPU=zero
16775    HOTSPOT_TARGET_CPU_ARCH=zero
16776  fi
16777
16778
16779# With basic setup done, call the custom early hook.
16780
16781
16782# Check if we have devkits, extra paths or sysroot set.
16783
16784
16785# Check whether --with-devkit was given.
16786if test "${with_devkit+set}" = set; then :
16787  withval=$with_devkit;
16788
16789  # Only process if variable expands to non-empty
16790
16791  if test "x$with_devkit" != x; then
16792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16793
16794  # Input might be given as Windows format, start by converting to
16795  # unix format.
16796  path="$with_devkit"
16797  new_path=`$CYGPATH -u "$path"`
16798
16799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16802  # "foo.exe" is OK but "foo" is an error.
16803  #
16804  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16805  # It is also a way to make sure we got the proper file name for the real test later on.
16806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16807  if test "x$test_shortpath" = x; then
16808    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16809$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16810    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16811  fi
16812
16813  # Call helper function which possibly converts this using DOS-style short mode.
16814  # If so, the updated path is stored in $new_path.
16815
16816  input_path="$new_path"
16817  # Check if we need to convert this using DOS-style short mode. If the path
16818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16819  # take no chances and rewrite it.
16820  # Note: m4 eats our [], so we need to use [ and ] instead.
16821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16822  if test "x$has_forbidden_chars" != x; then
16823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16824    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16827      # Going to short mode and back again did indeed matter. Since short mode is
16828      # case insensitive, let's make it lowercase to improve readability.
16829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16830      # Now convert it back to Unix-style (cygpath)
16831      input_path=`$CYGPATH -u "$shortmode_path"`
16832      new_path="$input_path"
16833    fi
16834  fi
16835
16836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16837  if test "x$test_cygdrive_prefix" = x; then
16838    # As a simple fix, exclude /usr/bin since it's not a real path.
16839    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16841      # a path prefixed by /cygdrive for fixpath to work.
16842      new_path="$CYGWIN_ROOT_PATH$input_path"
16843    fi
16844  fi
16845
16846
16847  if test "x$path" != "x$new_path"; then
16848    with_devkit="$new_path"
16849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16850$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16851  fi
16852
16853    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16854
16855  path="$with_devkit"
16856  has_colon=`$ECHO $path | $GREP ^.:`
16857  new_path="$path"
16858  if test "x$has_colon" = x; then
16859    # Not in mixed or Windows style, start by that.
16860    new_path=`cmd //c echo $path`
16861  fi
16862
16863
16864  input_path="$new_path"
16865  # Check if we need to convert this using DOS-style short mode. If the path
16866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16867  # take no chances and rewrite it.
16868  # Note: m4 eats our [], so we need to use [ and ] instead.
16869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16870  if test "x$has_forbidden_chars" != x; then
16871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16873  fi
16874
16875
16876  windows_path="$new_path"
16877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16878    unix_path=`$CYGPATH -u "$windows_path"`
16879    new_path="$unix_path"
16880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16882    new_path="$unix_path"
16883  fi
16884
16885  if test "x$path" != "x$new_path"; then
16886    with_devkit="$new_path"
16887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16888$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16889  fi
16890
16891  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16892  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16893
16894    else
16895      # We're on a unix platform. Hooray! :)
16896      path="$with_devkit"
16897      has_space=`$ECHO "$path" | $GREP " "`
16898      if test "x$has_space" != x; then
16899        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16900$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16901        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16902      fi
16903
16904      # Use eval to expand a potential ~
16905      eval path="$path"
16906      if test ! -f "$path" && test ! -d "$path"; then
16907        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16908      fi
16909
16910      if test -d "$path"; then
16911        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16912      else
16913        dir="`$DIRNAME "$path"`"
16914        base="`$BASENAME "$path"`"
16915        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16916      fi
16917    fi
16918  fi
16919
16920        DEVKIT_ROOT="$with_devkit"
16921        # Check for a meta data info file in the root of the devkit
16922        if test -f "$DEVKIT_ROOT/devkit.info"; then
16923          . $DEVKIT_ROOT/devkit.info
16924          # This potentially sets the following:
16925          # A descriptive name of the devkit
16926
16927  if test "x$DEVKIT_NAME" = x; then
16928    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16929  fi
16930
16931          # Corresponds to --with-extra-path
16932
16933  if test "x$DEVKIT_EXTRA_PATH" = x; then
16934    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16935  fi
16936
16937          # Corresponds to --with-toolchain-path
16938
16939  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16940    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16941  fi
16942
16943          # Corresponds to --with-sysroot
16944
16945  if test "x$DEVKIT_SYSROOT" = x; then
16946    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16947  fi
16948
16949
16950          # Identifies the Visual Studio version in the devkit
16951
16952  if test "x$DEVKIT_VS_VERSION" = x; then
16953    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16954  fi
16955
16956          # The Visual Studio include environment variable
16957
16958  if test "x$DEVKIT_VS_INCLUDE" = x; then
16959    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16960  fi
16961
16962          # The Visual Studio lib environment variable
16963
16964  if test "x$DEVKIT_VS_LIB" = x; then
16965    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16966  fi
16967
16968          # Corresponds to --with-msvcr-dll
16969
16970  if test "x$DEVKIT_MSVCR_DLL" = x; then
16971    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16972  fi
16973
16974          # Corresponds to --with-msvcp-dll
16975
16976  if test "x$DEVKIT_MSVCP_DLL" = x; then
16977    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16978  fi
16979
16980        fi
16981
16982        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16983$as_echo_n "checking for devkit... " >&6; }
16984        if test "x$DEVKIT_NAME" != x; then
16985          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16986$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16987        else
16988          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16989$as_echo "$DEVKIT_ROOT" >&6; }
16990        fi
16991
16992
16993  if test "x$DEVKIT_EXTRA_PATH" != x; then
16994    if test "x$EXTRA_PATH" = x; then
16995      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16996    else
16997      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16998    fi
16999  fi
17000
17001
17002        # Fallback default of just /bin if DEVKIT_PATH is not defined
17003        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17004          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17005        fi
17006
17007  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17008    if test "x$TOOLCHAIN_PATH" = x; then
17009      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17010    else
17011      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17012    fi
17013  fi
17014
17015
17016        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17017        # places for backwards compatiblity.
17018        if test "x$DEVKIT_SYSROOT" != x; then
17019          SYSROOT="$DEVKIT_SYSROOT"
17020        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17021          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17022        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17023          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17024        fi
17025
17026
17027fi
17028
17029
17030  # You can force the sysroot if the sysroot encoded into the compiler tools
17031  # is not correct.
17032
17033# Check whether --with-sys-root was given.
17034if test "${with_sys_root+set}" = set; then :
17035  withval=$with_sys_root; SYSROOT=$with_sys_root
17036
17037fi
17038
17039
17040
17041# Check whether --with-sysroot was given.
17042if test "${with_sysroot+set}" = set; then :
17043  withval=$with_sysroot; SYSROOT=$with_sysroot
17044
17045fi
17046
17047
17048
17049# Check whether --with-tools-dir was given.
17050if test "${with_tools_dir+set}" = set; then :
17051  withval=$with_tools_dir;
17052  if test "x$with_tools_dir" != x; then
17053    if test "x$TOOLCHAIN_PATH" = x; then
17054      TOOLCHAIN_PATH="$with_tools_dir"
17055    else
17056      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17057    fi
17058  fi
17059
17060
17061fi
17062
17063
17064
17065# Check whether --with-toolchain-path was given.
17066if test "${with_toolchain_path+set}" = set; then :
17067  withval=$with_toolchain_path;
17068  if test "x$with_toolchain_path" != x; then
17069    if test "x$TOOLCHAIN_PATH" = x; then
17070      TOOLCHAIN_PATH="$with_toolchain_path"
17071    else
17072      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17073    fi
17074  fi
17075
17076
17077fi
17078
17079
17080
17081# Check whether --with-extra-path was given.
17082if test "${with_extra_path+set}" = set; then :
17083  withval=$with_extra_path;
17084  if test "x$with_extra_path" != x; then
17085    if test "x$EXTRA_PATH" = x; then
17086      EXTRA_PATH="$with_extra_path"
17087    else
17088      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17089    fi
17090  fi
17091
17092
17093fi
17094
17095
17096  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17097    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17098    # If not, detect if Xcode is installed by running xcodebuild -version
17099    # if no Xcode installed, xcodebuild exits with 1
17100    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17101    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17102      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17103      # fall back on the stub binary in /usr/bin/xcodebuild
17104      # Extract the first word of "xcodebuild", so it can be a program name with args.
17105set dummy xcodebuild; ac_word=$2
17106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17107$as_echo_n "checking for $ac_word... " >&6; }
17108if ${ac_cv_path_XCODEBUILD+:} false; then :
17109  $as_echo_n "(cached) " >&6
17110else
17111  case $XCODEBUILD in
17112  [\\/]* | ?:[\\/]*)
17113  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17114  ;;
17115  *)
17116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17117for as_dir in $TOOLCHAIN_PATH
17118do
17119  IFS=$as_save_IFS
17120  test -z "$as_dir" && as_dir=.
17121    for ac_exec_ext in '' $ac_executable_extensions; do
17122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17123    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17125    break 2
17126  fi
17127done
17128  done
17129IFS=$as_save_IFS
17130
17131  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17132  ;;
17133esac
17134fi
17135XCODEBUILD=$ac_cv_path_XCODEBUILD
17136if test -n "$XCODEBUILD"; then
17137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17138$as_echo "$XCODEBUILD" >&6; }
17139else
17140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17141$as_echo "no" >&6; }
17142fi
17143
17144
17145    else
17146      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17147      # when only the command line tools are installed there are no SDKs, so headers
17148      # are copied into the system frameworks
17149      XCODEBUILD=
17150
17151    fi
17152
17153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17154$as_echo_n "checking for sdk name... " >&6; }
17155
17156# Check whether --with-sdk-name was given.
17157if test "${with_sdk_name+set}" = set; then :
17158  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17159
17160fi
17161
17162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17163$as_echo "$SDKNAME" >&6; }
17164
17165    # if toolchain path is specified then don't rely on system headers, they may not compile
17166    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17167    test -z "$TOOLCHAIN_PATH" && \
17168      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17169
17170    if test -z "$SYSROOT"; then
17171      if test -n "$XCODEBUILD"; then
17172        # if we don't have system headers, use default SDK name (last resort)
17173        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17174          SDKNAME=${SDKNAME:-macosx}
17175        fi
17176
17177        if test -n "$SDKNAME"; then
17178          # Call xcodebuild to determine SYSROOT
17179          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17180        fi
17181      else
17182        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17183          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
17184        fi
17185      fi
17186    else
17187      # warn user if --with-sdk-name was also set
17188      if test -n "$with_sdk_name"; then
17189        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17190$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17191      fi
17192    fi
17193
17194    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17195      # If no system framework headers, then SYSROOT must be set, or we won't build
17196      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
17197    fi
17198
17199    # Perform a basic sanity test
17200    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17201      if test -z "$SYSROOT"; then
17202        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
17203      else
17204        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17205      fi
17206    fi
17207
17208    # set SDKROOT too, Xcode tools will pick it up
17209    SDKROOT=$SYSROOT
17210
17211  fi
17212
17213  # Prepend the extra path to the global path
17214
17215  if test "x$EXTRA_PATH" != x; then
17216    if test "x$PATH" = x; then
17217      PATH="$EXTRA_PATH"
17218    else
17219      PATH="$EXTRA_PATH:$PATH"
17220    fi
17221  fi
17222
17223
17224  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17225$as_echo_n "checking for sysroot... " >&6; }
17226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17227$as_echo "$SYSROOT" >&6; }
17228  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17229$as_echo_n "checking for toolchain path... " >&6; }
17230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17231$as_echo "$TOOLCHAIN_PATH" >&6; }
17232  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17233$as_echo_n "checking for extra path... " >&6; }
17234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17235$as_echo "$EXTRA_PATH" >&6; }
17236
17237
17238# To properly create a configuration name, we need to have the OpenJDK target
17239# and options (variants and debug level) parsed.
17240
17241
17242
17243# Check whether --with-conf-name was given.
17244if test "${with_conf_name+set}" = set; then :
17245  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17246fi
17247
17248
17249  # Test from where we are running configure, in or outside of src root.
17250  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17251$as_echo_n "checking where to store configuration... " >&6; }
17252  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17253      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17254      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17255    # We are running configure from the src root.
17256    # Create a default ./build/target-variant-debuglevel output root.
17257    if test "x${CONF_NAME}" = x; then
17258      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17259$as_echo "in default location" >&6; }
17260      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17261    else
17262      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17263$as_echo "in build directory with custom name" >&6; }
17264    fi
17265    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17266    $MKDIR -p "$OUTPUT_ROOT"
17267    if test ! -d "$OUTPUT_ROOT"; then
17268      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17269    fi
17270  else
17271    # We are running configure from outside of the src dir.
17272    # Then use the current directory as output dir!
17273    # If configuration is situated in normal build directory, just use the build
17274    # directory name as configuration name, otherwise use the complete path.
17275    if test "x${CONF_NAME}" = x; then
17276      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17277    fi
17278    OUTPUT_ROOT="$CURDIR"
17279    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17280$as_echo "in current directory" >&6; }
17281
17282    # WARNING: This might be a bad thing to do. You need to be sure you want to
17283    # have a configuration in this directory. Do some sanity checks!
17284
17285    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17286      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17287      # other files
17288      files_present=`$LS $OUTPUT_ROOT`
17289      # Configure has already touched config.log and confdefs.h in the current dir when this check
17290      # is performed.
17291      filtered_files=`$ECHO "$files_present" \
17292          | $SED -e 's/config.log//g' \
17293              -e 's/configure.log//g' \
17294              -e 's/confdefs.h//g' \
17295              -e 's/ //g' \
17296          | $TR -d '\n'`
17297      if test "x$filtered_files" != x; then
17298        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17299$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17300        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17301$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17302        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17303$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17304        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17305$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17306        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17307$as_echo "$as_me: seriously mess up just about everything." >&6;}
17308        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17309$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17310        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17311$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17312        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17313      fi
17314    fi
17315  fi
17316  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17317$as_echo_n "checking what configuration name to use... " >&6; }
17318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17319$as_echo "$CONF_NAME" >&6; }
17320
17321
17322  # Only process if variable expands to non-empty
17323
17324  if test "x$OUTPUT_ROOT" != x; then
17325    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17326
17327  # Input might be given as Windows format, start by converting to
17328  # unix format.
17329  path="$OUTPUT_ROOT"
17330  new_path=`$CYGPATH -u "$path"`
17331
17332  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17333  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17334  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17335  # "foo.exe" is OK but "foo" is an error.
17336  #
17337  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17338  # It is also a way to make sure we got the proper file name for the real test later on.
17339  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17340  if test "x$test_shortpath" = x; then
17341    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17342$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17343    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17344  fi
17345
17346  # Call helper function which possibly converts this using DOS-style short mode.
17347  # If so, the updated path is stored in $new_path.
17348
17349  input_path="$new_path"
17350  # Check if we need to convert this using DOS-style short mode. If the path
17351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17352  # take no chances and rewrite it.
17353  # Note: m4 eats our [], so we need to use [ and ] instead.
17354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17355  if test "x$has_forbidden_chars" != x; then
17356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17357    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17358    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17359    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17360      # Going to short mode and back again did indeed matter. Since short mode is
17361      # case insensitive, let's make it lowercase to improve readability.
17362      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17363      # Now convert it back to Unix-style (cygpath)
17364      input_path=`$CYGPATH -u "$shortmode_path"`
17365      new_path="$input_path"
17366    fi
17367  fi
17368
17369  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17370  if test "x$test_cygdrive_prefix" = x; then
17371    # As a simple fix, exclude /usr/bin since it's not a real path.
17372    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17373      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17374      # a path prefixed by /cygdrive for fixpath to work.
17375      new_path="$CYGWIN_ROOT_PATH$input_path"
17376    fi
17377  fi
17378
17379
17380  if test "x$path" != "x$new_path"; then
17381    OUTPUT_ROOT="$new_path"
17382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17383$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17384  fi
17385
17386    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17387
17388  path="$OUTPUT_ROOT"
17389  has_colon=`$ECHO $path | $GREP ^.:`
17390  new_path="$path"
17391  if test "x$has_colon" = x; then
17392    # Not in mixed or Windows style, start by that.
17393    new_path=`cmd //c echo $path`
17394  fi
17395
17396
17397  input_path="$new_path"
17398  # Check if we need to convert this using DOS-style short mode. If the path
17399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17400  # take no chances and rewrite it.
17401  # Note: m4 eats our [], so we need to use [ and ] instead.
17402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17403  if test "x$has_forbidden_chars" != x; then
17404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17405    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17406  fi
17407
17408
17409  windows_path="$new_path"
17410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17411    unix_path=`$CYGPATH -u "$windows_path"`
17412    new_path="$unix_path"
17413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17415    new_path="$unix_path"
17416  fi
17417
17418  if test "x$path" != "x$new_path"; then
17419    OUTPUT_ROOT="$new_path"
17420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17421$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17422  fi
17423
17424  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17425  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17426
17427    else
17428      # We're on a unix platform. Hooray! :)
17429      path="$OUTPUT_ROOT"
17430      has_space=`$ECHO "$path" | $GREP " "`
17431      if test "x$has_space" != x; then
17432        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17433$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17434        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17435      fi
17436
17437      # Use eval to expand a potential ~
17438      eval path="$path"
17439      if test ! -f "$path" && test ! -d "$path"; then
17440        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17441      fi
17442
17443      if test -d "$path"; then
17444        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17445      else
17446        dir="`$DIRNAME "$path"`"
17447        base="`$BASENAME "$path"`"
17448        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17449      fi
17450    fi
17451  fi
17452
17453
17454  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17455  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17456
17457  SPEC=$OUTPUT_ROOT/spec.gmk
17458
17459  CONF_NAME=$CONF_NAME
17460
17461  OUTPUT_ROOT=$OUTPUT_ROOT
17462
17463
17464
17465  # The spec.gmk file contains all variables for the make system.
17466  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17467
17468  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17469  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17470
17471  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17472  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17473
17474  # The compare.sh is used to compare the build output to other builds.
17475  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17476
17477  # The generated Makefile knows where the spec.gmk is and where the source is.
17478  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17479  # which will look for generated configurations
17480  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17481
17482
17483
17484# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17485
17486  for ac_prog in apt-get yum port pkgutil pkgadd
17487do
17488  # Extract the first word of "$ac_prog", so it can be a program name with args.
17489set dummy $ac_prog; ac_word=$2
17490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17491$as_echo_n "checking for $ac_word... " >&6; }
17492if ${ac_cv_prog_PKGHANDLER+:} false; then :
17493  $as_echo_n "(cached) " >&6
17494else
17495  if test -n "$PKGHANDLER"; then
17496  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17497else
17498as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17499for as_dir in $PATH
17500do
17501  IFS=$as_save_IFS
17502  test -z "$as_dir" && as_dir=.
17503    for ac_exec_ext in '' $ac_executable_extensions; do
17504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17505    ac_cv_prog_PKGHANDLER="$ac_prog"
17506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17507    break 2
17508  fi
17509done
17510  done
17511IFS=$as_save_IFS
17512
17513fi
17514fi
17515PKGHANDLER=$ac_cv_prog_PKGHANDLER
17516if test -n "$PKGHANDLER"; then
17517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17518$as_echo "$PKGHANDLER" >&6; }
17519else
17520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17521$as_echo "no" >&6; }
17522fi
17523
17524
17525  test -n "$PKGHANDLER" && break
17526done
17527
17528
17529
17530# Setup tools that requires more complex handling, or that is not needed by the configure script.
17531
17532
17533
17534  # Publish this variable in the help.
17535
17536
17537  if [ -z "${MAKE+x}" ]; then
17538    # The variable is not set by user, try to locate tool using the code snippet
17539
17540    # Try our hardest to locate a correct version of GNU make
17541    for ac_prog in gmake
17542do
17543  # Extract the first word of "$ac_prog", so it can be a program name with args.
17544set dummy $ac_prog; ac_word=$2
17545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17546$as_echo_n "checking for $ac_word... " >&6; }
17547if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17548  $as_echo_n "(cached) " >&6
17549else
17550  case $CHECK_GMAKE in
17551  [\\/]* | ?:[\\/]*)
17552  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17553  ;;
17554  *)
17555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17556for as_dir in $PATH
17557do
17558  IFS=$as_save_IFS
17559  test -z "$as_dir" && as_dir=.
17560    for ac_exec_ext in '' $ac_executable_extensions; do
17561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17562    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17564    break 2
17565  fi
17566done
17567  done
17568IFS=$as_save_IFS
17569
17570  ;;
17571esac
17572fi
17573CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17574if test -n "$CHECK_GMAKE"; then
17575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17576$as_echo "$CHECK_GMAKE" >&6; }
17577else
17578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17579$as_echo "no" >&6; }
17580fi
17581
17582
17583  test -n "$CHECK_GMAKE" && break
17584done
17585
17586
17587  MAKE_CANDIDATE=""$CHECK_GMAKE""
17588  DESCRIPTION="gmake in PATH"
17589
17590  # On Cygwin, we require a newer version of make than on other platforms
17591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17592    MAKE_VERSION_EXPR="-e 4\."
17593    MAKE_REQUIRED_VERSION="4.0"
17594   else
17595    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17596    MAKE_REQUIRED_VERSION="3.81"
17597  fi
17598
17599  if test "x$MAKE_CANDIDATE" != x; then
17600    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17601$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17602    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17603    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17604    if test "x$IS_GNU_MAKE" = x; then
17605      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17606$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17607    else
17608      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17609      if test "x$IS_MODERN_MAKE" = x; then
17610        { $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
17611$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;}
17612      else
17613        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17614          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17615            MAKE_EXPECTED_ENV='cygwin'
17616          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17617            MAKE_EXPECTED_ENV='msys'
17618          else
17619            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17620          fi
17621          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17622          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17623        else
17624          # Not relevant for non-Windows
17625          IS_MAKE_CORRECT_ENV=true
17626        fi
17627        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17628          { $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
17629$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;}
17630        else
17631          FOUND_MAKE=$MAKE_CANDIDATE
17632
17633  # Only process if variable expands to non-empty
17634
17635  if test "x$FOUND_MAKE" != x; then
17636    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17637
17638  # First separate the path from the arguments. This will split at the first
17639  # space.
17640  complete="$FOUND_MAKE"
17641  path="${complete%% *}"
17642  tmp="$complete EOL"
17643  arguments="${tmp#* }"
17644
17645  # Input might be given as Windows format, start by converting to
17646  # unix format.
17647  new_path=`$CYGPATH -u "$path"`
17648
17649  # Now try to locate executable using which
17650  new_path=`$WHICH "$new_path" 2> /dev/null`
17651  # bat and cmd files are not always considered executable in cygwin causing which
17652  # to not find them
17653  if test "x$new_path" = x \
17654      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17655      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17656    new_path=`$CYGPATH -u "$path"`
17657  fi
17658  if test "x$new_path" = x; then
17659    # Oops. Which didn't find the executable.
17660    # The splitting of arguments from the executable at a space might have been incorrect,
17661    # since paths with space are more likely in Windows. Give it another try with the whole
17662    # argument.
17663    path="$complete"
17664    arguments="EOL"
17665    new_path=`$CYGPATH -u "$path"`
17666    new_path=`$WHICH "$new_path" 2> /dev/null`
17667    # bat and cmd files are not always considered executable in cygwin causing which
17668    # to not find them
17669    if test "x$new_path" = x \
17670        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17671        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17672      new_path=`$CYGPATH -u "$path"`
17673    fi
17674    if test "x$new_path" = x; then
17675      # It's still not found. Now this is an unrecoverable error.
17676      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17677$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17678      has_space=`$ECHO "$complete" | $GREP " "`
17679      if test "x$has_space" != x; then
17680        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17681$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17682      fi
17683      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17684    fi
17685  fi
17686
17687  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17688  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17689  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17690  # "foo.exe" is OK but "foo" is an error.
17691  #
17692  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17693  # It is also a way to make sure we got the proper file name for the real test later on.
17694  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17695  if test "x$test_shortpath" = x; then
17696    # Short path failed, file does not exist as specified.
17697    # Try adding .exe or .cmd
17698    if test -f "${new_path}.exe"; then
17699      input_to_shortpath="${new_path}.exe"
17700    elif test -f "${new_path}.cmd"; then
17701      input_to_shortpath="${new_path}.cmd"
17702    else
17703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17704$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17705      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17706$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17707      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17708    fi
17709  else
17710    input_to_shortpath="$new_path"
17711  fi
17712
17713  # Call helper function which possibly converts this using DOS-style short mode.
17714  # If so, the updated path is stored in $new_path.
17715  new_path="$input_to_shortpath"
17716
17717  input_path="$input_to_shortpath"
17718  # Check if we need to convert this using DOS-style short mode. If the path
17719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17720  # take no chances and rewrite it.
17721  # Note: m4 eats our [], so we need to use [ and ] instead.
17722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17723  if test "x$has_forbidden_chars" != x; then
17724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17725    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17726    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17727    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17728      # Going to short mode and back again did indeed matter. Since short mode is
17729      # case insensitive, let's make it lowercase to improve readability.
17730      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17731      # Now convert it back to Unix-style (cygpath)
17732      input_path=`$CYGPATH -u "$shortmode_path"`
17733      new_path="$input_path"
17734    fi
17735  fi
17736
17737  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17738  if test "x$test_cygdrive_prefix" = x; then
17739    # As a simple fix, exclude /usr/bin since it's not a real path.
17740    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17741      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17742      # a path prefixed by /cygdrive for fixpath to work.
17743      new_path="$CYGWIN_ROOT_PATH$input_path"
17744    fi
17745  fi
17746
17747  # remove trailing .exe if any
17748  new_path="${new_path/%.exe/}"
17749
17750    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17751
17752  # First separate the path from the arguments. This will split at the first
17753  # space.
17754  complete="$FOUND_MAKE"
17755  path="${complete%% *}"
17756  tmp="$complete EOL"
17757  arguments="${tmp#* }"
17758
17759  # Input might be given as Windows format, start by converting to
17760  # unix format.
17761  new_path="$path"
17762
17763  windows_path="$new_path"
17764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17765    unix_path=`$CYGPATH -u "$windows_path"`
17766    new_path="$unix_path"
17767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17769    new_path="$unix_path"
17770  fi
17771
17772
17773  # Now try to locate executable using which
17774  new_path=`$WHICH "$new_path" 2> /dev/null`
17775
17776  if test "x$new_path" = x; then
17777    # Oops. Which didn't find the executable.
17778    # The splitting of arguments from the executable at a space might have been incorrect,
17779    # since paths with space are more likely in Windows. Give it another try with the whole
17780    # argument.
17781    path="$complete"
17782    arguments="EOL"
17783    new_path="$path"
17784
17785  windows_path="$new_path"
17786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17787    unix_path=`$CYGPATH -u "$windows_path"`
17788    new_path="$unix_path"
17789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17791    new_path="$unix_path"
17792  fi
17793
17794
17795    new_path=`$WHICH "$new_path" 2> /dev/null`
17796    # bat and cmd files are not always considered executable in MSYS causing which
17797    # to not find them
17798    if test "x$new_path" = x \
17799        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17800        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17801      new_path="$path"
17802
17803  windows_path="$new_path"
17804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17805    unix_path=`$CYGPATH -u "$windows_path"`
17806    new_path="$unix_path"
17807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17809    new_path="$unix_path"
17810  fi
17811
17812    fi
17813
17814    if test "x$new_path" = x; then
17815      # It's still not found. Now this is an unrecoverable error.
17816      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17817$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17818      has_space=`$ECHO "$complete" | $GREP " "`
17819      if test "x$has_space" != x; then
17820        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17821$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17822      fi
17823      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17824    fi
17825  fi
17826
17827  # Now new_path has a complete unix path to the binary
17828  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17829    # Keep paths in /bin as-is, but remove trailing .exe if any
17830    new_path="${new_path/%.exe/}"
17831    # Do not save /bin paths to all_fixpath_prefixes!
17832  else
17833    # Not in mixed or Windows style, start by that.
17834    new_path=`cmd //c echo $new_path`
17835
17836  input_path="$new_path"
17837  # Check if we need to convert this using DOS-style short mode. If the path
17838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17839  # take no chances and rewrite it.
17840  # Note: m4 eats our [], so we need to use [ and ] instead.
17841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17842  if test "x$has_forbidden_chars" != x; then
17843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17844    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17845  fi
17846
17847    # Output is in $new_path
17848
17849  windows_path="$new_path"
17850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17851    unix_path=`$CYGPATH -u "$windows_path"`
17852    new_path="$unix_path"
17853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17855    new_path="$unix_path"
17856  fi
17857
17858    # remove trailing .exe if any
17859    new_path="${new_path/%.exe/}"
17860
17861    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17862    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17863  fi
17864
17865    else
17866      # We're on a unix platform. Hooray! :)
17867      # First separate the path from the arguments. This will split at the first
17868      # space.
17869      complete="$FOUND_MAKE"
17870      path="${complete%% *}"
17871      tmp="$complete EOL"
17872      arguments="${tmp#* }"
17873
17874      # Cannot rely on the command "which" here since it doesn't always work.
17875      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17876      if test -z "$is_absolute_path"; then
17877        # Path to executable is not absolute. Find it.
17878        IFS_save="$IFS"
17879        IFS=:
17880        for p in $PATH; do
17881          if test -f "$p/$path" && test -x "$p/$path"; then
17882            new_path="$p/$path"
17883            break
17884          fi
17885        done
17886        IFS="$IFS_save"
17887      else
17888        # This is an absolute path, we can use it without further modifications.
17889        new_path="$path"
17890      fi
17891
17892      if test "x$new_path" = x; then
17893        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17894$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17895        has_space=`$ECHO "$complete" | $GREP " "`
17896        if test "x$has_space" != x; then
17897          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17898$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17899        fi
17900        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17901      fi
17902    fi
17903
17904    # Now join together the path and the arguments once again
17905    if test "x$arguments" != xEOL; then
17906      new_complete="$new_path ${arguments% *}"
17907    else
17908      new_complete="$new_path"
17909    fi
17910
17911    if test "x$complete" != "x$new_complete"; then
17912      FOUND_MAKE="$new_complete"
17913      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17914$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17915    fi
17916  fi
17917
17918        fi
17919      fi
17920    fi
17921  fi
17922
17923
17924    if test "x$FOUND_MAKE" = x; then
17925      for ac_prog in make
17926do
17927  # Extract the first word of "$ac_prog", so it can be a program name with args.
17928set dummy $ac_prog; ac_word=$2
17929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17930$as_echo_n "checking for $ac_word... " >&6; }
17931if ${ac_cv_path_CHECK_MAKE+:} false; then :
17932  $as_echo_n "(cached) " >&6
17933else
17934  case $CHECK_MAKE in
17935  [\\/]* | ?:[\\/]*)
17936  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17937  ;;
17938  *)
17939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17940for as_dir in $PATH
17941do
17942  IFS=$as_save_IFS
17943  test -z "$as_dir" && as_dir=.
17944    for ac_exec_ext in '' $ac_executable_extensions; do
17945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17946    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17948    break 2
17949  fi
17950done
17951  done
17952IFS=$as_save_IFS
17953
17954  ;;
17955esac
17956fi
17957CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17958if test -n "$CHECK_MAKE"; then
17959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17960$as_echo "$CHECK_MAKE" >&6; }
17961else
17962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17963$as_echo "no" >&6; }
17964fi
17965
17966
17967  test -n "$CHECK_MAKE" && break
17968done
17969
17970
17971  MAKE_CANDIDATE=""$CHECK_MAKE""
17972  DESCRIPTION="make in PATH"
17973
17974  # On Cygwin, we require a newer version of make than on other platforms
17975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17976    MAKE_VERSION_EXPR="-e 4\."
17977    MAKE_REQUIRED_VERSION="4.0"
17978   else
17979    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17980    MAKE_REQUIRED_VERSION="3.81"
17981  fi
17982
17983  if test "x$MAKE_CANDIDATE" != x; then
17984    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17985$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17986    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17987    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17988    if test "x$IS_GNU_MAKE" = x; then
17989      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17990$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17991    else
17992      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17993      if test "x$IS_MODERN_MAKE" = x; then
17994        { $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
17995$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;}
17996      else
17997        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17998          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17999            MAKE_EXPECTED_ENV='cygwin'
18000          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18001            MAKE_EXPECTED_ENV='msys'
18002          else
18003            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18004          fi
18005          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18006          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18007        else
18008          # Not relevant for non-Windows
18009          IS_MAKE_CORRECT_ENV=true
18010        fi
18011        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18012          { $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
18013$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;}
18014        else
18015          FOUND_MAKE=$MAKE_CANDIDATE
18016
18017  # Only process if variable expands to non-empty
18018
18019  if test "x$FOUND_MAKE" != x; then
18020    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18021
18022  # First separate the path from the arguments. This will split at the first
18023  # space.
18024  complete="$FOUND_MAKE"
18025  path="${complete%% *}"
18026  tmp="$complete EOL"
18027  arguments="${tmp#* }"
18028
18029  # Input might be given as Windows format, start by converting to
18030  # unix format.
18031  new_path=`$CYGPATH -u "$path"`
18032
18033  # Now try to locate executable using which
18034  new_path=`$WHICH "$new_path" 2> /dev/null`
18035  # bat and cmd files are not always considered executable in cygwin causing which
18036  # to not find them
18037  if test "x$new_path" = x \
18038      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18039      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18040    new_path=`$CYGPATH -u "$path"`
18041  fi
18042  if test "x$new_path" = x; then
18043    # Oops. Which didn't find the executable.
18044    # The splitting of arguments from the executable at a space might have been incorrect,
18045    # since paths with space are more likely in Windows. Give it another try with the whole
18046    # argument.
18047    path="$complete"
18048    arguments="EOL"
18049    new_path=`$CYGPATH -u "$path"`
18050    new_path=`$WHICH "$new_path" 2> /dev/null`
18051    # bat and cmd files are not always considered executable in cygwin causing which
18052    # to not find them
18053    if test "x$new_path" = x \
18054        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18055        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18056      new_path=`$CYGPATH -u "$path"`
18057    fi
18058    if test "x$new_path" = x; then
18059      # It's still not found. Now this is an unrecoverable error.
18060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18061$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18062      has_space=`$ECHO "$complete" | $GREP " "`
18063      if test "x$has_space" != x; then
18064        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18065$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18066      fi
18067      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18068    fi
18069  fi
18070
18071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18074  # "foo.exe" is OK but "foo" is an error.
18075  #
18076  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18077  # It is also a way to make sure we got the proper file name for the real test later on.
18078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18079  if test "x$test_shortpath" = x; then
18080    # Short path failed, file does not exist as specified.
18081    # Try adding .exe or .cmd
18082    if test -f "${new_path}.exe"; then
18083      input_to_shortpath="${new_path}.exe"
18084    elif test -f "${new_path}.cmd"; then
18085      input_to_shortpath="${new_path}.cmd"
18086    else
18087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18088$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18089      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18090$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18091      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18092    fi
18093  else
18094    input_to_shortpath="$new_path"
18095  fi
18096
18097  # Call helper function which possibly converts this using DOS-style short mode.
18098  # If so, the updated path is stored in $new_path.
18099  new_path="$input_to_shortpath"
18100
18101  input_path="$input_to_shortpath"
18102  # Check if we need to convert this using DOS-style short mode. If the path
18103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18104  # take no chances and rewrite it.
18105  # Note: m4 eats our [], so we need to use [ and ] instead.
18106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18107  if test "x$has_forbidden_chars" != x; then
18108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18112      # Going to short mode and back again did indeed matter. Since short mode is
18113      # case insensitive, let's make it lowercase to improve readability.
18114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18115      # Now convert it back to Unix-style (cygpath)
18116      input_path=`$CYGPATH -u "$shortmode_path"`
18117      new_path="$input_path"
18118    fi
18119  fi
18120
18121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18122  if test "x$test_cygdrive_prefix" = x; then
18123    # As a simple fix, exclude /usr/bin since it's not a real path.
18124    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18126      # a path prefixed by /cygdrive for fixpath to work.
18127      new_path="$CYGWIN_ROOT_PATH$input_path"
18128    fi
18129  fi
18130
18131  # remove trailing .exe if any
18132  new_path="${new_path/%.exe/}"
18133
18134    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18135
18136  # First separate the path from the arguments. This will split at the first
18137  # space.
18138  complete="$FOUND_MAKE"
18139  path="${complete%% *}"
18140  tmp="$complete EOL"
18141  arguments="${tmp#* }"
18142
18143  # Input might be given as Windows format, start by converting to
18144  # unix format.
18145  new_path="$path"
18146
18147  windows_path="$new_path"
18148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18149    unix_path=`$CYGPATH -u "$windows_path"`
18150    new_path="$unix_path"
18151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18153    new_path="$unix_path"
18154  fi
18155
18156
18157  # Now try to locate executable using which
18158  new_path=`$WHICH "$new_path" 2> /dev/null`
18159
18160  if test "x$new_path" = x; then
18161    # Oops. Which didn't find the executable.
18162    # The splitting of arguments from the executable at a space might have been incorrect,
18163    # since paths with space are more likely in Windows. Give it another try with the whole
18164    # argument.
18165    path="$complete"
18166    arguments="EOL"
18167    new_path="$path"
18168
18169  windows_path="$new_path"
18170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18171    unix_path=`$CYGPATH -u "$windows_path"`
18172    new_path="$unix_path"
18173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18175    new_path="$unix_path"
18176  fi
18177
18178
18179    new_path=`$WHICH "$new_path" 2> /dev/null`
18180    # bat and cmd files are not always considered executable in MSYS causing which
18181    # to not find them
18182    if test "x$new_path" = x \
18183        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18184        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18185      new_path="$path"
18186
18187  windows_path="$new_path"
18188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18189    unix_path=`$CYGPATH -u "$windows_path"`
18190    new_path="$unix_path"
18191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18193    new_path="$unix_path"
18194  fi
18195
18196    fi
18197
18198    if test "x$new_path" = x; then
18199      # It's still not found. Now this is an unrecoverable error.
18200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18201$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18202      has_space=`$ECHO "$complete" | $GREP " "`
18203      if test "x$has_space" != x; then
18204        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18205$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18206      fi
18207      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18208    fi
18209  fi
18210
18211  # Now new_path has a complete unix path to the binary
18212  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18213    # Keep paths in /bin as-is, but remove trailing .exe if any
18214    new_path="${new_path/%.exe/}"
18215    # Do not save /bin paths to all_fixpath_prefixes!
18216  else
18217    # Not in mixed or Windows style, start by that.
18218    new_path=`cmd //c echo $new_path`
18219
18220  input_path="$new_path"
18221  # Check if we need to convert this using DOS-style short mode. If the path
18222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18223  # take no chances and rewrite it.
18224  # Note: m4 eats our [], so we need to use [ and ] instead.
18225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18226  if test "x$has_forbidden_chars" != x; then
18227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18229  fi
18230
18231    # Output is in $new_path
18232
18233  windows_path="$new_path"
18234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18235    unix_path=`$CYGPATH -u "$windows_path"`
18236    new_path="$unix_path"
18237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18239    new_path="$unix_path"
18240  fi
18241
18242    # remove trailing .exe if any
18243    new_path="${new_path/%.exe/}"
18244
18245    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18246    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18247  fi
18248
18249    else
18250      # We're on a unix platform. Hooray! :)
18251      # First separate the path from the arguments. This will split at the first
18252      # space.
18253      complete="$FOUND_MAKE"
18254      path="${complete%% *}"
18255      tmp="$complete EOL"
18256      arguments="${tmp#* }"
18257
18258      # Cannot rely on the command "which" here since it doesn't always work.
18259      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18260      if test -z "$is_absolute_path"; then
18261        # Path to executable is not absolute. Find it.
18262        IFS_save="$IFS"
18263        IFS=:
18264        for p in $PATH; do
18265          if test -f "$p/$path" && test -x "$p/$path"; then
18266            new_path="$p/$path"
18267            break
18268          fi
18269        done
18270        IFS="$IFS_save"
18271      else
18272        # This is an absolute path, we can use it without further modifications.
18273        new_path="$path"
18274      fi
18275
18276      if test "x$new_path" = x; then
18277        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18278$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18279        has_space=`$ECHO "$complete" | $GREP " "`
18280        if test "x$has_space" != x; then
18281          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18282$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18283        fi
18284        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18285      fi
18286    fi
18287
18288    # Now join together the path and the arguments once again
18289    if test "x$arguments" != xEOL; then
18290      new_complete="$new_path ${arguments% *}"
18291    else
18292      new_complete="$new_path"
18293    fi
18294
18295    if test "x$complete" != "x$new_complete"; then
18296      FOUND_MAKE="$new_complete"
18297      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18298$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18299    fi
18300  fi
18301
18302        fi
18303      fi
18304    fi
18305  fi
18306
18307    fi
18308
18309    if test "x$FOUND_MAKE" = x; then
18310      if test "x$TOOLCHAIN_PATH" != x; then
18311        # We have a toolchain path, check that as well before giving up.
18312        OLD_PATH=$PATH
18313        PATH=$TOOLCHAIN_PATH:$PATH
18314        for ac_prog in gmake
18315do
18316  # Extract the first word of "$ac_prog", so it can be a program name with args.
18317set dummy $ac_prog; ac_word=$2
18318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18319$as_echo_n "checking for $ac_word... " >&6; }
18320if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18321  $as_echo_n "(cached) " >&6
18322else
18323  case $CHECK_TOOLSDIR_GMAKE in
18324  [\\/]* | ?:[\\/]*)
18325  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18326  ;;
18327  *)
18328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18329for as_dir in $PATH
18330do
18331  IFS=$as_save_IFS
18332  test -z "$as_dir" && as_dir=.
18333    for ac_exec_ext in '' $ac_executable_extensions; do
18334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18335    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18337    break 2
18338  fi
18339done
18340  done
18341IFS=$as_save_IFS
18342
18343  ;;
18344esac
18345fi
18346CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18347if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18349$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18350else
18351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18352$as_echo "no" >&6; }
18353fi
18354
18355
18356  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18357done
18358
18359
18360  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18361  DESCRIPTION="gmake in tools-dir"
18362
18363  # On Cygwin, we require a newer version of make than on other platforms
18364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18365    MAKE_VERSION_EXPR="-e 4\."
18366    MAKE_REQUIRED_VERSION="4.0"
18367   else
18368    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18369    MAKE_REQUIRED_VERSION="3.81"
18370  fi
18371
18372  if test "x$MAKE_CANDIDATE" != x; then
18373    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18374$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18375    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18376    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18377    if test "x$IS_GNU_MAKE" = x; then
18378      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18379$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18380    else
18381      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18382      if test "x$IS_MODERN_MAKE" = x; then
18383        { $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
18384$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;}
18385      else
18386        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18387          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18388            MAKE_EXPECTED_ENV='cygwin'
18389          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18390            MAKE_EXPECTED_ENV='msys'
18391          else
18392            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18393          fi
18394          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18395          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18396        else
18397          # Not relevant for non-Windows
18398          IS_MAKE_CORRECT_ENV=true
18399        fi
18400        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18401          { $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
18402$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;}
18403        else
18404          FOUND_MAKE=$MAKE_CANDIDATE
18405
18406  # Only process if variable expands to non-empty
18407
18408  if test "x$FOUND_MAKE" != x; then
18409    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18410
18411  # First separate the path from the arguments. This will split at the first
18412  # space.
18413  complete="$FOUND_MAKE"
18414  path="${complete%% *}"
18415  tmp="$complete EOL"
18416  arguments="${tmp#* }"
18417
18418  # Input might be given as Windows format, start by converting to
18419  # unix format.
18420  new_path=`$CYGPATH -u "$path"`
18421
18422  # Now try to locate executable using which
18423  new_path=`$WHICH "$new_path" 2> /dev/null`
18424  # bat and cmd files are not always considered executable in cygwin causing which
18425  # to not find them
18426  if test "x$new_path" = x \
18427      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18428      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18429    new_path=`$CYGPATH -u "$path"`
18430  fi
18431  if test "x$new_path" = x; then
18432    # Oops. Which didn't find the executable.
18433    # The splitting of arguments from the executable at a space might have been incorrect,
18434    # since paths with space are more likely in Windows. Give it another try with the whole
18435    # argument.
18436    path="$complete"
18437    arguments="EOL"
18438    new_path=`$CYGPATH -u "$path"`
18439    new_path=`$WHICH "$new_path" 2> /dev/null`
18440    # bat and cmd files are not always considered executable in cygwin causing which
18441    # to not find them
18442    if test "x$new_path" = x \
18443        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18444        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18445      new_path=`$CYGPATH -u "$path"`
18446    fi
18447    if test "x$new_path" = x; then
18448      # It's still not found. Now this is an unrecoverable error.
18449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18450$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18451      has_space=`$ECHO "$complete" | $GREP " "`
18452      if test "x$has_space" != x; then
18453        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18454$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18455      fi
18456      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18457    fi
18458  fi
18459
18460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18463  # "foo.exe" is OK but "foo" is an error.
18464  #
18465  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18466  # It is also a way to make sure we got the proper file name for the real test later on.
18467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18468  if test "x$test_shortpath" = x; then
18469    # Short path failed, file does not exist as specified.
18470    # Try adding .exe or .cmd
18471    if test -f "${new_path}.exe"; then
18472      input_to_shortpath="${new_path}.exe"
18473    elif test -f "${new_path}.cmd"; then
18474      input_to_shortpath="${new_path}.cmd"
18475    else
18476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18477$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18478      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18479$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18480      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18481    fi
18482  else
18483    input_to_shortpath="$new_path"
18484  fi
18485
18486  # Call helper function which possibly converts this using DOS-style short mode.
18487  # If so, the updated path is stored in $new_path.
18488  new_path="$input_to_shortpath"
18489
18490  input_path="$input_to_shortpath"
18491  # Check if we need to convert this using DOS-style short mode. If the path
18492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18493  # take no chances and rewrite it.
18494  # Note: m4 eats our [], so we need to use [ and ] instead.
18495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18496  if test "x$has_forbidden_chars" != x; then
18497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18498    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18499    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18500    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18501      # Going to short mode and back again did indeed matter. Since short mode is
18502      # case insensitive, let's make it lowercase to improve readability.
18503      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18504      # Now convert it back to Unix-style (cygpath)
18505      input_path=`$CYGPATH -u "$shortmode_path"`
18506      new_path="$input_path"
18507    fi
18508  fi
18509
18510  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18511  if test "x$test_cygdrive_prefix" = x; then
18512    # As a simple fix, exclude /usr/bin since it's not a real path.
18513    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18514      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18515      # a path prefixed by /cygdrive for fixpath to work.
18516      new_path="$CYGWIN_ROOT_PATH$input_path"
18517    fi
18518  fi
18519
18520  # remove trailing .exe if any
18521  new_path="${new_path/%.exe/}"
18522
18523    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18524
18525  # First separate the path from the arguments. This will split at the first
18526  # space.
18527  complete="$FOUND_MAKE"
18528  path="${complete%% *}"
18529  tmp="$complete EOL"
18530  arguments="${tmp#* }"
18531
18532  # Input might be given as Windows format, start by converting to
18533  # unix format.
18534  new_path="$path"
18535
18536  windows_path="$new_path"
18537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18538    unix_path=`$CYGPATH -u "$windows_path"`
18539    new_path="$unix_path"
18540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18542    new_path="$unix_path"
18543  fi
18544
18545
18546  # Now try to locate executable using which
18547  new_path=`$WHICH "$new_path" 2> /dev/null`
18548
18549  if test "x$new_path" = x; then
18550    # Oops. Which didn't find the executable.
18551    # The splitting of arguments from the executable at a space might have been incorrect,
18552    # since paths with space are more likely in Windows. Give it another try with the whole
18553    # argument.
18554    path="$complete"
18555    arguments="EOL"
18556    new_path="$path"
18557
18558  windows_path="$new_path"
18559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18560    unix_path=`$CYGPATH -u "$windows_path"`
18561    new_path="$unix_path"
18562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18564    new_path="$unix_path"
18565  fi
18566
18567
18568    new_path=`$WHICH "$new_path" 2> /dev/null`
18569    # bat and cmd files are not always considered executable in MSYS causing which
18570    # to not find them
18571    if test "x$new_path" = x \
18572        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18573        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18574      new_path="$path"
18575
18576  windows_path="$new_path"
18577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18578    unix_path=`$CYGPATH -u "$windows_path"`
18579    new_path="$unix_path"
18580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18582    new_path="$unix_path"
18583  fi
18584
18585    fi
18586
18587    if test "x$new_path" = x; then
18588      # It's still not found. Now this is an unrecoverable error.
18589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18590$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18591      has_space=`$ECHO "$complete" | $GREP " "`
18592      if test "x$has_space" != x; then
18593        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18594$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18595      fi
18596      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18597    fi
18598  fi
18599
18600  # Now new_path has a complete unix path to the binary
18601  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18602    # Keep paths in /bin as-is, but remove trailing .exe if any
18603    new_path="${new_path/%.exe/}"
18604    # Do not save /bin paths to all_fixpath_prefixes!
18605  else
18606    # Not in mixed or Windows style, start by that.
18607    new_path=`cmd //c echo $new_path`
18608
18609  input_path="$new_path"
18610  # Check if we need to convert this using DOS-style short mode. If the path
18611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18612  # take no chances and rewrite it.
18613  # Note: m4 eats our [], so we need to use [ and ] instead.
18614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18615  if test "x$has_forbidden_chars" != x; then
18616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18618  fi
18619
18620    # Output is in $new_path
18621
18622  windows_path="$new_path"
18623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18624    unix_path=`$CYGPATH -u "$windows_path"`
18625    new_path="$unix_path"
18626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18628    new_path="$unix_path"
18629  fi
18630
18631    # remove trailing .exe if any
18632    new_path="${new_path/%.exe/}"
18633
18634    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18635    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18636  fi
18637
18638    else
18639      # We're on a unix platform. Hooray! :)
18640      # First separate the path from the arguments. This will split at the first
18641      # space.
18642      complete="$FOUND_MAKE"
18643      path="${complete%% *}"
18644      tmp="$complete EOL"
18645      arguments="${tmp#* }"
18646
18647      # Cannot rely on the command "which" here since it doesn't always work.
18648      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18649      if test -z "$is_absolute_path"; then
18650        # Path to executable is not absolute. Find it.
18651        IFS_save="$IFS"
18652        IFS=:
18653        for p in $PATH; do
18654          if test -f "$p/$path" && test -x "$p/$path"; then
18655            new_path="$p/$path"
18656            break
18657          fi
18658        done
18659        IFS="$IFS_save"
18660      else
18661        # This is an absolute path, we can use it without further modifications.
18662        new_path="$path"
18663      fi
18664
18665      if test "x$new_path" = x; then
18666        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18667$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18668        has_space=`$ECHO "$complete" | $GREP " "`
18669        if test "x$has_space" != x; then
18670          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18671$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18672        fi
18673        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18674      fi
18675    fi
18676
18677    # Now join together the path and the arguments once again
18678    if test "x$arguments" != xEOL; then
18679      new_complete="$new_path ${arguments% *}"
18680    else
18681      new_complete="$new_path"
18682    fi
18683
18684    if test "x$complete" != "x$new_complete"; then
18685      FOUND_MAKE="$new_complete"
18686      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18687$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18688    fi
18689  fi
18690
18691        fi
18692      fi
18693    fi
18694  fi
18695
18696        if test "x$FOUND_MAKE" = x; then
18697          for ac_prog in make
18698do
18699  # Extract the first word of "$ac_prog", so it can be a program name with args.
18700set dummy $ac_prog; ac_word=$2
18701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18702$as_echo_n "checking for $ac_word... " >&6; }
18703if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18704  $as_echo_n "(cached) " >&6
18705else
18706  case $CHECK_TOOLSDIR_MAKE in
18707  [\\/]* | ?:[\\/]*)
18708  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18709  ;;
18710  *)
18711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18712for as_dir in $PATH
18713do
18714  IFS=$as_save_IFS
18715  test -z "$as_dir" && as_dir=.
18716    for ac_exec_ext in '' $ac_executable_extensions; do
18717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18718    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18720    break 2
18721  fi
18722done
18723  done
18724IFS=$as_save_IFS
18725
18726  ;;
18727esac
18728fi
18729CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18730if test -n "$CHECK_TOOLSDIR_MAKE"; then
18731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18732$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18733else
18734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18735$as_echo "no" >&6; }
18736fi
18737
18738
18739  test -n "$CHECK_TOOLSDIR_MAKE" && break
18740done
18741
18742
18743  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18744  DESCRIPTION="make in tools-dir"
18745
18746  # On Cygwin, we require a newer version of make than on other platforms
18747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18748    MAKE_VERSION_EXPR="-e 4\."
18749    MAKE_REQUIRED_VERSION="4.0"
18750   else
18751    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18752    MAKE_REQUIRED_VERSION="3.81"
18753  fi
18754
18755  if test "x$MAKE_CANDIDATE" != x; then
18756    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18757$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18758    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18759    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18760    if test "x$IS_GNU_MAKE" = x; then
18761      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18762$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18763    else
18764      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18765      if test "x$IS_MODERN_MAKE" = x; then
18766        { $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
18767$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;}
18768      else
18769        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18770          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18771            MAKE_EXPECTED_ENV='cygwin'
18772          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18773            MAKE_EXPECTED_ENV='msys'
18774          else
18775            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18776          fi
18777          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18778          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18779        else
18780          # Not relevant for non-Windows
18781          IS_MAKE_CORRECT_ENV=true
18782        fi
18783        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18784          { $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
18785$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;}
18786        else
18787          FOUND_MAKE=$MAKE_CANDIDATE
18788
18789  # Only process if variable expands to non-empty
18790
18791  if test "x$FOUND_MAKE" != x; then
18792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18793
18794  # First separate the path from the arguments. This will split at the first
18795  # space.
18796  complete="$FOUND_MAKE"
18797  path="${complete%% *}"
18798  tmp="$complete EOL"
18799  arguments="${tmp#* }"
18800
18801  # Input might be given as Windows format, start by converting to
18802  # unix format.
18803  new_path=`$CYGPATH -u "$path"`
18804
18805  # Now try to locate executable using which
18806  new_path=`$WHICH "$new_path" 2> /dev/null`
18807  # bat and cmd files are not always considered executable in cygwin causing which
18808  # to not find them
18809  if test "x$new_path" = x \
18810      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18811      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18812    new_path=`$CYGPATH -u "$path"`
18813  fi
18814  if test "x$new_path" = x; then
18815    # Oops. Which didn't find the executable.
18816    # The splitting of arguments from the executable at a space might have been incorrect,
18817    # since paths with space are more likely in Windows. Give it another try with the whole
18818    # argument.
18819    path="$complete"
18820    arguments="EOL"
18821    new_path=`$CYGPATH -u "$path"`
18822    new_path=`$WHICH "$new_path" 2> /dev/null`
18823    # bat and cmd files are not always considered executable in cygwin causing which
18824    # to not find them
18825    if test "x$new_path" = x \
18826        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18827        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18828      new_path=`$CYGPATH -u "$path"`
18829    fi
18830    if test "x$new_path" = x; then
18831      # It's still not found. Now this is an unrecoverable error.
18832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18833$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18834      has_space=`$ECHO "$complete" | $GREP " "`
18835      if test "x$has_space" != x; then
18836        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18837$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18838      fi
18839      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18840    fi
18841  fi
18842
18843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18846  # "foo.exe" is OK but "foo" is an error.
18847  #
18848  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18849  # It is also a way to make sure we got the proper file name for the real test later on.
18850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18851  if test "x$test_shortpath" = x; then
18852    # Short path failed, file does not exist as specified.
18853    # Try adding .exe or .cmd
18854    if test -f "${new_path}.exe"; then
18855      input_to_shortpath="${new_path}.exe"
18856    elif test -f "${new_path}.cmd"; then
18857      input_to_shortpath="${new_path}.cmd"
18858    else
18859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18860$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18861      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18862$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18863      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18864    fi
18865  else
18866    input_to_shortpath="$new_path"
18867  fi
18868
18869  # Call helper function which possibly converts this using DOS-style short mode.
18870  # If so, the updated path is stored in $new_path.
18871  new_path="$input_to_shortpath"
18872
18873  input_path="$input_to_shortpath"
18874  # Check if we need to convert this using DOS-style short mode. If the path
18875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18876  # take no chances and rewrite it.
18877  # Note: m4 eats our [], so we need to use [ and ] instead.
18878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18879  if test "x$has_forbidden_chars" != x; then
18880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18884      # Going to short mode and back again did indeed matter. Since short mode is
18885      # case insensitive, let's make it lowercase to improve readability.
18886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18887      # Now convert it back to Unix-style (cygpath)
18888      input_path=`$CYGPATH -u "$shortmode_path"`
18889      new_path="$input_path"
18890    fi
18891  fi
18892
18893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18894  if test "x$test_cygdrive_prefix" = x; then
18895    # As a simple fix, exclude /usr/bin since it's not a real path.
18896    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18898      # a path prefixed by /cygdrive for fixpath to work.
18899      new_path="$CYGWIN_ROOT_PATH$input_path"
18900    fi
18901  fi
18902
18903  # remove trailing .exe if any
18904  new_path="${new_path/%.exe/}"
18905
18906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18907
18908  # First separate the path from the arguments. This will split at the first
18909  # space.
18910  complete="$FOUND_MAKE"
18911  path="${complete%% *}"
18912  tmp="$complete EOL"
18913  arguments="${tmp#* }"
18914
18915  # Input might be given as Windows format, start by converting to
18916  # unix format.
18917  new_path="$path"
18918
18919  windows_path="$new_path"
18920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18921    unix_path=`$CYGPATH -u "$windows_path"`
18922    new_path="$unix_path"
18923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18925    new_path="$unix_path"
18926  fi
18927
18928
18929  # Now try to locate executable using which
18930  new_path=`$WHICH "$new_path" 2> /dev/null`
18931
18932  if test "x$new_path" = x; then
18933    # Oops. Which didn't find the executable.
18934    # The splitting of arguments from the executable at a space might have been incorrect,
18935    # since paths with space are more likely in Windows. Give it another try with the whole
18936    # argument.
18937    path="$complete"
18938    arguments="EOL"
18939    new_path="$path"
18940
18941  windows_path="$new_path"
18942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18943    unix_path=`$CYGPATH -u "$windows_path"`
18944    new_path="$unix_path"
18945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18947    new_path="$unix_path"
18948  fi
18949
18950
18951    new_path=`$WHICH "$new_path" 2> /dev/null`
18952    # bat and cmd files are not always considered executable in MSYS causing which
18953    # to not find them
18954    if test "x$new_path" = x \
18955        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18956        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18957      new_path="$path"
18958
18959  windows_path="$new_path"
18960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18961    unix_path=`$CYGPATH -u "$windows_path"`
18962    new_path="$unix_path"
18963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18965    new_path="$unix_path"
18966  fi
18967
18968    fi
18969
18970    if test "x$new_path" = x; then
18971      # It's still not found. Now this is an unrecoverable error.
18972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18973$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18974      has_space=`$ECHO "$complete" | $GREP " "`
18975      if test "x$has_space" != x; then
18976        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18977$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18978      fi
18979      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18980    fi
18981  fi
18982
18983  # Now new_path has a complete unix path to the binary
18984  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18985    # Keep paths in /bin as-is, but remove trailing .exe if any
18986    new_path="${new_path/%.exe/}"
18987    # Do not save /bin paths to all_fixpath_prefixes!
18988  else
18989    # Not in mixed or Windows style, start by that.
18990    new_path=`cmd //c echo $new_path`
18991
18992  input_path="$new_path"
18993  # Check if we need to convert this using DOS-style short mode. If the path
18994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18995  # take no chances and rewrite it.
18996  # Note: m4 eats our [], so we need to use [ and ] instead.
18997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18998  if test "x$has_forbidden_chars" != x; then
18999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19001  fi
19002
19003    # Output is in $new_path
19004
19005  windows_path="$new_path"
19006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19007    unix_path=`$CYGPATH -u "$windows_path"`
19008    new_path="$unix_path"
19009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19011    new_path="$unix_path"
19012  fi
19013
19014    # remove trailing .exe if any
19015    new_path="${new_path/%.exe/}"
19016
19017    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19018    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19019  fi
19020
19021    else
19022      # We're on a unix platform. Hooray! :)
19023      # First separate the path from the arguments. This will split at the first
19024      # space.
19025      complete="$FOUND_MAKE"
19026      path="${complete%% *}"
19027      tmp="$complete EOL"
19028      arguments="${tmp#* }"
19029
19030      # Cannot rely on the command "which" here since it doesn't always work.
19031      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19032      if test -z "$is_absolute_path"; then
19033        # Path to executable is not absolute. Find it.
19034        IFS_save="$IFS"
19035        IFS=:
19036        for p in $PATH; do
19037          if test -f "$p/$path" && test -x "$p/$path"; then
19038            new_path="$p/$path"
19039            break
19040          fi
19041        done
19042        IFS="$IFS_save"
19043      else
19044        # This is an absolute path, we can use it without further modifications.
19045        new_path="$path"
19046      fi
19047
19048      if test "x$new_path" = x; then
19049        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19050$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19051        has_space=`$ECHO "$complete" | $GREP " "`
19052        if test "x$has_space" != x; then
19053          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19054$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19055        fi
19056        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19057      fi
19058    fi
19059
19060    # Now join together the path and the arguments once again
19061    if test "x$arguments" != xEOL; then
19062      new_complete="$new_path ${arguments% *}"
19063    else
19064      new_complete="$new_path"
19065    fi
19066
19067    if test "x$complete" != "x$new_complete"; then
19068      FOUND_MAKE="$new_complete"
19069      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19070$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19071    fi
19072  fi
19073
19074        fi
19075      fi
19076    fi
19077  fi
19078
19079        fi
19080        PATH=$OLD_PATH
19081      fi
19082    fi
19083
19084    if test "x$FOUND_MAKE" = x; then
19085      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
19086    fi
19087
19088  else
19089    # The variable is set, but is it from the command line or the environment?
19090
19091    # Try to remove the string !MAKE! from our list.
19092    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19093    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19094      # If it failed, the variable was not from the command line. Ignore it,
19095      # but warn the user (except for BASH, which is always set by the calling BASH).
19096      if test "xMAKE" != xBASH; then
19097        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19098$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19099      fi
19100      # Try to locate tool using the code snippet
19101
19102    # Try our hardest to locate a correct version of GNU make
19103    for ac_prog in gmake
19104do
19105  # Extract the first word of "$ac_prog", so it can be a program name with args.
19106set dummy $ac_prog; ac_word=$2
19107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19108$as_echo_n "checking for $ac_word... " >&6; }
19109if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19110  $as_echo_n "(cached) " >&6
19111else
19112  case $CHECK_GMAKE in
19113  [\\/]* | ?:[\\/]*)
19114  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19115  ;;
19116  *)
19117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19118for as_dir in $PATH
19119do
19120  IFS=$as_save_IFS
19121  test -z "$as_dir" && as_dir=.
19122    for ac_exec_ext in '' $ac_executable_extensions; do
19123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19124    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19126    break 2
19127  fi
19128done
19129  done
19130IFS=$as_save_IFS
19131
19132  ;;
19133esac
19134fi
19135CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19136if test -n "$CHECK_GMAKE"; then
19137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19138$as_echo "$CHECK_GMAKE" >&6; }
19139else
19140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19141$as_echo "no" >&6; }
19142fi
19143
19144
19145  test -n "$CHECK_GMAKE" && break
19146done
19147
19148
19149  MAKE_CANDIDATE=""$CHECK_GMAKE""
19150  DESCRIPTION="gmake in PATH"
19151
19152  # On Cygwin, we require a newer version of make than on other platforms
19153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19154    MAKE_VERSION_EXPR="-e 4\."
19155    MAKE_REQUIRED_VERSION="4.0"
19156   else
19157    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19158    MAKE_REQUIRED_VERSION="3.81"
19159  fi
19160
19161  if test "x$MAKE_CANDIDATE" != x; then
19162    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19163$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19164    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19165    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19166    if test "x$IS_GNU_MAKE" = x; then
19167      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19168$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19169    else
19170      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19171      if test "x$IS_MODERN_MAKE" = x; then
19172        { $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
19173$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;}
19174      else
19175        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19176          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19177            MAKE_EXPECTED_ENV='cygwin'
19178          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19179            MAKE_EXPECTED_ENV='msys'
19180          else
19181            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19182          fi
19183          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19184          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19185        else
19186          # Not relevant for non-Windows
19187          IS_MAKE_CORRECT_ENV=true
19188        fi
19189        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19190          { $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
19191$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;}
19192        else
19193          FOUND_MAKE=$MAKE_CANDIDATE
19194
19195  # Only process if variable expands to non-empty
19196
19197  if test "x$FOUND_MAKE" != x; then
19198    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19199
19200  # First separate the path from the arguments. This will split at the first
19201  # space.
19202  complete="$FOUND_MAKE"
19203  path="${complete%% *}"
19204  tmp="$complete EOL"
19205  arguments="${tmp#* }"
19206
19207  # Input might be given as Windows format, start by converting to
19208  # unix format.
19209  new_path=`$CYGPATH -u "$path"`
19210
19211  # Now try to locate executable using which
19212  new_path=`$WHICH "$new_path" 2> /dev/null`
19213  # bat and cmd files are not always considered executable in cygwin causing which
19214  # to not find them
19215  if test "x$new_path" = x \
19216      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19217      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19218    new_path=`$CYGPATH -u "$path"`
19219  fi
19220  if test "x$new_path" = x; then
19221    # Oops. Which didn't find the executable.
19222    # The splitting of arguments from the executable at a space might have been incorrect,
19223    # since paths with space are more likely in Windows. Give it another try with the whole
19224    # argument.
19225    path="$complete"
19226    arguments="EOL"
19227    new_path=`$CYGPATH -u "$path"`
19228    new_path=`$WHICH "$new_path" 2> /dev/null`
19229    # bat and cmd files are not always considered executable in cygwin causing which
19230    # to not find them
19231    if test "x$new_path" = x \
19232        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19233        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19234      new_path=`$CYGPATH -u "$path"`
19235    fi
19236    if test "x$new_path" = x; then
19237      # It's still not found. Now this is an unrecoverable error.
19238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19239$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19240      has_space=`$ECHO "$complete" | $GREP " "`
19241      if test "x$has_space" != x; then
19242        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19243$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19244      fi
19245      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19246    fi
19247  fi
19248
19249  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19250  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19251  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19252  # "foo.exe" is OK but "foo" is an error.
19253  #
19254  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19255  # It is also a way to make sure we got the proper file name for the real test later on.
19256  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19257  if test "x$test_shortpath" = x; then
19258    # Short path failed, file does not exist as specified.
19259    # Try adding .exe or .cmd
19260    if test -f "${new_path}.exe"; then
19261      input_to_shortpath="${new_path}.exe"
19262    elif test -f "${new_path}.cmd"; then
19263      input_to_shortpath="${new_path}.cmd"
19264    else
19265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19266$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19267      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19268$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19269      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19270    fi
19271  else
19272    input_to_shortpath="$new_path"
19273  fi
19274
19275  # Call helper function which possibly converts this using DOS-style short mode.
19276  # If so, the updated path is stored in $new_path.
19277  new_path="$input_to_shortpath"
19278
19279  input_path="$input_to_shortpath"
19280  # Check if we need to convert this using DOS-style short mode. If the path
19281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19282  # take no chances and rewrite it.
19283  # Note: m4 eats our [], so we need to use [ and ] instead.
19284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19285  if test "x$has_forbidden_chars" != x; then
19286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19287    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19288    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19289    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19290      # Going to short mode and back again did indeed matter. Since short mode is
19291      # case insensitive, let's make it lowercase to improve readability.
19292      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19293      # Now convert it back to Unix-style (cygpath)
19294      input_path=`$CYGPATH -u "$shortmode_path"`
19295      new_path="$input_path"
19296    fi
19297  fi
19298
19299  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19300  if test "x$test_cygdrive_prefix" = x; then
19301    # As a simple fix, exclude /usr/bin since it's not a real path.
19302    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19303      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19304      # a path prefixed by /cygdrive for fixpath to work.
19305      new_path="$CYGWIN_ROOT_PATH$input_path"
19306    fi
19307  fi
19308
19309  # remove trailing .exe if any
19310  new_path="${new_path/%.exe/}"
19311
19312    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19313
19314  # First separate the path from the arguments. This will split at the first
19315  # space.
19316  complete="$FOUND_MAKE"
19317  path="${complete%% *}"
19318  tmp="$complete EOL"
19319  arguments="${tmp#* }"
19320
19321  # Input might be given as Windows format, start by converting to
19322  # unix format.
19323  new_path="$path"
19324
19325  windows_path="$new_path"
19326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19327    unix_path=`$CYGPATH -u "$windows_path"`
19328    new_path="$unix_path"
19329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19331    new_path="$unix_path"
19332  fi
19333
19334
19335  # Now try to locate executable using which
19336  new_path=`$WHICH "$new_path" 2> /dev/null`
19337
19338  if test "x$new_path" = x; then
19339    # Oops. Which didn't find the executable.
19340    # The splitting of arguments from the executable at a space might have been incorrect,
19341    # since paths with space are more likely in Windows. Give it another try with the whole
19342    # argument.
19343    path="$complete"
19344    arguments="EOL"
19345    new_path="$path"
19346
19347  windows_path="$new_path"
19348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19349    unix_path=`$CYGPATH -u "$windows_path"`
19350    new_path="$unix_path"
19351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19353    new_path="$unix_path"
19354  fi
19355
19356
19357    new_path=`$WHICH "$new_path" 2> /dev/null`
19358    # bat and cmd files are not always considered executable in MSYS causing which
19359    # to not find them
19360    if test "x$new_path" = x \
19361        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19362        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19363      new_path="$path"
19364
19365  windows_path="$new_path"
19366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19367    unix_path=`$CYGPATH -u "$windows_path"`
19368    new_path="$unix_path"
19369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19371    new_path="$unix_path"
19372  fi
19373
19374    fi
19375
19376    if test "x$new_path" = x; then
19377      # It's still not found. Now this is an unrecoverable error.
19378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19379$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19380      has_space=`$ECHO "$complete" | $GREP " "`
19381      if test "x$has_space" != x; then
19382        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19383$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19384      fi
19385      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19386    fi
19387  fi
19388
19389  # Now new_path has a complete unix path to the binary
19390  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19391    # Keep paths in /bin as-is, but remove trailing .exe if any
19392    new_path="${new_path/%.exe/}"
19393    # Do not save /bin paths to all_fixpath_prefixes!
19394  else
19395    # Not in mixed or Windows style, start by that.
19396    new_path=`cmd //c echo $new_path`
19397
19398  input_path="$new_path"
19399  # Check if we need to convert this using DOS-style short mode. If the path
19400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19401  # take no chances and rewrite it.
19402  # Note: m4 eats our [], so we need to use [ and ] instead.
19403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19404  if test "x$has_forbidden_chars" != x; then
19405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19406    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19407  fi
19408
19409    # Output is in $new_path
19410
19411  windows_path="$new_path"
19412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19413    unix_path=`$CYGPATH -u "$windows_path"`
19414    new_path="$unix_path"
19415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19417    new_path="$unix_path"
19418  fi
19419
19420    # remove trailing .exe if any
19421    new_path="${new_path/%.exe/}"
19422
19423    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19424    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19425  fi
19426
19427    else
19428      # We're on a unix platform. Hooray! :)
19429      # First separate the path from the arguments. This will split at the first
19430      # space.
19431      complete="$FOUND_MAKE"
19432      path="${complete%% *}"
19433      tmp="$complete EOL"
19434      arguments="${tmp#* }"
19435
19436      # Cannot rely on the command "which" here since it doesn't always work.
19437      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19438      if test -z "$is_absolute_path"; then
19439        # Path to executable is not absolute. Find it.
19440        IFS_save="$IFS"
19441        IFS=:
19442        for p in $PATH; do
19443          if test -f "$p/$path" && test -x "$p/$path"; then
19444            new_path="$p/$path"
19445            break
19446          fi
19447        done
19448        IFS="$IFS_save"
19449      else
19450        # This is an absolute path, we can use it without further modifications.
19451        new_path="$path"
19452      fi
19453
19454      if test "x$new_path" = x; then
19455        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19456$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19457        has_space=`$ECHO "$complete" | $GREP " "`
19458        if test "x$has_space" != x; then
19459          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19460$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19461        fi
19462        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19463      fi
19464    fi
19465
19466    # Now join together the path and the arguments once again
19467    if test "x$arguments" != xEOL; then
19468      new_complete="$new_path ${arguments% *}"
19469    else
19470      new_complete="$new_path"
19471    fi
19472
19473    if test "x$complete" != "x$new_complete"; then
19474      FOUND_MAKE="$new_complete"
19475      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19476$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19477    fi
19478  fi
19479
19480        fi
19481      fi
19482    fi
19483  fi
19484
19485
19486    if test "x$FOUND_MAKE" = x; then
19487      for ac_prog in make
19488do
19489  # Extract the first word of "$ac_prog", so it can be a program name with args.
19490set dummy $ac_prog; ac_word=$2
19491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19492$as_echo_n "checking for $ac_word... " >&6; }
19493if ${ac_cv_path_CHECK_MAKE+:} false; then :
19494  $as_echo_n "(cached) " >&6
19495else
19496  case $CHECK_MAKE in
19497  [\\/]* | ?:[\\/]*)
19498  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19499  ;;
19500  *)
19501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19502for as_dir in $PATH
19503do
19504  IFS=$as_save_IFS
19505  test -z "$as_dir" && as_dir=.
19506    for ac_exec_ext in '' $ac_executable_extensions; do
19507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19508    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19510    break 2
19511  fi
19512done
19513  done
19514IFS=$as_save_IFS
19515
19516  ;;
19517esac
19518fi
19519CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19520if test -n "$CHECK_MAKE"; then
19521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19522$as_echo "$CHECK_MAKE" >&6; }
19523else
19524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19525$as_echo "no" >&6; }
19526fi
19527
19528
19529  test -n "$CHECK_MAKE" && break
19530done
19531
19532
19533  MAKE_CANDIDATE=""$CHECK_MAKE""
19534  DESCRIPTION="make in PATH"
19535
19536  # On Cygwin, we require a newer version of make than on other platforms
19537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19538    MAKE_VERSION_EXPR="-e 4\."
19539    MAKE_REQUIRED_VERSION="4.0"
19540   else
19541    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19542    MAKE_REQUIRED_VERSION="3.81"
19543  fi
19544
19545  if test "x$MAKE_CANDIDATE" != x; then
19546    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19547$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19548    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19549    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19550    if test "x$IS_GNU_MAKE" = x; then
19551      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19552$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19553    else
19554      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19555      if test "x$IS_MODERN_MAKE" = x; then
19556        { $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
19557$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;}
19558      else
19559        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19560          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19561            MAKE_EXPECTED_ENV='cygwin'
19562          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19563            MAKE_EXPECTED_ENV='msys'
19564          else
19565            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19566          fi
19567          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19568          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19569        else
19570          # Not relevant for non-Windows
19571          IS_MAKE_CORRECT_ENV=true
19572        fi
19573        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19574          { $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
19575$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;}
19576        else
19577          FOUND_MAKE=$MAKE_CANDIDATE
19578
19579  # Only process if variable expands to non-empty
19580
19581  if test "x$FOUND_MAKE" != x; then
19582    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19583
19584  # First separate the path from the arguments. This will split at the first
19585  # space.
19586  complete="$FOUND_MAKE"
19587  path="${complete%% *}"
19588  tmp="$complete EOL"
19589  arguments="${tmp#* }"
19590
19591  # Input might be given as Windows format, start by converting to
19592  # unix format.
19593  new_path=`$CYGPATH -u "$path"`
19594
19595  # Now try to locate executable using which
19596  new_path=`$WHICH "$new_path" 2> /dev/null`
19597  # bat and cmd files are not always considered executable in cygwin causing which
19598  # to not find them
19599  if test "x$new_path" = x \
19600      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19601      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19602    new_path=`$CYGPATH -u "$path"`
19603  fi
19604  if test "x$new_path" = x; then
19605    # Oops. Which didn't find the executable.
19606    # The splitting of arguments from the executable at a space might have been incorrect,
19607    # since paths with space are more likely in Windows. Give it another try with the whole
19608    # argument.
19609    path="$complete"
19610    arguments="EOL"
19611    new_path=`$CYGPATH -u "$path"`
19612    new_path=`$WHICH "$new_path" 2> /dev/null`
19613    # bat and cmd files are not always considered executable in cygwin causing which
19614    # to not find them
19615    if test "x$new_path" = x \
19616        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19617        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19618      new_path=`$CYGPATH -u "$path"`
19619    fi
19620    if test "x$new_path" = x; then
19621      # It's still not found. Now this is an unrecoverable error.
19622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19623$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19624      has_space=`$ECHO "$complete" | $GREP " "`
19625      if test "x$has_space" != x; then
19626        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19627$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19628      fi
19629      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19630    fi
19631  fi
19632
19633  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19634  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19635  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19636  # "foo.exe" is OK but "foo" is an error.
19637  #
19638  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19639  # It is also a way to make sure we got the proper file name for the real test later on.
19640  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19641  if test "x$test_shortpath" = x; then
19642    # Short path failed, file does not exist as specified.
19643    # Try adding .exe or .cmd
19644    if test -f "${new_path}.exe"; then
19645      input_to_shortpath="${new_path}.exe"
19646    elif test -f "${new_path}.cmd"; then
19647      input_to_shortpath="${new_path}.cmd"
19648    else
19649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19650$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19651      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19652$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19653      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19654    fi
19655  else
19656    input_to_shortpath="$new_path"
19657  fi
19658
19659  # Call helper function which possibly converts this using DOS-style short mode.
19660  # If so, the updated path is stored in $new_path.
19661  new_path="$input_to_shortpath"
19662
19663  input_path="$input_to_shortpath"
19664  # Check if we need to convert this using DOS-style short mode. If the path
19665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19666  # take no chances and rewrite it.
19667  # Note: m4 eats our [], so we need to use [ and ] instead.
19668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19669  if test "x$has_forbidden_chars" != x; then
19670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19671    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19672    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19673    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19674      # Going to short mode and back again did indeed matter. Since short mode is
19675      # case insensitive, let's make it lowercase to improve readability.
19676      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19677      # Now convert it back to Unix-style (cygpath)
19678      input_path=`$CYGPATH -u "$shortmode_path"`
19679      new_path="$input_path"
19680    fi
19681  fi
19682
19683  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19684  if test "x$test_cygdrive_prefix" = x; then
19685    # As a simple fix, exclude /usr/bin since it's not a real path.
19686    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19687      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19688      # a path prefixed by /cygdrive for fixpath to work.
19689      new_path="$CYGWIN_ROOT_PATH$input_path"
19690    fi
19691  fi
19692
19693  # remove trailing .exe if any
19694  new_path="${new_path/%.exe/}"
19695
19696    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19697
19698  # First separate the path from the arguments. This will split at the first
19699  # space.
19700  complete="$FOUND_MAKE"
19701  path="${complete%% *}"
19702  tmp="$complete EOL"
19703  arguments="${tmp#* }"
19704
19705  # Input might be given as Windows format, start by converting to
19706  # unix format.
19707  new_path="$path"
19708
19709  windows_path="$new_path"
19710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19711    unix_path=`$CYGPATH -u "$windows_path"`
19712    new_path="$unix_path"
19713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19715    new_path="$unix_path"
19716  fi
19717
19718
19719  # Now try to locate executable using which
19720  new_path=`$WHICH "$new_path" 2> /dev/null`
19721
19722  if test "x$new_path" = x; then
19723    # Oops. Which didn't find the executable.
19724    # The splitting of arguments from the executable at a space might have been incorrect,
19725    # since paths with space are more likely in Windows. Give it another try with the whole
19726    # argument.
19727    path="$complete"
19728    arguments="EOL"
19729    new_path="$path"
19730
19731  windows_path="$new_path"
19732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19733    unix_path=`$CYGPATH -u "$windows_path"`
19734    new_path="$unix_path"
19735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19737    new_path="$unix_path"
19738  fi
19739
19740
19741    new_path=`$WHICH "$new_path" 2> /dev/null`
19742    # bat and cmd files are not always considered executable in MSYS causing which
19743    # to not find them
19744    if test "x$new_path" = x \
19745        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19746        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19747      new_path="$path"
19748
19749  windows_path="$new_path"
19750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19751    unix_path=`$CYGPATH -u "$windows_path"`
19752    new_path="$unix_path"
19753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19755    new_path="$unix_path"
19756  fi
19757
19758    fi
19759
19760    if test "x$new_path" = x; then
19761      # It's still not found. Now this is an unrecoverable error.
19762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19763$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19764      has_space=`$ECHO "$complete" | $GREP " "`
19765      if test "x$has_space" != x; then
19766        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19767$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19768      fi
19769      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19770    fi
19771  fi
19772
19773  # Now new_path has a complete unix path to the binary
19774  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19775    # Keep paths in /bin as-is, but remove trailing .exe if any
19776    new_path="${new_path/%.exe/}"
19777    # Do not save /bin paths to all_fixpath_prefixes!
19778  else
19779    # Not in mixed or Windows style, start by that.
19780    new_path=`cmd //c echo $new_path`
19781
19782  input_path="$new_path"
19783  # Check if we need to convert this using DOS-style short mode. If the path
19784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19785  # take no chances and rewrite it.
19786  # Note: m4 eats our [], so we need to use [ and ] instead.
19787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19788  if test "x$has_forbidden_chars" != x; then
19789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19790    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19791  fi
19792
19793    # Output is in $new_path
19794
19795  windows_path="$new_path"
19796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19797    unix_path=`$CYGPATH -u "$windows_path"`
19798    new_path="$unix_path"
19799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19801    new_path="$unix_path"
19802  fi
19803
19804    # remove trailing .exe if any
19805    new_path="${new_path/%.exe/}"
19806
19807    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19808    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19809  fi
19810
19811    else
19812      # We're on a unix platform. Hooray! :)
19813      # First separate the path from the arguments. This will split at the first
19814      # space.
19815      complete="$FOUND_MAKE"
19816      path="${complete%% *}"
19817      tmp="$complete EOL"
19818      arguments="${tmp#* }"
19819
19820      # Cannot rely on the command "which" here since it doesn't always work.
19821      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19822      if test -z "$is_absolute_path"; then
19823        # Path to executable is not absolute. Find it.
19824        IFS_save="$IFS"
19825        IFS=:
19826        for p in $PATH; do
19827          if test -f "$p/$path" && test -x "$p/$path"; then
19828            new_path="$p/$path"
19829            break
19830          fi
19831        done
19832        IFS="$IFS_save"
19833      else
19834        # This is an absolute path, we can use it without further modifications.
19835        new_path="$path"
19836      fi
19837
19838      if test "x$new_path" = x; then
19839        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19840$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19841        has_space=`$ECHO "$complete" | $GREP " "`
19842        if test "x$has_space" != x; then
19843          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19844$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19845        fi
19846        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19847      fi
19848    fi
19849
19850    # Now join together the path and the arguments once again
19851    if test "x$arguments" != xEOL; then
19852      new_complete="$new_path ${arguments% *}"
19853    else
19854      new_complete="$new_path"
19855    fi
19856
19857    if test "x$complete" != "x$new_complete"; then
19858      FOUND_MAKE="$new_complete"
19859      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19860$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19861    fi
19862  fi
19863
19864        fi
19865      fi
19866    fi
19867  fi
19868
19869    fi
19870
19871    if test "x$FOUND_MAKE" = x; then
19872      if test "x$TOOLCHAIN_PATH" != x; then
19873        # We have a toolchain path, check that as well before giving up.
19874        OLD_PATH=$PATH
19875        PATH=$TOOLCHAIN_PATH:$PATH
19876        for ac_prog in gmake
19877do
19878  # Extract the first word of "$ac_prog", so it can be a program name with args.
19879set dummy $ac_prog; ac_word=$2
19880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19881$as_echo_n "checking for $ac_word... " >&6; }
19882if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19883  $as_echo_n "(cached) " >&6
19884else
19885  case $CHECK_TOOLSDIR_GMAKE in
19886  [\\/]* | ?:[\\/]*)
19887  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19888  ;;
19889  *)
19890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19891for as_dir in $PATH
19892do
19893  IFS=$as_save_IFS
19894  test -z "$as_dir" && as_dir=.
19895    for ac_exec_ext in '' $ac_executable_extensions; do
19896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19897    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19899    break 2
19900  fi
19901done
19902  done
19903IFS=$as_save_IFS
19904
19905  ;;
19906esac
19907fi
19908CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19909if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19911$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19912else
19913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19914$as_echo "no" >&6; }
19915fi
19916
19917
19918  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19919done
19920
19921
19922  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19923  DESCRIPTION="gmake in tools-dir"
19924
19925  # On Cygwin, we require a newer version of make than on other platforms
19926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19927    MAKE_VERSION_EXPR="-e 4\."
19928    MAKE_REQUIRED_VERSION="4.0"
19929   else
19930    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19931    MAKE_REQUIRED_VERSION="3.81"
19932  fi
19933
19934  if test "x$MAKE_CANDIDATE" != x; then
19935    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19936$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19937    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19938    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19939    if test "x$IS_GNU_MAKE" = x; then
19940      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19941$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19942    else
19943      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19944      if test "x$IS_MODERN_MAKE" = x; then
19945        { $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
19946$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;}
19947      else
19948        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19949          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19950            MAKE_EXPECTED_ENV='cygwin'
19951          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19952            MAKE_EXPECTED_ENV='msys'
19953          else
19954            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19955          fi
19956          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19957          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19958        else
19959          # Not relevant for non-Windows
19960          IS_MAKE_CORRECT_ENV=true
19961        fi
19962        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19963          { $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
19964$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;}
19965        else
19966          FOUND_MAKE=$MAKE_CANDIDATE
19967
19968  # Only process if variable expands to non-empty
19969
19970  if test "x$FOUND_MAKE" != x; then
19971    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19972
19973  # First separate the path from the arguments. This will split at the first
19974  # space.
19975  complete="$FOUND_MAKE"
19976  path="${complete%% *}"
19977  tmp="$complete EOL"
19978  arguments="${tmp#* }"
19979
19980  # Input might be given as Windows format, start by converting to
19981  # unix format.
19982  new_path=`$CYGPATH -u "$path"`
19983
19984  # Now try to locate executable using which
19985  new_path=`$WHICH "$new_path" 2> /dev/null`
19986  # bat and cmd files are not always considered executable in cygwin causing which
19987  # to not find them
19988  if test "x$new_path" = x \
19989      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19990      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19991    new_path=`$CYGPATH -u "$path"`
19992  fi
19993  if test "x$new_path" = x; then
19994    # Oops. Which didn't find the executable.
19995    # The splitting of arguments from the executable at a space might have been incorrect,
19996    # since paths with space are more likely in Windows. Give it another try with the whole
19997    # argument.
19998    path="$complete"
19999    arguments="EOL"
20000    new_path=`$CYGPATH -u "$path"`
20001    new_path=`$WHICH "$new_path" 2> /dev/null`
20002    # bat and cmd files are not always considered executable in cygwin causing which
20003    # to not find them
20004    if test "x$new_path" = x \
20005        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20006        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20007      new_path=`$CYGPATH -u "$path"`
20008    fi
20009    if test "x$new_path" = x; then
20010      # It's still not found. Now this is an unrecoverable error.
20011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20012$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20013      has_space=`$ECHO "$complete" | $GREP " "`
20014      if test "x$has_space" != x; then
20015        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20016$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20017      fi
20018      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20019    fi
20020  fi
20021
20022  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20023  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20024  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20025  # "foo.exe" is OK but "foo" is an error.
20026  #
20027  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20028  # It is also a way to make sure we got the proper file name for the real test later on.
20029  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20030  if test "x$test_shortpath" = x; then
20031    # Short path failed, file does not exist as specified.
20032    # Try adding .exe or .cmd
20033    if test -f "${new_path}.exe"; then
20034      input_to_shortpath="${new_path}.exe"
20035    elif test -f "${new_path}.cmd"; then
20036      input_to_shortpath="${new_path}.cmd"
20037    else
20038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20039$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20040      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20041$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20042      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20043    fi
20044  else
20045    input_to_shortpath="$new_path"
20046  fi
20047
20048  # Call helper function which possibly converts this using DOS-style short mode.
20049  # If so, the updated path is stored in $new_path.
20050  new_path="$input_to_shortpath"
20051
20052  input_path="$input_to_shortpath"
20053  # Check if we need to convert this using DOS-style short mode. If the path
20054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20055  # take no chances and rewrite it.
20056  # Note: m4 eats our [], so we need to use [ and ] instead.
20057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20058  if test "x$has_forbidden_chars" != x; then
20059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20063      # Going to short mode and back again did indeed matter. Since short mode is
20064      # case insensitive, let's make it lowercase to improve readability.
20065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20066      # Now convert it back to Unix-style (cygpath)
20067      input_path=`$CYGPATH -u "$shortmode_path"`
20068      new_path="$input_path"
20069    fi
20070  fi
20071
20072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20073  if test "x$test_cygdrive_prefix" = x; then
20074    # As a simple fix, exclude /usr/bin since it's not a real path.
20075    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20077      # a path prefixed by /cygdrive for fixpath to work.
20078      new_path="$CYGWIN_ROOT_PATH$input_path"
20079    fi
20080  fi
20081
20082  # remove trailing .exe if any
20083  new_path="${new_path/%.exe/}"
20084
20085    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20086
20087  # First separate the path from the arguments. This will split at the first
20088  # space.
20089  complete="$FOUND_MAKE"
20090  path="${complete%% *}"
20091  tmp="$complete EOL"
20092  arguments="${tmp#* }"
20093
20094  # Input might be given as Windows format, start by converting to
20095  # unix format.
20096  new_path="$path"
20097
20098  windows_path="$new_path"
20099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20100    unix_path=`$CYGPATH -u "$windows_path"`
20101    new_path="$unix_path"
20102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20104    new_path="$unix_path"
20105  fi
20106
20107
20108  # Now try to locate executable using which
20109  new_path=`$WHICH "$new_path" 2> /dev/null`
20110
20111  if test "x$new_path" = x; then
20112    # Oops. Which didn't find the executable.
20113    # The splitting of arguments from the executable at a space might have been incorrect,
20114    # since paths with space are more likely in Windows. Give it another try with the whole
20115    # argument.
20116    path="$complete"
20117    arguments="EOL"
20118    new_path="$path"
20119
20120  windows_path="$new_path"
20121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20122    unix_path=`$CYGPATH -u "$windows_path"`
20123    new_path="$unix_path"
20124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20126    new_path="$unix_path"
20127  fi
20128
20129
20130    new_path=`$WHICH "$new_path" 2> /dev/null`
20131    # bat and cmd files are not always considered executable in MSYS causing which
20132    # to not find them
20133    if test "x$new_path" = x \
20134        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20135        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20136      new_path="$path"
20137
20138  windows_path="$new_path"
20139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20140    unix_path=`$CYGPATH -u "$windows_path"`
20141    new_path="$unix_path"
20142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20144    new_path="$unix_path"
20145  fi
20146
20147    fi
20148
20149    if test "x$new_path" = x; then
20150      # It's still not found. Now this is an unrecoverable error.
20151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20152$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20153      has_space=`$ECHO "$complete" | $GREP " "`
20154      if test "x$has_space" != x; then
20155        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20156$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20157      fi
20158      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20159    fi
20160  fi
20161
20162  # Now new_path has a complete unix path to the binary
20163  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20164    # Keep paths in /bin as-is, but remove trailing .exe if any
20165    new_path="${new_path/%.exe/}"
20166    # Do not save /bin paths to all_fixpath_prefixes!
20167  else
20168    # Not in mixed or Windows style, start by that.
20169    new_path=`cmd //c echo $new_path`
20170
20171  input_path="$new_path"
20172  # Check if we need to convert this using DOS-style short mode. If the path
20173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20174  # take no chances and rewrite it.
20175  # Note: m4 eats our [], so we need to use [ and ] instead.
20176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20177  if test "x$has_forbidden_chars" != x; then
20178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20179    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20180  fi
20181
20182    # Output is in $new_path
20183
20184  windows_path="$new_path"
20185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20186    unix_path=`$CYGPATH -u "$windows_path"`
20187    new_path="$unix_path"
20188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20190    new_path="$unix_path"
20191  fi
20192
20193    # remove trailing .exe if any
20194    new_path="${new_path/%.exe/}"
20195
20196    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20197    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20198  fi
20199
20200    else
20201      # We're on a unix platform. Hooray! :)
20202      # First separate the path from the arguments. This will split at the first
20203      # space.
20204      complete="$FOUND_MAKE"
20205      path="${complete%% *}"
20206      tmp="$complete EOL"
20207      arguments="${tmp#* }"
20208
20209      # Cannot rely on the command "which" here since it doesn't always work.
20210      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20211      if test -z "$is_absolute_path"; then
20212        # Path to executable is not absolute. Find it.
20213        IFS_save="$IFS"
20214        IFS=:
20215        for p in $PATH; do
20216          if test -f "$p/$path" && test -x "$p/$path"; then
20217            new_path="$p/$path"
20218            break
20219          fi
20220        done
20221        IFS="$IFS_save"
20222      else
20223        # This is an absolute path, we can use it without further modifications.
20224        new_path="$path"
20225      fi
20226
20227      if test "x$new_path" = x; then
20228        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20229$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20230        has_space=`$ECHO "$complete" | $GREP " "`
20231        if test "x$has_space" != x; then
20232          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20233$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20234        fi
20235        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20236      fi
20237    fi
20238
20239    # Now join together the path and the arguments once again
20240    if test "x$arguments" != xEOL; then
20241      new_complete="$new_path ${arguments% *}"
20242    else
20243      new_complete="$new_path"
20244    fi
20245
20246    if test "x$complete" != "x$new_complete"; then
20247      FOUND_MAKE="$new_complete"
20248      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20249$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20250    fi
20251  fi
20252
20253        fi
20254      fi
20255    fi
20256  fi
20257
20258        if test "x$FOUND_MAKE" = x; then
20259          for ac_prog in make
20260do
20261  # Extract the first word of "$ac_prog", so it can be a program name with args.
20262set dummy $ac_prog; ac_word=$2
20263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20264$as_echo_n "checking for $ac_word... " >&6; }
20265if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20266  $as_echo_n "(cached) " >&6
20267else
20268  case $CHECK_TOOLSDIR_MAKE in
20269  [\\/]* | ?:[\\/]*)
20270  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20271  ;;
20272  *)
20273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20274for as_dir in $PATH
20275do
20276  IFS=$as_save_IFS
20277  test -z "$as_dir" && as_dir=.
20278    for ac_exec_ext in '' $ac_executable_extensions; do
20279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20280    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20282    break 2
20283  fi
20284done
20285  done
20286IFS=$as_save_IFS
20287
20288  ;;
20289esac
20290fi
20291CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20292if test -n "$CHECK_TOOLSDIR_MAKE"; then
20293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20294$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20295else
20296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20297$as_echo "no" >&6; }
20298fi
20299
20300
20301  test -n "$CHECK_TOOLSDIR_MAKE" && break
20302done
20303
20304
20305  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20306  DESCRIPTION="make in tools-dir"
20307
20308  # On Cygwin, we require a newer version of make than on other platforms
20309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20310    MAKE_VERSION_EXPR="-e 4\."
20311    MAKE_REQUIRED_VERSION="4.0"
20312   else
20313    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20314    MAKE_REQUIRED_VERSION="3.81"
20315  fi
20316
20317  if test "x$MAKE_CANDIDATE" != x; then
20318    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20319$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20320    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20321    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20322    if test "x$IS_GNU_MAKE" = x; then
20323      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20324$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20325    else
20326      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20327      if test "x$IS_MODERN_MAKE" = x; then
20328        { $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
20329$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;}
20330      else
20331        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20332          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20333            MAKE_EXPECTED_ENV='cygwin'
20334          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20335            MAKE_EXPECTED_ENV='msys'
20336          else
20337            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20338          fi
20339          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20340          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20341        else
20342          # Not relevant for non-Windows
20343          IS_MAKE_CORRECT_ENV=true
20344        fi
20345        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20346          { $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
20347$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;}
20348        else
20349          FOUND_MAKE=$MAKE_CANDIDATE
20350
20351  # Only process if variable expands to non-empty
20352
20353  if test "x$FOUND_MAKE" != x; then
20354    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20355
20356  # First separate the path from the arguments. This will split at the first
20357  # space.
20358  complete="$FOUND_MAKE"
20359  path="${complete%% *}"
20360  tmp="$complete EOL"
20361  arguments="${tmp#* }"
20362
20363  # Input might be given as Windows format, start by converting to
20364  # unix format.
20365  new_path=`$CYGPATH -u "$path"`
20366
20367  # Now try to locate executable using which
20368  new_path=`$WHICH "$new_path" 2> /dev/null`
20369  # bat and cmd files are not always considered executable in cygwin causing which
20370  # to not find them
20371  if test "x$new_path" = x \
20372      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20373      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20374    new_path=`$CYGPATH -u "$path"`
20375  fi
20376  if test "x$new_path" = x; then
20377    # Oops. Which didn't find the executable.
20378    # The splitting of arguments from the executable at a space might have been incorrect,
20379    # since paths with space are more likely in Windows. Give it another try with the whole
20380    # argument.
20381    path="$complete"
20382    arguments="EOL"
20383    new_path=`$CYGPATH -u "$path"`
20384    new_path=`$WHICH "$new_path" 2> /dev/null`
20385    # bat and cmd files are not always considered executable in cygwin causing which
20386    # to not find them
20387    if test "x$new_path" = x \
20388        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20389        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20390      new_path=`$CYGPATH -u "$path"`
20391    fi
20392    if test "x$new_path" = x; then
20393      # It's still not found. Now this is an unrecoverable error.
20394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20395$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20396      has_space=`$ECHO "$complete" | $GREP " "`
20397      if test "x$has_space" != x; then
20398        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20399$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20400      fi
20401      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20402    fi
20403  fi
20404
20405  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20406  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20407  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20408  # "foo.exe" is OK but "foo" is an error.
20409  #
20410  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20411  # It is also a way to make sure we got the proper file name for the real test later on.
20412  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20413  if test "x$test_shortpath" = x; then
20414    # Short path failed, file does not exist as specified.
20415    # Try adding .exe or .cmd
20416    if test -f "${new_path}.exe"; then
20417      input_to_shortpath="${new_path}.exe"
20418    elif test -f "${new_path}.cmd"; then
20419      input_to_shortpath="${new_path}.cmd"
20420    else
20421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20422$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20423      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20424$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20425      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20426    fi
20427  else
20428    input_to_shortpath="$new_path"
20429  fi
20430
20431  # Call helper function which possibly converts this using DOS-style short mode.
20432  # If so, the updated path is stored in $new_path.
20433  new_path="$input_to_shortpath"
20434
20435  input_path="$input_to_shortpath"
20436  # Check if we need to convert this using DOS-style short mode. If the path
20437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20438  # take no chances and rewrite it.
20439  # Note: m4 eats our [], so we need to use [ and ] instead.
20440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20441  if test "x$has_forbidden_chars" != x; then
20442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20443    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20444    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20445    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20446      # Going to short mode and back again did indeed matter. Since short mode is
20447      # case insensitive, let's make it lowercase to improve readability.
20448      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20449      # Now convert it back to Unix-style (cygpath)
20450      input_path=`$CYGPATH -u "$shortmode_path"`
20451      new_path="$input_path"
20452    fi
20453  fi
20454
20455  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20456  if test "x$test_cygdrive_prefix" = x; then
20457    # As a simple fix, exclude /usr/bin since it's not a real path.
20458    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20459      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20460      # a path prefixed by /cygdrive for fixpath to work.
20461      new_path="$CYGWIN_ROOT_PATH$input_path"
20462    fi
20463  fi
20464
20465  # remove trailing .exe if any
20466  new_path="${new_path/%.exe/}"
20467
20468    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20469
20470  # First separate the path from the arguments. This will split at the first
20471  # space.
20472  complete="$FOUND_MAKE"
20473  path="${complete%% *}"
20474  tmp="$complete EOL"
20475  arguments="${tmp#* }"
20476
20477  # Input might be given as Windows format, start by converting to
20478  # unix format.
20479  new_path="$path"
20480
20481  windows_path="$new_path"
20482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20483    unix_path=`$CYGPATH -u "$windows_path"`
20484    new_path="$unix_path"
20485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20487    new_path="$unix_path"
20488  fi
20489
20490
20491  # Now try to locate executable using which
20492  new_path=`$WHICH "$new_path" 2> /dev/null`
20493
20494  if test "x$new_path" = x; then
20495    # Oops. Which didn't find the executable.
20496    # The splitting of arguments from the executable at a space might have been incorrect,
20497    # since paths with space are more likely in Windows. Give it another try with the whole
20498    # argument.
20499    path="$complete"
20500    arguments="EOL"
20501    new_path="$path"
20502
20503  windows_path="$new_path"
20504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20505    unix_path=`$CYGPATH -u "$windows_path"`
20506    new_path="$unix_path"
20507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20509    new_path="$unix_path"
20510  fi
20511
20512
20513    new_path=`$WHICH "$new_path" 2> /dev/null`
20514    # bat and cmd files are not always considered executable in MSYS causing which
20515    # to not find them
20516    if test "x$new_path" = x \
20517        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20518        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20519      new_path="$path"
20520
20521  windows_path="$new_path"
20522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20523    unix_path=`$CYGPATH -u "$windows_path"`
20524    new_path="$unix_path"
20525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20527    new_path="$unix_path"
20528  fi
20529
20530    fi
20531
20532    if test "x$new_path" = x; then
20533      # It's still not found. Now this is an unrecoverable error.
20534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20535$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20536      has_space=`$ECHO "$complete" | $GREP " "`
20537      if test "x$has_space" != x; then
20538        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20539$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20540      fi
20541      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20542    fi
20543  fi
20544
20545  # Now new_path has a complete unix path to the binary
20546  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20547    # Keep paths in /bin as-is, but remove trailing .exe if any
20548    new_path="${new_path/%.exe/}"
20549    # Do not save /bin paths to all_fixpath_prefixes!
20550  else
20551    # Not in mixed or Windows style, start by that.
20552    new_path=`cmd //c echo $new_path`
20553
20554  input_path="$new_path"
20555  # Check if we need to convert this using DOS-style short mode. If the path
20556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20557  # take no chances and rewrite it.
20558  # Note: m4 eats our [], so we need to use [ and ] instead.
20559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20560  if test "x$has_forbidden_chars" != x; then
20561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20562    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20563  fi
20564
20565    # Output is in $new_path
20566
20567  windows_path="$new_path"
20568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20569    unix_path=`$CYGPATH -u "$windows_path"`
20570    new_path="$unix_path"
20571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20573    new_path="$unix_path"
20574  fi
20575
20576    # remove trailing .exe if any
20577    new_path="${new_path/%.exe/}"
20578
20579    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20580    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20581  fi
20582
20583    else
20584      # We're on a unix platform. Hooray! :)
20585      # First separate the path from the arguments. This will split at the first
20586      # space.
20587      complete="$FOUND_MAKE"
20588      path="${complete%% *}"
20589      tmp="$complete EOL"
20590      arguments="${tmp#* }"
20591
20592      # Cannot rely on the command "which" here since it doesn't always work.
20593      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20594      if test -z "$is_absolute_path"; then
20595        # Path to executable is not absolute. Find it.
20596        IFS_save="$IFS"
20597        IFS=:
20598        for p in $PATH; do
20599          if test -f "$p/$path" && test -x "$p/$path"; then
20600            new_path="$p/$path"
20601            break
20602          fi
20603        done
20604        IFS="$IFS_save"
20605      else
20606        # This is an absolute path, we can use it without further modifications.
20607        new_path="$path"
20608      fi
20609
20610      if test "x$new_path" = x; then
20611        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20612$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20613        has_space=`$ECHO "$complete" | $GREP " "`
20614        if test "x$has_space" != x; then
20615          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20616$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20617        fi
20618        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20619      fi
20620    fi
20621
20622    # Now join together the path and the arguments once again
20623    if test "x$arguments" != xEOL; then
20624      new_complete="$new_path ${arguments% *}"
20625    else
20626      new_complete="$new_path"
20627    fi
20628
20629    if test "x$complete" != "x$new_complete"; then
20630      FOUND_MAKE="$new_complete"
20631      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20632$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20633    fi
20634  fi
20635
20636        fi
20637      fi
20638    fi
20639  fi
20640
20641        fi
20642        PATH=$OLD_PATH
20643      fi
20644    fi
20645
20646    if test "x$FOUND_MAKE" = x; then
20647      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
20648    fi
20649
20650    else
20651      # If it succeeded, then it was overridden by the user. We will use it
20652      # for the tool.
20653
20654      # First remove it from the list of overridden variables, so we can test
20655      # for unknown variables in the end.
20656      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20657
20658      # Check if we try to supply an empty value
20659      if test "x$MAKE" = x; then
20660        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20661$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20662        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20663$as_echo_n "checking for MAKE... " >&6; }
20664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20665$as_echo "disabled" >&6; }
20666      else
20667        # Check if the provided tool contains a complete path.
20668        tool_specified="$MAKE"
20669        tool_basename="${tool_specified##*/}"
20670        if test "x$tool_basename" = "x$tool_specified"; then
20671          # A command without a complete path is provided, search $PATH.
20672          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20673$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20674          # Extract the first word of "$tool_basename", so it can be a program name with args.
20675set dummy $tool_basename; ac_word=$2
20676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20677$as_echo_n "checking for $ac_word... " >&6; }
20678if ${ac_cv_path_MAKE+:} false; then :
20679  $as_echo_n "(cached) " >&6
20680else
20681  case $MAKE in
20682  [\\/]* | ?:[\\/]*)
20683  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20684  ;;
20685  *)
20686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20687for as_dir in $PATH
20688do
20689  IFS=$as_save_IFS
20690  test -z "$as_dir" && as_dir=.
20691    for ac_exec_ext in '' $ac_executable_extensions; do
20692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20693    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20695    break 2
20696  fi
20697done
20698  done
20699IFS=$as_save_IFS
20700
20701  ;;
20702esac
20703fi
20704MAKE=$ac_cv_path_MAKE
20705if test -n "$MAKE"; then
20706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20707$as_echo "$MAKE" >&6; }
20708else
20709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20710$as_echo "no" >&6; }
20711fi
20712
20713
20714          if test "x$MAKE" = x; then
20715            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20716          fi
20717        else
20718          # Otherwise we believe it is a complete path. Use it as it is.
20719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20720$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20721          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20722$as_echo_n "checking for MAKE... " >&6; }
20723          if test ! -x "$tool_specified"; then
20724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20725$as_echo "not found" >&6; }
20726            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20727          fi
20728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20729$as_echo "$tool_specified" >&6; }
20730        fi
20731      fi
20732    fi
20733
20734    # If MAKE was set by user, verify the version
20735
20736  MAKE_CANDIDATE=""$MAKE""
20737  DESCRIPTION="user supplied MAKE=$MAKE"
20738
20739  # On Cygwin, we require a newer version of make than on other platforms
20740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20741    MAKE_VERSION_EXPR="-e 4\."
20742    MAKE_REQUIRED_VERSION="4.0"
20743   else
20744    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20745    MAKE_REQUIRED_VERSION="3.81"
20746  fi
20747
20748  if test "x$MAKE_CANDIDATE" != x; then
20749    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20750$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20751    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20752    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20753    if test "x$IS_GNU_MAKE" = x; then
20754      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20755$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20756    else
20757      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20758      if test "x$IS_MODERN_MAKE" = x; then
20759        { $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
20760$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;}
20761      else
20762        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20763          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20764            MAKE_EXPECTED_ENV='cygwin'
20765          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20766            MAKE_EXPECTED_ENV='msys'
20767          else
20768            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20769          fi
20770          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20771          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20772        else
20773          # Not relevant for non-Windows
20774          IS_MAKE_CORRECT_ENV=true
20775        fi
20776        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20777          { $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
20778$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;}
20779        else
20780          FOUND_MAKE=$MAKE_CANDIDATE
20781
20782  # Only process if variable expands to non-empty
20783
20784  if test "x$FOUND_MAKE" != x; then
20785    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20786
20787  # First separate the path from the arguments. This will split at the first
20788  # space.
20789  complete="$FOUND_MAKE"
20790  path="${complete%% *}"
20791  tmp="$complete EOL"
20792  arguments="${tmp#* }"
20793
20794  # Input might be given as Windows format, start by converting to
20795  # unix format.
20796  new_path=`$CYGPATH -u "$path"`
20797
20798  # Now try to locate executable using which
20799  new_path=`$WHICH "$new_path" 2> /dev/null`
20800  # bat and cmd files are not always considered executable in cygwin causing which
20801  # to not find them
20802  if test "x$new_path" = x \
20803      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20804      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20805    new_path=`$CYGPATH -u "$path"`
20806  fi
20807  if test "x$new_path" = x; then
20808    # Oops. Which didn't find the executable.
20809    # The splitting of arguments from the executable at a space might have been incorrect,
20810    # since paths with space are more likely in Windows. Give it another try with the whole
20811    # argument.
20812    path="$complete"
20813    arguments="EOL"
20814    new_path=`$CYGPATH -u "$path"`
20815    new_path=`$WHICH "$new_path" 2> /dev/null`
20816    # bat and cmd files are not always considered executable in cygwin causing which
20817    # to not find them
20818    if test "x$new_path" = x \
20819        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20820        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20821      new_path=`$CYGPATH -u "$path"`
20822    fi
20823    if test "x$new_path" = x; then
20824      # It's still not found. Now this is an unrecoverable error.
20825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20826$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20827      has_space=`$ECHO "$complete" | $GREP " "`
20828      if test "x$has_space" != x; then
20829        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20830$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20831      fi
20832      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20833    fi
20834  fi
20835
20836  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20837  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20838  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20839  # "foo.exe" is OK but "foo" is an error.
20840  #
20841  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20842  # It is also a way to make sure we got the proper file name for the real test later on.
20843  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20844  if test "x$test_shortpath" = x; then
20845    # Short path failed, file does not exist as specified.
20846    # Try adding .exe or .cmd
20847    if test -f "${new_path}.exe"; then
20848      input_to_shortpath="${new_path}.exe"
20849    elif test -f "${new_path}.cmd"; then
20850      input_to_shortpath="${new_path}.cmd"
20851    else
20852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20853$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20854      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20855$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20856      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20857    fi
20858  else
20859    input_to_shortpath="$new_path"
20860  fi
20861
20862  # Call helper function which possibly converts this using DOS-style short mode.
20863  # If so, the updated path is stored in $new_path.
20864  new_path="$input_to_shortpath"
20865
20866  input_path="$input_to_shortpath"
20867  # Check if we need to convert this using DOS-style short mode. If the path
20868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20869  # take no chances and rewrite it.
20870  # Note: m4 eats our [], so we need to use [ and ] instead.
20871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20872  if test "x$has_forbidden_chars" != x; then
20873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20874    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20875    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20876    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20877      # Going to short mode and back again did indeed matter. Since short mode is
20878      # case insensitive, let's make it lowercase to improve readability.
20879      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20880      # Now convert it back to Unix-style (cygpath)
20881      input_path=`$CYGPATH -u "$shortmode_path"`
20882      new_path="$input_path"
20883    fi
20884  fi
20885
20886  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20887  if test "x$test_cygdrive_prefix" = x; then
20888    # As a simple fix, exclude /usr/bin since it's not a real path.
20889    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20890      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20891      # a path prefixed by /cygdrive for fixpath to work.
20892      new_path="$CYGWIN_ROOT_PATH$input_path"
20893    fi
20894  fi
20895
20896  # remove trailing .exe if any
20897  new_path="${new_path/%.exe/}"
20898
20899    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20900
20901  # First separate the path from the arguments. This will split at the first
20902  # space.
20903  complete="$FOUND_MAKE"
20904  path="${complete%% *}"
20905  tmp="$complete EOL"
20906  arguments="${tmp#* }"
20907
20908  # Input might be given as Windows format, start by converting to
20909  # unix format.
20910  new_path="$path"
20911
20912  windows_path="$new_path"
20913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20914    unix_path=`$CYGPATH -u "$windows_path"`
20915    new_path="$unix_path"
20916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20918    new_path="$unix_path"
20919  fi
20920
20921
20922  # Now try to locate executable using which
20923  new_path=`$WHICH "$new_path" 2> /dev/null`
20924
20925  if test "x$new_path" = x; then
20926    # Oops. Which didn't find the executable.
20927    # The splitting of arguments from the executable at a space might have been incorrect,
20928    # since paths with space are more likely in Windows. Give it another try with the whole
20929    # argument.
20930    path="$complete"
20931    arguments="EOL"
20932    new_path="$path"
20933
20934  windows_path="$new_path"
20935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20936    unix_path=`$CYGPATH -u "$windows_path"`
20937    new_path="$unix_path"
20938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20940    new_path="$unix_path"
20941  fi
20942
20943
20944    new_path=`$WHICH "$new_path" 2> /dev/null`
20945    # bat and cmd files are not always considered executable in MSYS causing which
20946    # to not find them
20947    if test "x$new_path" = x \
20948        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20949        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20950      new_path="$path"
20951
20952  windows_path="$new_path"
20953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20954    unix_path=`$CYGPATH -u "$windows_path"`
20955    new_path="$unix_path"
20956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20958    new_path="$unix_path"
20959  fi
20960
20961    fi
20962
20963    if test "x$new_path" = x; then
20964      # It's still not found. Now this is an unrecoverable error.
20965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20966$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20967      has_space=`$ECHO "$complete" | $GREP " "`
20968      if test "x$has_space" != x; then
20969        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20970$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20971      fi
20972      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20973    fi
20974  fi
20975
20976  # Now new_path has a complete unix path to the binary
20977  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20978    # Keep paths in /bin as-is, but remove trailing .exe if any
20979    new_path="${new_path/%.exe/}"
20980    # Do not save /bin paths to all_fixpath_prefixes!
20981  else
20982    # Not in mixed or Windows style, start by that.
20983    new_path=`cmd //c echo $new_path`
20984
20985  input_path="$new_path"
20986  # Check if we need to convert this using DOS-style short mode. If the path
20987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20988  # take no chances and rewrite it.
20989  # Note: m4 eats our [], so we need to use [ and ] instead.
20990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20991  if test "x$has_forbidden_chars" != x; then
20992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20994  fi
20995
20996    # Output is in $new_path
20997
20998  windows_path="$new_path"
20999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21000    unix_path=`$CYGPATH -u "$windows_path"`
21001    new_path="$unix_path"
21002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21004    new_path="$unix_path"
21005  fi
21006
21007    # remove trailing .exe if any
21008    new_path="${new_path/%.exe/}"
21009
21010    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21011    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21012  fi
21013
21014    else
21015      # We're on a unix platform. Hooray! :)
21016      # First separate the path from the arguments. This will split at the first
21017      # space.
21018      complete="$FOUND_MAKE"
21019      path="${complete%% *}"
21020      tmp="$complete EOL"
21021      arguments="${tmp#* }"
21022
21023      # Cannot rely on the command "which" here since it doesn't always work.
21024      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21025      if test -z "$is_absolute_path"; then
21026        # Path to executable is not absolute. Find it.
21027        IFS_save="$IFS"
21028        IFS=:
21029        for p in $PATH; do
21030          if test -f "$p/$path" && test -x "$p/$path"; then
21031            new_path="$p/$path"
21032            break
21033          fi
21034        done
21035        IFS="$IFS_save"
21036      else
21037        # This is an absolute path, we can use it without further modifications.
21038        new_path="$path"
21039      fi
21040
21041      if test "x$new_path" = x; then
21042        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21043$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21044        has_space=`$ECHO "$complete" | $GREP " "`
21045        if test "x$has_space" != x; then
21046          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21047$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21048        fi
21049        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21050      fi
21051    fi
21052
21053    # Now join together the path and the arguments once again
21054    if test "x$arguments" != xEOL; then
21055      new_complete="$new_path ${arguments% *}"
21056    else
21057      new_complete="$new_path"
21058    fi
21059
21060    if test "x$complete" != "x$new_complete"; then
21061      FOUND_MAKE="$new_complete"
21062      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21063$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21064    fi
21065  fi
21066
21067        fi
21068      fi
21069    fi
21070  fi
21071
21072    if test "x$FOUND_MAKE" = x; then
21073      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21074    fi
21075
21076  fi
21077
21078
21079  MAKE=$FOUND_MAKE
21080
21081  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21082$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21083
21084
21085  # Check if make supports the output sync option and if so, setup using it.
21086  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21087$as_echo_n "checking if make --output-sync is supported... " >&6; }
21088  if $MAKE --version -O > /dev/null 2>&1; then
21089    OUTPUT_SYNC_SUPPORTED=true
21090    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21091$as_echo "yes" >&6; }
21092    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21093$as_echo_n "checking for output-sync value... " >&6; }
21094
21095# Check whether --with-output-sync was given.
21096if test "${with_output_sync+set}" = set; then :
21097  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21098fi
21099
21100    if test "x$OUTPUT_SYNC" = "x"; then
21101      OUTPUT_SYNC=none
21102    fi
21103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21104$as_echo "$OUTPUT_SYNC" >&6; }
21105    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21106      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21107    fi
21108  else
21109    OUTPUT_SYNC_SUPPORTED=false
21110    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21111$as_echo "no" >&6; }
21112  fi
21113
21114
21115
21116
21117
21118
21119  # Test if find supports -delete
21120  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21121$as_echo_n "checking if find supports -delete... " >&6; }
21122  FIND_DELETE="-delete"
21123
21124  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21125
21126  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21127
21128  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21129  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21130    # No, it does not.
21131    $RM $DELETEDIR/TestIfFindSupportsDelete
21132    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21133      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21134      FIND_DELETE="-print | $XARGS $RM"
21135    else
21136      FIND_DELETE="-exec $RM \{\} \+"
21137    fi
21138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21139$as_echo "no" >&6; }
21140  else
21141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21142$as_echo "yes" >&6; }
21143  fi
21144  $RMDIR $DELETEDIR
21145
21146
21147
21148  # Test which kind of tar was found
21149  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21150    TAR_TYPE="gnu"
21151  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21152    TAR_TYPE="bsd"
21153  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21154    TAR_TYPE="solaris"
21155  fi
21156  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21157$as_echo_n "checking what type of tar was found... " >&6; }
21158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21159$as_echo "$TAR_TYPE" >&6; }
21160
21161  TAR_CREATE_FILE_PARAM=""
21162
21163  if test "x$TAR_TYPE" = "xgnu"; then
21164    TAR_INCLUDE_PARAM="T"
21165    TAR_SUPPORTS_TRANSFORM="true"
21166    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21167      # When using gnu tar for Solaris targets, need to use compatibility mode
21168      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21169    fi
21170  else
21171    TAR_INCLUDE_PARAM="I"
21172    TAR_SUPPORTS_TRANSFORM="false"
21173  fi
21174
21175
21176
21177
21178
21179
21180  # These tools might not be installed by default,
21181  # need hint on how to install them.
21182
21183
21184
21185  # Publish this variable in the help.
21186
21187
21188  if [ -z "${UNZIP+x}" ]; then
21189    # The variable is not set by user, try to locate tool using the code snippet
21190    for ac_prog in unzip
21191do
21192  # Extract the first word of "$ac_prog", so it can be a program name with args.
21193set dummy $ac_prog; ac_word=$2
21194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21195$as_echo_n "checking for $ac_word... " >&6; }
21196if ${ac_cv_path_UNZIP+:} false; then :
21197  $as_echo_n "(cached) " >&6
21198else
21199  case $UNZIP in
21200  [\\/]* | ?:[\\/]*)
21201  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21202  ;;
21203  *)
21204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21205for as_dir in $PATH
21206do
21207  IFS=$as_save_IFS
21208  test -z "$as_dir" && as_dir=.
21209    for ac_exec_ext in '' $ac_executable_extensions; do
21210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21211    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21213    break 2
21214  fi
21215done
21216  done
21217IFS=$as_save_IFS
21218
21219  ;;
21220esac
21221fi
21222UNZIP=$ac_cv_path_UNZIP
21223if test -n "$UNZIP"; then
21224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21225$as_echo "$UNZIP" >&6; }
21226else
21227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21228$as_echo "no" >&6; }
21229fi
21230
21231
21232  test -n "$UNZIP" && break
21233done
21234
21235  else
21236    # The variable is set, but is it from the command line or the environment?
21237
21238    # Try to remove the string !UNZIP! from our list.
21239    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21240    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21241      # If it failed, the variable was not from the command line. Ignore it,
21242      # but warn the user (except for BASH, which is always set by the calling BASH).
21243      if test "xUNZIP" != xBASH; then
21244        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21245$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21246      fi
21247      # Try to locate tool using the code snippet
21248      for ac_prog in unzip
21249do
21250  # Extract the first word of "$ac_prog", so it can be a program name with args.
21251set dummy $ac_prog; ac_word=$2
21252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21253$as_echo_n "checking for $ac_word... " >&6; }
21254if ${ac_cv_path_UNZIP+:} false; then :
21255  $as_echo_n "(cached) " >&6
21256else
21257  case $UNZIP in
21258  [\\/]* | ?:[\\/]*)
21259  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21260  ;;
21261  *)
21262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21263for as_dir in $PATH
21264do
21265  IFS=$as_save_IFS
21266  test -z "$as_dir" && as_dir=.
21267    for ac_exec_ext in '' $ac_executable_extensions; do
21268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21269    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21271    break 2
21272  fi
21273done
21274  done
21275IFS=$as_save_IFS
21276
21277  ;;
21278esac
21279fi
21280UNZIP=$ac_cv_path_UNZIP
21281if test -n "$UNZIP"; then
21282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21283$as_echo "$UNZIP" >&6; }
21284else
21285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21286$as_echo "no" >&6; }
21287fi
21288
21289
21290  test -n "$UNZIP" && break
21291done
21292
21293    else
21294      # If it succeeded, then it was overridden by the user. We will use it
21295      # for the tool.
21296
21297      # First remove it from the list of overridden variables, so we can test
21298      # for unknown variables in the end.
21299      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21300
21301      # Check if we try to supply an empty value
21302      if test "x$UNZIP" = x; then
21303        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21304$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21306$as_echo_n "checking for UNZIP... " >&6; }
21307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21308$as_echo "disabled" >&6; }
21309      else
21310        # Check if the provided tool contains a complete path.
21311        tool_specified="$UNZIP"
21312        tool_basename="${tool_specified##*/}"
21313        if test "x$tool_basename" = "x$tool_specified"; then
21314          # A command without a complete path is provided, search $PATH.
21315          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21316$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21317          # Extract the first word of "$tool_basename", so it can be a program name with args.
21318set dummy $tool_basename; ac_word=$2
21319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21320$as_echo_n "checking for $ac_word... " >&6; }
21321if ${ac_cv_path_UNZIP+:} false; then :
21322  $as_echo_n "(cached) " >&6
21323else
21324  case $UNZIP in
21325  [\\/]* | ?:[\\/]*)
21326  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21327  ;;
21328  *)
21329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21330for as_dir in $PATH
21331do
21332  IFS=$as_save_IFS
21333  test -z "$as_dir" && as_dir=.
21334    for ac_exec_ext in '' $ac_executable_extensions; do
21335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21336    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21338    break 2
21339  fi
21340done
21341  done
21342IFS=$as_save_IFS
21343
21344  ;;
21345esac
21346fi
21347UNZIP=$ac_cv_path_UNZIP
21348if test -n "$UNZIP"; then
21349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21350$as_echo "$UNZIP" >&6; }
21351else
21352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21353$as_echo "no" >&6; }
21354fi
21355
21356
21357          if test "x$UNZIP" = x; then
21358            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21359          fi
21360        else
21361          # Otherwise we believe it is a complete path. Use it as it is.
21362          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21363$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21364          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21365$as_echo_n "checking for UNZIP... " >&6; }
21366          if test ! -x "$tool_specified"; then
21367            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21368$as_echo "not found" >&6; }
21369            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21370          fi
21371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21372$as_echo "$tool_specified" >&6; }
21373        fi
21374      fi
21375    fi
21376
21377  fi
21378
21379
21380
21381  if test "x$UNZIP" = x; then
21382    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21383  fi
21384
21385
21386  # Since zip uses "ZIP" as a environment variable for passing options, we need
21387  # to name our variable differently, hence ZIPEXE.
21388
21389
21390
21391  # Publish this variable in the help.
21392
21393
21394  if [ -z "${ZIPEXE+x}" ]; then
21395    # The variable is not set by user, try to locate tool using the code snippet
21396    for ac_prog in zip
21397do
21398  # Extract the first word of "$ac_prog", so it can be a program name with args.
21399set dummy $ac_prog; ac_word=$2
21400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21401$as_echo_n "checking for $ac_word... " >&6; }
21402if ${ac_cv_path_ZIPEXE+:} false; then :
21403  $as_echo_n "(cached) " >&6
21404else
21405  case $ZIPEXE in
21406  [\\/]* | ?:[\\/]*)
21407  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21408  ;;
21409  *)
21410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21411for as_dir in $PATH
21412do
21413  IFS=$as_save_IFS
21414  test -z "$as_dir" && as_dir=.
21415    for ac_exec_ext in '' $ac_executable_extensions; do
21416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21417    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21419    break 2
21420  fi
21421done
21422  done
21423IFS=$as_save_IFS
21424
21425  ;;
21426esac
21427fi
21428ZIPEXE=$ac_cv_path_ZIPEXE
21429if test -n "$ZIPEXE"; then
21430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21431$as_echo "$ZIPEXE" >&6; }
21432else
21433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21434$as_echo "no" >&6; }
21435fi
21436
21437
21438  test -n "$ZIPEXE" && break
21439done
21440
21441  else
21442    # The variable is set, but is it from the command line or the environment?
21443
21444    # Try to remove the string !ZIPEXE! from our list.
21445    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21446    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21447      # If it failed, the variable was not from the command line. Ignore it,
21448      # but warn the user (except for BASH, which is always set by the calling BASH).
21449      if test "xZIPEXE" != xBASH; then
21450        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21451$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21452      fi
21453      # Try to locate tool using the code snippet
21454      for ac_prog in zip
21455do
21456  # Extract the first word of "$ac_prog", so it can be a program name with args.
21457set dummy $ac_prog; ac_word=$2
21458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21459$as_echo_n "checking for $ac_word... " >&6; }
21460if ${ac_cv_path_ZIPEXE+:} false; then :
21461  $as_echo_n "(cached) " >&6
21462else
21463  case $ZIPEXE in
21464  [\\/]* | ?:[\\/]*)
21465  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21466  ;;
21467  *)
21468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21469for as_dir in $PATH
21470do
21471  IFS=$as_save_IFS
21472  test -z "$as_dir" && as_dir=.
21473    for ac_exec_ext in '' $ac_executable_extensions; do
21474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21475    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21477    break 2
21478  fi
21479done
21480  done
21481IFS=$as_save_IFS
21482
21483  ;;
21484esac
21485fi
21486ZIPEXE=$ac_cv_path_ZIPEXE
21487if test -n "$ZIPEXE"; then
21488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21489$as_echo "$ZIPEXE" >&6; }
21490else
21491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21492$as_echo "no" >&6; }
21493fi
21494
21495
21496  test -n "$ZIPEXE" && break
21497done
21498
21499    else
21500      # If it succeeded, then it was overridden by the user. We will use it
21501      # for the tool.
21502
21503      # First remove it from the list of overridden variables, so we can test
21504      # for unknown variables in the end.
21505      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21506
21507      # Check if we try to supply an empty value
21508      if test "x$ZIPEXE" = x; then
21509        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21510$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21511        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21512$as_echo_n "checking for ZIPEXE... " >&6; }
21513        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21514$as_echo "disabled" >&6; }
21515      else
21516        # Check if the provided tool contains a complete path.
21517        tool_specified="$ZIPEXE"
21518        tool_basename="${tool_specified##*/}"
21519        if test "x$tool_basename" = "x$tool_specified"; then
21520          # A command without a complete path is provided, search $PATH.
21521          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21522$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21523          # Extract the first word of "$tool_basename", so it can be a program name with args.
21524set dummy $tool_basename; ac_word=$2
21525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21526$as_echo_n "checking for $ac_word... " >&6; }
21527if ${ac_cv_path_ZIPEXE+:} false; then :
21528  $as_echo_n "(cached) " >&6
21529else
21530  case $ZIPEXE in
21531  [\\/]* | ?:[\\/]*)
21532  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21533  ;;
21534  *)
21535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21536for as_dir in $PATH
21537do
21538  IFS=$as_save_IFS
21539  test -z "$as_dir" && as_dir=.
21540    for ac_exec_ext in '' $ac_executable_extensions; do
21541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21542    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21544    break 2
21545  fi
21546done
21547  done
21548IFS=$as_save_IFS
21549
21550  ;;
21551esac
21552fi
21553ZIPEXE=$ac_cv_path_ZIPEXE
21554if test -n "$ZIPEXE"; then
21555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21556$as_echo "$ZIPEXE" >&6; }
21557else
21558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21559$as_echo "no" >&6; }
21560fi
21561
21562
21563          if test "x$ZIPEXE" = x; then
21564            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21565          fi
21566        else
21567          # Otherwise we believe it is a complete path. Use it as it is.
21568          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21569$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21570          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21571$as_echo_n "checking for ZIPEXE... " >&6; }
21572          if test ! -x "$tool_specified"; then
21573            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21574$as_echo "not found" >&6; }
21575            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21576          fi
21577          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21578$as_echo "$tool_specified" >&6; }
21579        fi
21580      fi
21581    fi
21582
21583  fi
21584
21585
21586
21587  if test "x$ZIPEXE" = x; then
21588    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21589  fi
21590
21591
21592
21593  # Non-required basic tools
21594
21595
21596
21597  # Publish this variable in the help.
21598
21599
21600  if [ -z "${LDD+x}" ]; then
21601    # The variable is not set by user, try to locate tool using the code snippet
21602    for ac_prog in ldd
21603do
21604  # Extract the first word of "$ac_prog", so it can be a program name with args.
21605set dummy $ac_prog; ac_word=$2
21606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21607$as_echo_n "checking for $ac_word... " >&6; }
21608if ${ac_cv_path_LDD+:} false; then :
21609  $as_echo_n "(cached) " >&6
21610else
21611  case $LDD in
21612  [\\/]* | ?:[\\/]*)
21613  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21614  ;;
21615  *)
21616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21617for as_dir in $PATH
21618do
21619  IFS=$as_save_IFS
21620  test -z "$as_dir" && as_dir=.
21621    for ac_exec_ext in '' $ac_executable_extensions; do
21622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21623    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21625    break 2
21626  fi
21627done
21628  done
21629IFS=$as_save_IFS
21630
21631  ;;
21632esac
21633fi
21634LDD=$ac_cv_path_LDD
21635if test -n "$LDD"; then
21636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21637$as_echo "$LDD" >&6; }
21638else
21639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21640$as_echo "no" >&6; }
21641fi
21642
21643
21644  test -n "$LDD" && break
21645done
21646
21647  else
21648    # The variable is set, but is it from the command line or the environment?
21649
21650    # Try to remove the string !LDD! from our list.
21651    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21652    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21653      # If it failed, the variable was not from the command line. Ignore it,
21654      # but warn the user (except for BASH, which is always set by the calling BASH).
21655      if test "xLDD" != xBASH; then
21656        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21657$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21658      fi
21659      # Try to locate tool using the code snippet
21660      for ac_prog in ldd
21661do
21662  # Extract the first word of "$ac_prog", so it can be a program name with args.
21663set dummy $ac_prog; ac_word=$2
21664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21665$as_echo_n "checking for $ac_word... " >&6; }
21666if ${ac_cv_path_LDD+:} false; then :
21667  $as_echo_n "(cached) " >&6
21668else
21669  case $LDD in
21670  [\\/]* | ?:[\\/]*)
21671  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21672  ;;
21673  *)
21674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21675for as_dir in $PATH
21676do
21677  IFS=$as_save_IFS
21678  test -z "$as_dir" && as_dir=.
21679    for ac_exec_ext in '' $ac_executable_extensions; do
21680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21681    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21683    break 2
21684  fi
21685done
21686  done
21687IFS=$as_save_IFS
21688
21689  ;;
21690esac
21691fi
21692LDD=$ac_cv_path_LDD
21693if test -n "$LDD"; then
21694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21695$as_echo "$LDD" >&6; }
21696else
21697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21698$as_echo "no" >&6; }
21699fi
21700
21701
21702  test -n "$LDD" && break
21703done
21704
21705    else
21706      # If it succeeded, then it was overridden by the user. We will use it
21707      # for the tool.
21708
21709      # First remove it from the list of overridden variables, so we can test
21710      # for unknown variables in the end.
21711      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21712
21713      # Check if we try to supply an empty value
21714      if test "x$LDD" = x; then
21715        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21716$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21717        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21718$as_echo_n "checking for LDD... " >&6; }
21719        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21720$as_echo "disabled" >&6; }
21721      else
21722        # Check if the provided tool contains a complete path.
21723        tool_specified="$LDD"
21724        tool_basename="${tool_specified##*/}"
21725        if test "x$tool_basename" = "x$tool_specified"; then
21726          # A command without a complete path is provided, search $PATH.
21727          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21728$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21729          # Extract the first word of "$tool_basename", so it can be a program name with args.
21730set dummy $tool_basename; ac_word=$2
21731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21732$as_echo_n "checking for $ac_word... " >&6; }
21733if ${ac_cv_path_LDD+:} false; then :
21734  $as_echo_n "(cached) " >&6
21735else
21736  case $LDD in
21737  [\\/]* | ?:[\\/]*)
21738  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21739  ;;
21740  *)
21741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21742for as_dir in $PATH
21743do
21744  IFS=$as_save_IFS
21745  test -z "$as_dir" && as_dir=.
21746    for ac_exec_ext in '' $ac_executable_extensions; do
21747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21748    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21750    break 2
21751  fi
21752done
21753  done
21754IFS=$as_save_IFS
21755
21756  ;;
21757esac
21758fi
21759LDD=$ac_cv_path_LDD
21760if test -n "$LDD"; then
21761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21762$as_echo "$LDD" >&6; }
21763else
21764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21765$as_echo "no" >&6; }
21766fi
21767
21768
21769          if test "x$LDD" = x; then
21770            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21771          fi
21772        else
21773          # Otherwise we believe it is a complete path. Use it as it is.
21774          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21775$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21776          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21777$as_echo_n "checking for LDD... " >&6; }
21778          if test ! -x "$tool_specified"; then
21779            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21780$as_echo "not found" >&6; }
21781            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21782          fi
21783          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21784$as_echo "$tool_specified" >&6; }
21785        fi
21786      fi
21787    fi
21788
21789  fi
21790
21791
21792  if test "x$LDD" = "x"; then
21793    # List shared lib dependencies is used for
21794    # debug output and checking for forbidden dependencies.
21795    # We can build without it.
21796    LDD="true"
21797  fi
21798
21799
21800  # Publish this variable in the help.
21801
21802
21803  if [ -z "${OTOOL+x}" ]; then
21804    # The variable is not set by user, try to locate tool using the code snippet
21805    for ac_prog in otool
21806do
21807  # Extract the first word of "$ac_prog", so it can be a program name with args.
21808set dummy $ac_prog; ac_word=$2
21809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21810$as_echo_n "checking for $ac_word... " >&6; }
21811if ${ac_cv_path_OTOOL+:} false; then :
21812  $as_echo_n "(cached) " >&6
21813else
21814  case $OTOOL in
21815  [\\/]* | ?:[\\/]*)
21816  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21817  ;;
21818  *)
21819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21820for as_dir in $PATH
21821do
21822  IFS=$as_save_IFS
21823  test -z "$as_dir" && as_dir=.
21824    for ac_exec_ext in '' $ac_executable_extensions; do
21825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21826    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21828    break 2
21829  fi
21830done
21831  done
21832IFS=$as_save_IFS
21833
21834  ;;
21835esac
21836fi
21837OTOOL=$ac_cv_path_OTOOL
21838if test -n "$OTOOL"; then
21839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21840$as_echo "$OTOOL" >&6; }
21841else
21842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21843$as_echo "no" >&6; }
21844fi
21845
21846
21847  test -n "$OTOOL" && break
21848done
21849
21850  else
21851    # The variable is set, but is it from the command line or the environment?
21852
21853    # Try to remove the string !OTOOL! from our list.
21854    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21855    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21856      # If it failed, the variable was not from the command line. Ignore it,
21857      # but warn the user (except for BASH, which is always set by the calling BASH).
21858      if test "xOTOOL" != xBASH; then
21859        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21860$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21861      fi
21862      # Try to locate tool using the code snippet
21863      for ac_prog in otool
21864do
21865  # Extract the first word of "$ac_prog", so it can be a program name with args.
21866set dummy $ac_prog; ac_word=$2
21867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21868$as_echo_n "checking for $ac_word... " >&6; }
21869if ${ac_cv_path_OTOOL+:} false; then :
21870  $as_echo_n "(cached) " >&6
21871else
21872  case $OTOOL in
21873  [\\/]* | ?:[\\/]*)
21874  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21875  ;;
21876  *)
21877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21878for as_dir in $PATH
21879do
21880  IFS=$as_save_IFS
21881  test -z "$as_dir" && as_dir=.
21882    for ac_exec_ext in '' $ac_executable_extensions; do
21883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21884    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21886    break 2
21887  fi
21888done
21889  done
21890IFS=$as_save_IFS
21891
21892  ;;
21893esac
21894fi
21895OTOOL=$ac_cv_path_OTOOL
21896if test -n "$OTOOL"; then
21897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21898$as_echo "$OTOOL" >&6; }
21899else
21900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21901$as_echo "no" >&6; }
21902fi
21903
21904
21905  test -n "$OTOOL" && break
21906done
21907
21908    else
21909      # If it succeeded, then it was overridden by the user. We will use it
21910      # for the tool.
21911
21912      # First remove it from the list of overridden variables, so we can test
21913      # for unknown variables in the end.
21914      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21915
21916      # Check if we try to supply an empty value
21917      if test "x$OTOOL" = x; then
21918        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21919$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21920        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21921$as_echo_n "checking for OTOOL... " >&6; }
21922        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21923$as_echo "disabled" >&6; }
21924      else
21925        # Check if the provided tool contains a complete path.
21926        tool_specified="$OTOOL"
21927        tool_basename="${tool_specified##*/}"
21928        if test "x$tool_basename" = "x$tool_specified"; then
21929          # A command without a complete path is provided, search $PATH.
21930          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21931$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21932          # Extract the first word of "$tool_basename", so it can be a program name with args.
21933set dummy $tool_basename; ac_word=$2
21934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21935$as_echo_n "checking for $ac_word... " >&6; }
21936if ${ac_cv_path_OTOOL+:} false; then :
21937  $as_echo_n "(cached) " >&6
21938else
21939  case $OTOOL in
21940  [\\/]* | ?:[\\/]*)
21941  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21942  ;;
21943  *)
21944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21945for as_dir in $PATH
21946do
21947  IFS=$as_save_IFS
21948  test -z "$as_dir" && as_dir=.
21949    for ac_exec_ext in '' $ac_executable_extensions; do
21950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21951    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21953    break 2
21954  fi
21955done
21956  done
21957IFS=$as_save_IFS
21958
21959  ;;
21960esac
21961fi
21962OTOOL=$ac_cv_path_OTOOL
21963if test -n "$OTOOL"; then
21964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21965$as_echo "$OTOOL" >&6; }
21966else
21967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21968$as_echo "no" >&6; }
21969fi
21970
21971
21972          if test "x$OTOOL" = x; then
21973            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21974          fi
21975        else
21976          # Otherwise we believe it is a complete path. Use it as it is.
21977          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21978$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21979          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21980$as_echo_n "checking for OTOOL... " >&6; }
21981          if test ! -x "$tool_specified"; then
21982            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21983$as_echo "not found" >&6; }
21984            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21985          fi
21986          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21987$as_echo "$tool_specified" >&6; }
21988        fi
21989      fi
21990    fi
21991
21992  fi
21993
21994
21995  if test "x$OTOOL" = "x"; then
21996    OTOOL="true"
21997  fi
21998
21999
22000  # Publish this variable in the help.
22001
22002
22003  if [ -z "${READELF+x}" ]; then
22004    # The variable is not set by user, try to locate tool using the code snippet
22005    for ac_prog in greadelf readelf
22006do
22007  # Extract the first word of "$ac_prog", so it can be a program name with args.
22008set dummy $ac_prog; ac_word=$2
22009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22010$as_echo_n "checking for $ac_word... " >&6; }
22011if ${ac_cv_path_READELF+:} false; then :
22012  $as_echo_n "(cached) " >&6
22013else
22014  case $READELF in
22015  [\\/]* | ?:[\\/]*)
22016  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22017  ;;
22018  *)
22019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22020for as_dir in $PATH
22021do
22022  IFS=$as_save_IFS
22023  test -z "$as_dir" && as_dir=.
22024    for ac_exec_ext in '' $ac_executable_extensions; do
22025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22026    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22028    break 2
22029  fi
22030done
22031  done
22032IFS=$as_save_IFS
22033
22034  ;;
22035esac
22036fi
22037READELF=$ac_cv_path_READELF
22038if test -n "$READELF"; then
22039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22040$as_echo "$READELF" >&6; }
22041else
22042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22043$as_echo "no" >&6; }
22044fi
22045
22046
22047  test -n "$READELF" && break
22048done
22049
22050  else
22051    # The variable is set, but is it from the command line or the environment?
22052
22053    # Try to remove the string !READELF! from our list.
22054    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22055    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22056      # If it failed, the variable was not from the command line. Ignore it,
22057      # but warn the user (except for BASH, which is always set by the calling BASH).
22058      if test "xREADELF" != xBASH; then
22059        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22060$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22061      fi
22062      # Try to locate tool using the code snippet
22063      for ac_prog in greadelf readelf
22064do
22065  # Extract the first word of "$ac_prog", so it can be a program name with args.
22066set dummy $ac_prog; ac_word=$2
22067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22068$as_echo_n "checking for $ac_word... " >&6; }
22069if ${ac_cv_path_READELF+:} false; then :
22070  $as_echo_n "(cached) " >&6
22071else
22072  case $READELF in
22073  [\\/]* | ?:[\\/]*)
22074  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22075  ;;
22076  *)
22077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22078for as_dir in $PATH
22079do
22080  IFS=$as_save_IFS
22081  test -z "$as_dir" && as_dir=.
22082    for ac_exec_ext in '' $ac_executable_extensions; do
22083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22084    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22086    break 2
22087  fi
22088done
22089  done
22090IFS=$as_save_IFS
22091
22092  ;;
22093esac
22094fi
22095READELF=$ac_cv_path_READELF
22096if test -n "$READELF"; then
22097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22098$as_echo "$READELF" >&6; }
22099else
22100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22101$as_echo "no" >&6; }
22102fi
22103
22104
22105  test -n "$READELF" && break
22106done
22107
22108    else
22109      # If it succeeded, then it was overridden by the user. We will use it
22110      # for the tool.
22111
22112      # First remove it from the list of overridden variables, so we can test
22113      # for unknown variables in the end.
22114      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22115
22116      # Check if we try to supply an empty value
22117      if test "x$READELF" = x; then
22118        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22119$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22120        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22121$as_echo_n "checking for READELF... " >&6; }
22122        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22123$as_echo "disabled" >&6; }
22124      else
22125        # Check if the provided tool contains a complete path.
22126        tool_specified="$READELF"
22127        tool_basename="${tool_specified##*/}"
22128        if test "x$tool_basename" = "x$tool_specified"; then
22129          # A command without a complete path is provided, search $PATH.
22130          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22131$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22132          # Extract the first word of "$tool_basename", so it can be a program name with args.
22133set dummy $tool_basename; ac_word=$2
22134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22135$as_echo_n "checking for $ac_word... " >&6; }
22136if ${ac_cv_path_READELF+:} false; then :
22137  $as_echo_n "(cached) " >&6
22138else
22139  case $READELF in
22140  [\\/]* | ?:[\\/]*)
22141  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22142  ;;
22143  *)
22144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22145for as_dir in $PATH
22146do
22147  IFS=$as_save_IFS
22148  test -z "$as_dir" && as_dir=.
22149    for ac_exec_ext in '' $ac_executable_extensions; do
22150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22151    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22153    break 2
22154  fi
22155done
22156  done
22157IFS=$as_save_IFS
22158
22159  ;;
22160esac
22161fi
22162READELF=$ac_cv_path_READELF
22163if test -n "$READELF"; then
22164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22165$as_echo "$READELF" >&6; }
22166else
22167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22168$as_echo "no" >&6; }
22169fi
22170
22171
22172          if test "x$READELF" = x; then
22173            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22174          fi
22175        else
22176          # Otherwise we believe it is a complete path. Use it as it is.
22177          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22178$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22179          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22180$as_echo_n "checking for READELF... " >&6; }
22181          if test ! -x "$tool_specified"; then
22182            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22183$as_echo "not found" >&6; }
22184            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22185          fi
22186          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22187$as_echo "$tool_specified" >&6; }
22188        fi
22189      fi
22190    fi
22191
22192  fi
22193
22194
22195
22196
22197  # Publish this variable in the help.
22198
22199
22200  if [ -z "${HG+x}" ]; then
22201    # The variable is not set by user, try to locate tool using the code snippet
22202    for ac_prog in hg
22203do
22204  # Extract the first word of "$ac_prog", so it can be a program name with args.
22205set dummy $ac_prog; ac_word=$2
22206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22207$as_echo_n "checking for $ac_word... " >&6; }
22208if ${ac_cv_path_HG+:} false; then :
22209  $as_echo_n "(cached) " >&6
22210else
22211  case $HG in
22212  [\\/]* | ?:[\\/]*)
22213  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22214  ;;
22215  *)
22216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22217for as_dir in $PATH
22218do
22219  IFS=$as_save_IFS
22220  test -z "$as_dir" && as_dir=.
22221    for ac_exec_ext in '' $ac_executable_extensions; do
22222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22223    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22225    break 2
22226  fi
22227done
22228  done
22229IFS=$as_save_IFS
22230
22231  ;;
22232esac
22233fi
22234HG=$ac_cv_path_HG
22235if test -n "$HG"; then
22236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22237$as_echo "$HG" >&6; }
22238else
22239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22240$as_echo "no" >&6; }
22241fi
22242
22243
22244  test -n "$HG" && break
22245done
22246
22247  else
22248    # The variable is set, but is it from the command line or the environment?
22249
22250    # Try to remove the string !HG! from our list.
22251    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22252    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22253      # If it failed, the variable was not from the command line. Ignore it,
22254      # but warn the user (except for BASH, which is always set by the calling BASH).
22255      if test "xHG" != xBASH; then
22256        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22257$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22258      fi
22259      # Try to locate tool using the code snippet
22260      for ac_prog in hg
22261do
22262  # Extract the first word of "$ac_prog", so it can be a program name with args.
22263set dummy $ac_prog; ac_word=$2
22264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22265$as_echo_n "checking for $ac_word... " >&6; }
22266if ${ac_cv_path_HG+:} false; then :
22267  $as_echo_n "(cached) " >&6
22268else
22269  case $HG in
22270  [\\/]* | ?:[\\/]*)
22271  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22272  ;;
22273  *)
22274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22275for as_dir in $PATH
22276do
22277  IFS=$as_save_IFS
22278  test -z "$as_dir" && as_dir=.
22279    for ac_exec_ext in '' $ac_executable_extensions; do
22280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22281    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22283    break 2
22284  fi
22285done
22286  done
22287IFS=$as_save_IFS
22288
22289  ;;
22290esac
22291fi
22292HG=$ac_cv_path_HG
22293if test -n "$HG"; then
22294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22295$as_echo "$HG" >&6; }
22296else
22297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22298$as_echo "no" >&6; }
22299fi
22300
22301
22302  test -n "$HG" && break
22303done
22304
22305    else
22306      # If it succeeded, then it was overridden by the user. We will use it
22307      # for the tool.
22308
22309      # First remove it from the list of overridden variables, so we can test
22310      # for unknown variables in the end.
22311      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22312
22313      # Check if we try to supply an empty value
22314      if test "x$HG" = x; then
22315        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22316$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22317        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22318$as_echo_n "checking for HG... " >&6; }
22319        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22320$as_echo "disabled" >&6; }
22321      else
22322        # Check if the provided tool contains a complete path.
22323        tool_specified="$HG"
22324        tool_basename="${tool_specified##*/}"
22325        if test "x$tool_basename" = "x$tool_specified"; then
22326          # A command without a complete path is provided, search $PATH.
22327          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22328$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22329          # Extract the first word of "$tool_basename", so it can be a program name with args.
22330set dummy $tool_basename; ac_word=$2
22331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22332$as_echo_n "checking for $ac_word... " >&6; }
22333if ${ac_cv_path_HG+:} false; then :
22334  $as_echo_n "(cached) " >&6
22335else
22336  case $HG in
22337  [\\/]* | ?:[\\/]*)
22338  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22339  ;;
22340  *)
22341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22342for as_dir in $PATH
22343do
22344  IFS=$as_save_IFS
22345  test -z "$as_dir" && as_dir=.
22346    for ac_exec_ext in '' $ac_executable_extensions; do
22347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22348    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22350    break 2
22351  fi
22352done
22353  done
22354IFS=$as_save_IFS
22355
22356  ;;
22357esac
22358fi
22359HG=$ac_cv_path_HG
22360if test -n "$HG"; then
22361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22362$as_echo "$HG" >&6; }
22363else
22364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22365$as_echo "no" >&6; }
22366fi
22367
22368
22369          if test "x$HG" = x; then
22370            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22371          fi
22372        else
22373          # Otherwise we believe it is a complete path. Use it as it is.
22374          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22375$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22376          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22377$as_echo_n "checking for HG... " >&6; }
22378          if test ! -x "$tool_specified"; then
22379            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22380$as_echo "not found" >&6; }
22381            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22382          fi
22383          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22384$as_echo "$tool_specified" >&6; }
22385        fi
22386      fi
22387    fi
22388
22389  fi
22390
22391
22392
22393
22394  # Publish this variable in the help.
22395
22396
22397  if [ -z "${STAT+x}" ]; then
22398    # The variable is not set by user, try to locate tool using the code snippet
22399    for ac_prog in stat
22400do
22401  # Extract the first word of "$ac_prog", so it can be a program name with args.
22402set dummy $ac_prog; ac_word=$2
22403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22404$as_echo_n "checking for $ac_word... " >&6; }
22405if ${ac_cv_path_STAT+:} false; then :
22406  $as_echo_n "(cached) " >&6
22407else
22408  case $STAT in
22409  [\\/]* | ?:[\\/]*)
22410  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22411  ;;
22412  *)
22413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22414for as_dir in $PATH
22415do
22416  IFS=$as_save_IFS
22417  test -z "$as_dir" && as_dir=.
22418    for ac_exec_ext in '' $ac_executable_extensions; do
22419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22420    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22422    break 2
22423  fi
22424done
22425  done
22426IFS=$as_save_IFS
22427
22428  ;;
22429esac
22430fi
22431STAT=$ac_cv_path_STAT
22432if test -n "$STAT"; then
22433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22434$as_echo "$STAT" >&6; }
22435else
22436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22437$as_echo "no" >&6; }
22438fi
22439
22440
22441  test -n "$STAT" && break
22442done
22443
22444  else
22445    # The variable is set, but is it from the command line or the environment?
22446
22447    # Try to remove the string !STAT! from our list.
22448    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22449    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22450      # If it failed, the variable was not from the command line. Ignore it,
22451      # but warn the user (except for BASH, which is always set by the calling BASH).
22452      if test "xSTAT" != xBASH; then
22453        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22454$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22455      fi
22456      # Try to locate tool using the code snippet
22457      for ac_prog in stat
22458do
22459  # Extract the first word of "$ac_prog", so it can be a program name with args.
22460set dummy $ac_prog; ac_word=$2
22461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22462$as_echo_n "checking for $ac_word... " >&6; }
22463if ${ac_cv_path_STAT+:} false; then :
22464  $as_echo_n "(cached) " >&6
22465else
22466  case $STAT in
22467  [\\/]* | ?:[\\/]*)
22468  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22469  ;;
22470  *)
22471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22472for as_dir in $PATH
22473do
22474  IFS=$as_save_IFS
22475  test -z "$as_dir" && as_dir=.
22476    for ac_exec_ext in '' $ac_executable_extensions; do
22477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22478    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22480    break 2
22481  fi
22482done
22483  done
22484IFS=$as_save_IFS
22485
22486  ;;
22487esac
22488fi
22489STAT=$ac_cv_path_STAT
22490if test -n "$STAT"; then
22491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22492$as_echo "$STAT" >&6; }
22493else
22494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22495$as_echo "no" >&6; }
22496fi
22497
22498
22499  test -n "$STAT" && break
22500done
22501
22502    else
22503      # If it succeeded, then it was overridden by the user. We will use it
22504      # for the tool.
22505
22506      # First remove it from the list of overridden variables, so we can test
22507      # for unknown variables in the end.
22508      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22509
22510      # Check if we try to supply an empty value
22511      if test "x$STAT" = x; then
22512        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22513$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22514        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22515$as_echo_n "checking for STAT... " >&6; }
22516        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22517$as_echo "disabled" >&6; }
22518      else
22519        # Check if the provided tool contains a complete path.
22520        tool_specified="$STAT"
22521        tool_basename="${tool_specified##*/}"
22522        if test "x$tool_basename" = "x$tool_specified"; then
22523          # A command without a complete path is provided, search $PATH.
22524          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22525$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22526          # Extract the first word of "$tool_basename", so it can be a program name with args.
22527set dummy $tool_basename; ac_word=$2
22528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22529$as_echo_n "checking for $ac_word... " >&6; }
22530if ${ac_cv_path_STAT+:} false; then :
22531  $as_echo_n "(cached) " >&6
22532else
22533  case $STAT in
22534  [\\/]* | ?:[\\/]*)
22535  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22536  ;;
22537  *)
22538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22539for as_dir in $PATH
22540do
22541  IFS=$as_save_IFS
22542  test -z "$as_dir" && as_dir=.
22543    for ac_exec_ext in '' $ac_executable_extensions; do
22544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22545    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22547    break 2
22548  fi
22549done
22550  done
22551IFS=$as_save_IFS
22552
22553  ;;
22554esac
22555fi
22556STAT=$ac_cv_path_STAT
22557if test -n "$STAT"; then
22558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22559$as_echo "$STAT" >&6; }
22560else
22561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22562$as_echo "no" >&6; }
22563fi
22564
22565
22566          if test "x$STAT" = x; then
22567            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22568          fi
22569        else
22570          # Otherwise we believe it is a complete path. Use it as it is.
22571          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22572$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22573          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22574$as_echo_n "checking for STAT... " >&6; }
22575          if test ! -x "$tool_specified"; then
22576            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22577$as_echo "not found" >&6; }
22578            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22579          fi
22580          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22581$as_echo "$tool_specified" >&6; }
22582        fi
22583      fi
22584    fi
22585
22586  fi
22587
22588
22589
22590
22591  # Publish this variable in the help.
22592
22593
22594  if [ -z "${TIME+x}" ]; then
22595    # The variable is not set by user, try to locate tool using the code snippet
22596    for ac_prog in time
22597do
22598  # Extract the first word of "$ac_prog", so it can be a program name with args.
22599set dummy $ac_prog; ac_word=$2
22600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22601$as_echo_n "checking for $ac_word... " >&6; }
22602if ${ac_cv_path_TIME+:} false; then :
22603  $as_echo_n "(cached) " >&6
22604else
22605  case $TIME in
22606  [\\/]* | ?:[\\/]*)
22607  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22608  ;;
22609  *)
22610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22611for as_dir in $PATH
22612do
22613  IFS=$as_save_IFS
22614  test -z "$as_dir" && as_dir=.
22615    for ac_exec_ext in '' $ac_executable_extensions; do
22616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22617    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22619    break 2
22620  fi
22621done
22622  done
22623IFS=$as_save_IFS
22624
22625  ;;
22626esac
22627fi
22628TIME=$ac_cv_path_TIME
22629if test -n "$TIME"; then
22630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22631$as_echo "$TIME" >&6; }
22632else
22633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22634$as_echo "no" >&6; }
22635fi
22636
22637
22638  test -n "$TIME" && break
22639done
22640
22641  else
22642    # The variable is set, but is it from the command line or the environment?
22643
22644    # Try to remove the string !TIME! from our list.
22645    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22646    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22647      # If it failed, the variable was not from the command line. Ignore it,
22648      # but warn the user (except for BASH, which is always set by the calling BASH).
22649      if test "xTIME" != xBASH; then
22650        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22651$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22652      fi
22653      # Try to locate tool using the code snippet
22654      for ac_prog in time
22655do
22656  # Extract the first word of "$ac_prog", so it can be a program name with args.
22657set dummy $ac_prog; ac_word=$2
22658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22659$as_echo_n "checking for $ac_word... " >&6; }
22660if ${ac_cv_path_TIME+:} false; then :
22661  $as_echo_n "(cached) " >&6
22662else
22663  case $TIME in
22664  [\\/]* | ?:[\\/]*)
22665  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22666  ;;
22667  *)
22668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22669for as_dir in $PATH
22670do
22671  IFS=$as_save_IFS
22672  test -z "$as_dir" && as_dir=.
22673    for ac_exec_ext in '' $ac_executable_extensions; do
22674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22675    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22677    break 2
22678  fi
22679done
22680  done
22681IFS=$as_save_IFS
22682
22683  ;;
22684esac
22685fi
22686TIME=$ac_cv_path_TIME
22687if test -n "$TIME"; then
22688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22689$as_echo "$TIME" >&6; }
22690else
22691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22692$as_echo "no" >&6; }
22693fi
22694
22695
22696  test -n "$TIME" && break
22697done
22698
22699    else
22700      # If it succeeded, then it was overridden by the user. We will use it
22701      # for the tool.
22702
22703      # First remove it from the list of overridden variables, so we can test
22704      # for unknown variables in the end.
22705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22706
22707      # Check if we try to supply an empty value
22708      if test "x$TIME" = x; then
22709        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22710$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22711        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22712$as_echo_n "checking for TIME... " >&6; }
22713        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22714$as_echo "disabled" >&6; }
22715      else
22716        # Check if the provided tool contains a complete path.
22717        tool_specified="$TIME"
22718        tool_basename="${tool_specified##*/}"
22719        if test "x$tool_basename" = "x$tool_specified"; then
22720          # A command without a complete path is provided, search $PATH.
22721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22722$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22723          # Extract the first word of "$tool_basename", so it can be a program name with args.
22724set dummy $tool_basename; ac_word=$2
22725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22726$as_echo_n "checking for $ac_word... " >&6; }
22727if ${ac_cv_path_TIME+:} false; then :
22728  $as_echo_n "(cached) " >&6
22729else
22730  case $TIME in
22731  [\\/]* | ?:[\\/]*)
22732  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22733  ;;
22734  *)
22735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22736for as_dir in $PATH
22737do
22738  IFS=$as_save_IFS
22739  test -z "$as_dir" && as_dir=.
22740    for ac_exec_ext in '' $ac_executable_extensions; do
22741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22742    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22744    break 2
22745  fi
22746done
22747  done
22748IFS=$as_save_IFS
22749
22750  ;;
22751esac
22752fi
22753TIME=$ac_cv_path_TIME
22754if test -n "$TIME"; then
22755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22756$as_echo "$TIME" >&6; }
22757else
22758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22759$as_echo "no" >&6; }
22760fi
22761
22762
22763          if test "x$TIME" = x; then
22764            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22765          fi
22766        else
22767          # Otherwise we believe it is a complete path. Use it as it is.
22768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22769$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22770          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22771$as_echo_n "checking for TIME... " >&6; }
22772          if test ! -x "$tool_specified"; then
22773            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22774$as_echo "not found" >&6; }
22775            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22776          fi
22777          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22778$as_echo "$tool_specified" >&6; }
22779        fi
22780      fi
22781    fi
22782
22783  fi
22784
22785
22786  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22787  # be in the user path.
22788
22789
22790  # Publish this variable in the help.
22791
22792
22793  if [ -z "${DTRACE+x}" ]; then
22794    # The variable is not set by user, try to locate tool using the code snippet
22795    for ac_prog in dtrace
22796do
22797  # Extract the first word of "$ac_prog", so it can be a program name with args.
22798set dummy $ac_prog; ac_word=$2
22799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22800$as_echo_n "checking for $ac_word... " >&6; }
22801if ${ac_cv_path_DTRACE+:} false; then :
22802  $as_echo_n "(cached) " >&6
22803else
22804  case $DTRACE in
22805  [\\/]* | ?:[\\/]*)
22806  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22807  ;;
22808  *)
22809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22810as_dummy="$PATH:/usr/sbin"
22811for as_dir in $as_dummy
22812do
22813  IFS=$as_save_IFS
22814  test -z "$as_dir" && as_dir=.
22815    for ac_exec_ext in '' $ac_executable_extensions; do
22816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22817    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22819    break 2
22820  fi
22821done
22822  done
22823IFS=$as_save_IFS
22824
22825  ;;
22826esac
22827fi
22828DTRACE=$ac_cv_path_DTRACE
22829if test -n "$DTRACE"; then
22830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22831$as_echo "$DTRACE" >&6; }
22832else
22833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22834$as_echo "no" >&6; }
22835fi
22836
22837
22838  test -n "$DTRACE" && break
22839done
22840
22841  else
22842    # The variable is set, but is it from the command line or the environment?
22843
22844    # Try to remove the string !DTRACE! from our list.
22845    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22846    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22847      # If it failed, the variable was not from the command line. Ignore it,
22848      # but warn the user (except for BASH, which is always set by the calling BASH).
22849      if test "xDTRACE" != xBASH; then
22850        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22851$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22852      fi
22853      # Try to locate tool using the code snippet
22854      for ac_prog in dtrace
22855do
22856  # Extract the first word of "$ac_prog", so it can be a program name with args.
22857set dummy $ac_prog; ac_word=$2
22858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22859$as_echo_n "checking for $ac_word... " >&6; }
22860if ${ac_cv_path_DTRACE+:} false; then :
22861  $as_echo_n "(cached) " >&6
22862else
22863  case $DTRACE in
22864  [\\/]* | ?:[\\/]*)
22865  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22866  ;;
22867  *)
22868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22869as_dummy="$PATH:/usr/sbin"
22870for as_dir in $as_dummy
22871do
22872  IFS=$as_save_IFS
22873  test -z "$as_dir" && as_dir=.
22874    for ac_exec_ext in '' $ac_executable_extensions; do
22875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22876    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22878    break 2
22879  fi
22880done
22881  done
22882IFS=$as_save_IFS
22883
22884  ;;
22885esac
22886fi
22887DTRACE=$ac_cv_path_DTRACE
22888if test -n "$DTRACE"; then
22889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22890$as_echo "$DTRACE" >&6; }
22891else
22892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22893$as_echo "no" >&6; }
22894fi
22895
22896
22897  test -n "$DTRACE" && break
22898done
22899
22900    else
22901      # If it succeeded, then it was overridden by the user. We will use it
22902      # for the tool.
22903
22904      # First remove it from the list of overridden variables, so we can test
22905      # for unknown variables in the end.
22906      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22907
22908      # Check if we try to supply an empty value
22909      if test "x$DTRACE" = x; then
22910        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22911$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22912        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22913$as_echo_n "checking for DTRACE... " >&6; }
22914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22915$as_echo "disabled" >&6; }
22916      else
22917        # Check if the provided tool contains a complete path.
22918        tool_specified="$DTRACE"
22919        tool_basename="${tool_specified##*/}"
22920        if test "x$tool_basename" = "x$tool_specified"; then
22921          # A command without a complete path is provided, search $PATH.
22922          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22923$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22924          # Extract the first word of "$tool_basename", so it can be a program name with args.
22925set dummy $tool_basename; ac_word=$2
22926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22927$as_echo_n "checking for $ac_word... " >&6; }
22928if ${ac_cv_path_DTRACE+:} false; then :
22929  $as_echo_n "(cached) " >&6
22930else
22931  case $DTRACE in
22932  [\\/]* | ?:[\\/]*)
22933  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22934  ;;
22935  *)
22936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22937for as_dir in $PATH
22938do
22939  IFS=$as_save_IFS
22940  test -z "$as_dir" && as_dir=.
22941    for ac_exec_ext in '' $ac_executable_extensions; do
22942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22943    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22945    break 2
22946  fi
22947done
22948  done
22949IFS=$as_save_IFS
22950
22951  ;;
22952esac
22953fi
22954DTRACE=$ac_cv_path_DTRACE
22955if test -n "$DTRACE"; then
22956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22957$as_echo "$DTRACE" >&6; }
22958else
22959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22960$as_echo "no" >&6; }
22961fi
22962
22963
22964          if test "x$DTRACE" = x; then
22965            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22966          fi
22967        else
22968          # Otherwise we believe it is a complete path. Use it as it is.
22969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22970$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22971          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22972$as_echo_n "checking for DTRACE... " >&6; }
22973          if test ! -x "$tool_specified"; then
22974            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22975$as_echo "not found" >&6; }
22976            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22977          fi
22978          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22979$as_echo "$tool_specified" >&6; }
22980        fi
22981      fi
22982    fi
22983
22984  fi
22985
22986
22987
22988
22989  # Publish this variable in the help.
22990
22991
22992  if [ -z "${PATCH+x}" ]; then
22993    # The variable is not set by user, try to locate tool using the code snippet
22994    for ac_prog in gpatch patch
22995do
22996  # Extract the first word of "$ac_prog", so it can be a program name with args.
22997set dummy $ac_prog; ac_word=$2
22998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22999$as_echo_n "checking for $ac_word... " >&6; }
23000if ${ac_cv_path_PATCH+:} false; then :
23001  $as_echo_n "(cached) " >&6
23002else
23003  case $PATCH in
23004  [\\/]* | ?:[\\/]*)
23005  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23006  ;;
23007  *)
23008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23009for as_dir in $PATH
23010do
23011  IFS=$as_save_IFS
23012  test -z "$as_dir" && as_dir=.
23013    for ac_exec_ext in '' $ac_executable_extensions; do
23014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23015    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23017    break 2
23018  fi
23019done
23020  done
23021IFS=$as_save_IFS
23022
23023  ;;
23024esac
23025fi
23026PATCH=$ac_cv_path_PATCH
23027if test -n "$PATCH"; then
23028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23029$as_echo "$PATCH" >&6; }
23030else
23031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23032$as_echo "no" >&6; }
23033fi
23034
23035
23036  test -n "$PATCH" && break
23037done
23038
23039  else
23040    # The variable is set, but is it from the command line or the environment?
23041
23042    # Try to remove the string !PATCH! from our list.
23043    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23044    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23045      # If it failed, the variable was not from the command line. Ignore it,
23046      # but warn the user (except for BASH, which is always set by the calling BASH).
23047      if test "xPATCH" != xBASH; then
23048        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23049$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23050      fi
23051      # Try to locate tool using the code snippet
23052      for ac_prog in gpatch patch
23053do
23054  # Extract the first word of "$ac_prog", so it can be a program name with args.
23055set dummy $ac_prog; ac_word=$2
23056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23057$as_echo_n "checking for $ac_word... " >&6; }
23058if ${ac_cv_path_PATCH+:} false; then :
23059  $as_echo_n "(cached) " >&6
23060else
23061  case $PATCH in
23062  [\\/]* | ?:[\\/]*)
23063  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23064  ;;
23065  *)
23066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23067for as_dir in $PATH
23068do
23069  IFS=$as_save_IFS
23070  test -z "$as_dir" && as_dir=.
23071    for ac_exec_ext in '' $ac_executable_extensions; do
23072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23073    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23075    break 2
23076  fi
23077done
23078  done
23079IFS=$as_save_IFS
23080
23081  ;;
23082esac
23083fi
23084PATCH=$ac_cv_path_PATCH
23085if test -n "$PATCH"; then
23086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23087$as_echo "$PATCH" >&6; }
23088else
23089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23090$as_echo "no" >&6; }
23091fi
23092
23093
23094  test -n "$PATCH" && break
23095done
23096
23097    else
23098      # If it succeeded, then it was overridden by the user. We will use it
23099      # for the tool.
23100
23101      # First remove it from the list of overridden variables, so we can test
23102      # for unknown variables in the end.
23103      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23104
23105      # Check if we try to supply an empty value
23106      if test "x$PATCH" = x; then
23107        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23108$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23109        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23110$as_echo_n "checking for PATCH... " >&6; }
23111        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23112$as_echo "disabled" >&6; }
23113      else
23114        # Check if the provided tool contains a complete path.
23115        tool_specified="$PATCH"
23116        tool_basename="${tool_specified##*/}"
23117        if test "x$tool_basename" = "x$tool_specified"; then
23118          # A command without a complete path is provided, search $PATH.
23119          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23120$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23121          # Extract the first word of "$tool_basename", so it can be a program name with args.
23122set dummy $tool_basename; ac_word=$2
23123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23124$as_echo_n "checking for $ac_word... " >&6; }
23125if ${ac_cv_path_PATCH+:} false; then :
23126  $as_echo_n "(cached) " >&6
23127else
23128  case $PATCH in
23129  [\\/]* | ?:[\\/]*)
23130  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23131  ;;
23132  *)
23133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23134for as_dir in $PATH
23135do
23136  IFS=$as_save_IFS
23137  test -z "$as_dir" && as_dir=.
23138    for ac_exec_ext in '' $ac_executable_extensions; do
23139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23140    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23142    break 2
23143  fi
23144done
23145  done
23146IFS=$as_save_IFS
23147
23148  ;;
23149esac
23150fi
23151PATCH=$ac_cv_path_PATCH
23152if test -n "$PATCH"; then
23153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23154$as_echo "$PATCH" >&6; }
23155else
23156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23157$as_echo "no" >&6; }
23158fi
23159
23160
23161          if test "x$PATCH" = x; then
23162            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23163          fi
23164        else
23165          # Otherwise we believe it is a complete path. Use it as it is.
23166          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23167$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23168          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23169$as_echo_n "checking for PATCH... " >&6; }
23170          if test ! -x "$tool_specified"; then
23171            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23172$as_echo "not found" >&6; }
23173            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23174          fi
23175          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23176$as_echo "$tool_specified" >&6; }
23177        fi
23178      fi
23179    fi
23180
23181  fi
23182
23183
23184  # Check if it's GNU time
23185  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23186  if test "x$IS_GNU_TIME" != x; then
23187    IS_GNU_TIME=yes
23188  else
23189    IS_GNU_TIME=no
23190  fi
23191
23192
23193  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23194
23195
23196
23197  # Publish this variable in the help.
23198
23199
23200  if [ -z "${DSYMUTIL+x}" ]; then
23201    # The variable is not set by user, try to locate tool using the code snippet
23202    for ac_prog in dsymutil
23203do
23204  # Extract the first word of "$ac_prog", so it can be a program name with args.
23205set dummy $ac_prog; ac_word=$2
23206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23207$as_echo_n "checking for $ac_word... " >&6; }
23208if ${ac_cv_path_DSYMUTIL+:} false; then :
23209  $as_echo_n "(cached) " >&6
23210else
23211  case $DSYMUTIL in
23212  [\\/]* | ?:[\\/]*)
23213  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23214  ;;
23215  *)
23216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23217for as_dir in $PATH
23218do
23219  IFS=$as_save_IFS
23220  test -z "$as_dir" && as_dir=.
23221    for ac_exec_ext in '' $ac_executable_extensions; do
23222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23223    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23225    break 2
23226  fi
23227done
23228  done
23229IFS=$as_save_IFS
23230
23231  ;;
23232esac
23233fi
23234DSYMUTIL=$ac_cv_path_DSYMUTIL
23235if test -n "$DSYMUTIL"; then
23236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23237$as_echo "$DSYMUTIL" >&6; }
23238else
23239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23240$as_echo "no" >&6; }
23241fi
23242
23243
23244  test -n "$DSYMUTIL" && break
23245done
23246
23247  else
23248    # The variable is set, but is it from the command line or the environment?
23249
23250    # Try to remove the string !DSYMUTIL! from our list.
23251    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23252    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23253      # If it failed, the variable was not from the command line. Ignore it,
23254      # but warn the user (except for BASH, which is always set by the calling BASH).
23255      if test "xDSYMUTIL" != xBASH; then
23256        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23257$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23258      fi
23259      # Try to locate tool using the code snippet
23260      for ac_prog in dsymutil
23261do
23262  # Extract the first word of "$ac_prog", so it can be a program name with args.
23263set dummy $ac_prog; ac_word=$2
23264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23265$as_echo_n "checking for $ac_word... " >&6; }
23266if ${ac_cv_path_DSYMUTIL+:} false; then :
23267  $as_echo_n "(cached) " >&6
23268else
23269  case $DSYMUTIL in
23270  [\\/]* | ?:[\\/]*)
23271  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23272  ;;
23273  *)
23274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23275for as_dir in $PATH
23276do
23277  IFS=$as_save_IFS
23278  test -z "$as_dir" && as_dir=.
23279    for ac_exec_ext in '' $ac_executable_extensions; do
23280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23281    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23283    break 2
23284  fi
23285done
23286  done
23287IFS=$as_save_IFS
23288
23289  ;;
23290esac
23291fi
23292DSYMUTIL=$ac_cv_path_DSYMUTIL
23293if test -n "$DSYMUTIL"; then
23294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23295$as_echo "$DSYMUTIL" >&6; }
23296else
23297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23298$as_echo "no" >&6; }
23299fi
23300
23301
23302  test -n "$DSYMUTIL" && break
23303done
23304
23305    else
23306      # If it succeeded, then it was overridden by the user. We will use it
23307      # for the tool.
23308
23309      # First remove it from the list of overridden variables, so we can test
23310      # for unknown variables in the end.
23311      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23312
23313      # Check if we try to supply an empty value
23314      if test "x$DSYMUTIL" = x; then
23315        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23316$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23317        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23318$as_echo_n "checking for DSYMUTIL... " >&6; }
23319        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23320$as_echo "disabled" >&6; }
23321      else
23322        # Check if the provided tool contains a complete path.
23323        tool_specified="$DSYMUTIL"
23324        tool_basename="${tool_specified##*/}"
23325        if test "x$tool_basename" = "x$tool_specified"; then
23326          # A command without a complete path is provided, search $PATH.
23327          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23328$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23329          # Extract the first word of "$tool_basename", so it can be a program name with args.
23330set dummy $tool_basename; ac_word=$2
23331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23332$as_echo_n "checking for $ac_word... " >&6; }
23333if ${ac_cv_path_DSYMUTIL+:} false; then :
23334  $as_echo_n "(cached) " >&6
23335else
23336  case $DSYMUTIL in
23337  [\\/]* | ?:[\\/]*)
23338  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23339  ;;
23340  *)
23341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23342for as_dir in $PATH
23343do
23344  IFS=$as_save_IFS
23345  test -z "$as_dir" && as_dir=.
23346    for ac_exec_ext in '' $ac_executable_extensions; do
23347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23348    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23350    break 2
23351  fi
23352done
23353  done
23354IFS=$as_save_IFS
23355
23356  ;;
23357esac
23358fi
23359DSYMUTIL=$ac_cv_path_DSYMUTIL
23360if test -n "$DSYMUTIL"; then
23361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23362$as_echo "$DSYMUTIL" >&6; }
23363else
23364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23365$as_echo "no" >&6; }
23366fi
23367
23368
23369          if test "x$DSYMUTIL" = x; then
23370            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23371          fi
23372        else
23373          # Otherwise we believe it is a complete path. Use it as it is.
23374          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23375$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23376          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23377$as_echo_n "checking for DSYMUTIL... " >&6; }
23378          if test ! -x "$tool_specified"; then
23379            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23380$as_echo "not found" >&6; }
23381            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23382          fi
23383          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23384$as_echo "$tool_specified" >&6; }
23385        fi
23386      fi
23387    fi
23388
23389  fi
23390
23391
23392
23393  if test "x$DSYMUTIL" = x; then
23394    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23395  fi
23396
23397
23398
23399
23400
23401  # Publish this variable in the help.
23402
23403
23404  if [ -z "${XATTR+x}" ]; then
23405    # The variable is not set by user, try to locate tool using the code snippet
23406    for ac_prog in xattr
23407do
23408  # Extract the first word of "$ac_prog", so it can be a program name with args.
23409set dummy $ac_prog; ac_word=$2
23410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23411$as_echo_n "checking for $ac_word... " >&6; }
23412if ${ac_cv_path_XATTR+:} false; then :
23413  $as_echo_n "(cached) " >&6
23414else
23415  case $XATTR in
23416  [\\/]* | ?:[\\/]*)
23417  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23418  ;;
23419  *)
23420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23421for as_dir in $PATH
23422do
23423  IFS=$as_save_IFS
23424  test -z "$as_dir" && as_dir=.
23425    for ac_exec_ext in '' $ac_executable_extensions; do
23426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23427    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23429    break 2
23430  fi
23431done
23432  done
23433IFS=$as_save_IFS
23434
23435  ;;
23436esac
23437fi
23438XATTR=$ac_cv_path_XATTR
23439if test -n "$XATTR"; then
23440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23441$as_echo "$XATTR" >&6; }
23442else
23443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23444$as_echo "no" >&6; }
23445fi
23446
23447
23448  test -n "$XATTR" && break
23449done
23450
23451  else
23452    # The variable is set, but is it from the command line or the environment?
23453
23454    # Try to remove the string !XATTR! from our list.
23455    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23456    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23457      # If it failed, the variable was not from the command line. Ignore it,
23458      # but warn the user (except for BASH, which is always set by the calling BASH).
23459      if test "xXATTR" != xBASH; then
23460        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23461$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23462      fi
23463      # Try to locate tool using the code snippet
23464      for ac_prog in xattr
23465do
23466  # Extract the first word of "$ac_prog", so it can be a program name with args.
23467set dummy $ac_prog; ac_word=$2
23468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23469$as_echo_n "checking for $ac_word... " >&6; }
23470if ${ac_cv_path_XATTR+:} false; then :
23471  $as_echo_n "(cached) " >&6
23472else
23473  case $XATTR in
23474  [\\/]* | ?:[\\/]*)
23475  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23476  ;;
23477  *)
23478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23479for as_dir in $PATH
23480do
23481  IFS=$as_save_IFS
23482  test -z "$as_dir" && as_dir=.
23483    for ac_exec_ext in '' $ac_executable_extensions; do
23484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23485    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23487    break 2
23488  fi
23489done
23490  done
23491IFS=$as_save_IFS
23492
23493  ;;
23494esac
23495fi
23496XATTR=$ac_cv_path_XATTR
23497if test -n "$XATTR"; then
23498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23499$as_echo "$XATTR" >&6; }
23500else
23501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23502$as_echo "no" >&6; }
23503fi
23504
23505
23506  test -n "$XATTR" && break
23507done
23508
23509    else
23510      # If it succeeded, then it was overridden by the user. We will use it
23511      # for the tool.
23512
23513      # First remove it from the list of overridden variables, so we can test
23514      # for unknown variables in the end.
23515      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23516
23517      # Check if we try to supply an empty value
23518      if test "x$XATTR" = x; then
23519        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23520$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23521        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23522$as_echo_n "checking for XATTR... " >&6; }
23523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23524$as_echo "disabled" >&6; }
23525      else
23526        # Check if the provided tool contains a complete path.
23527        tool_specified="$XATTR"
23528        tool_basename="${tool_specified##*/}"
23529        if test "x$tool_basename" = "x$tool_specified"; then
23530          # A command without a complete path is provided, search $PATH.
23531          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23532$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23533          # Extract the first word of "$tool_basename", so it can be a program name with args.
23534set dummy $tool_basename; ac_word=$2
23535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23536$as_echo_n "checking for $ac_word... " >&6; }
23537if ${ac_cv_path_XATTR+:} false; then :
23538  $as_echo_n "(cached) " >&6
23539else
23540  case $XATTR in
23541  [\\/]* | ?:[\\/]*)
23542  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23543  ;;
23544  *)
23545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23546for as_dir in $PATH
23547do
23548  IFS=$as_save_IFS
23549  test -z "$as_dir" && as_dir=.
23550    for ac_exec_ext in '' $ac_executable_extensions; do
23551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23552    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23554    break 2
23555  fi
23556done
23557  done
23558IFS=$as_save_IFS
23559
23560  ;;
23561esac
23562fi
23563XATTR=$ac_cv_path_XATTR
23564if test -n "$XATTR"; then
23565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23566$as_echo "$XATTR" >&6; }
23567else
23568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23569$as_echo "no" >&6; }
23570fi
23571
23572
23573          if test "x$XATTR" = x; then
23574            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23575          fi
23576        else
23577          # Otherwise we believe it is a complete path. Use it as it is.
23578          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23579$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23580          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23581$as_echo_n "checking for XATTR... " >&6; }
23582          if test ! -x "$tool_specified"; then
23583            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23584$as_echo "not found" >&6; }
23585            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23586          fi
23587          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23588$as_echo "$tool_specified" >&6; }
23589        fi
23590      fi
23591    fi
23592
23593  fi
23594
23595
23596
23597  if test "x$XATTR" = x; then
23598    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23599  fi
23600
23601
23602
23603
23604  # Publish this variable in the help.
23605
23606
23607  if [ -z "${CODESIGN+x}" ]; then
23608    # The variable is not set by user, try to locate tool using the code snippet
23609    for ac_prog in codesign
23610do
23611  # Extract the first word of "$ac_prog", so it can be a program name with args.
23612set dummy $ac_prog; ac_word=$2
23613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23614$as_echo_n "checking for $ac_word... " >&6; }
23615if ${ac_cv_path_CODESIGN+:} false; then :
23616  $as_echo_n "(cached) " >&6
23617else
23618  case $CODESIGN in
23619  [\\/]* | ?:[\\/]*)
23620  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23621  ;;
23622  *)
23623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23624for as_dir in $PATH
23625do
23626  IFS=$as_save_IFS
23627  test -z "$as_dir" && as_dir=.
23628    for ac_exec_ext in '' $ac_executable_extensions; do
23629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23630    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23632    break 2
23633  fi
23634done
23635  done
23636IFS=$as_save_IFS
23637
23638  ;;
23639esac
23640fi
23641CODESIGN=$ac_cv_path_CODESIGN
23642if test -n "$CODESIGN"; then
23643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23644$as_echo "$CODESIGN" >&6; }
23645else
23646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23647$as_echo "no" >&6; }
23648fi
23649
23650
23651  test -n "$CODESIGN" && break
23652done
23653
23654  else
23655    # The variable is set, but is it from the command line or the environment?
23656
23657    # Try to remove the string !CODESIGN! from our list.
23658    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23659    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23660      # If it failed, the variable was not from the command line. Ignore it,
23661      # but warn the user (except for BASH, which is always set by the calling BASH).
23662      if test "xCODESIGN" != xBASH; then
23663        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23664$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23665      fi
23666      # Try to locate tool using the code snippet
23667      for ac_prog in codesign
23668do
23669  # Extract the first word of "$ac_prog", so it can be a program name with args.
23670set dummy $ac_prog; ac_word=$2
23671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23672$as_echo_n "checking for $ac_word... " >&6; }
23673if ${ac_cv_path_CODESIGN+:} false; then :
23674  $as_echo_n "(cached) " >&6
23675else
23676  case $CODESIGN in
23677  [\\/]* | ?:[\\/]*)
23678  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23679  ;;
23680  *)
23681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23682for as_dir in $PATH
23683do
23684  IFS=$as_save_IFS
23685  test -z "$as_dir" && as_dir=.
23686    for ac_exec_ext in '' $ac_executable_extensions; do
23687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23688    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23690    break 2
23691  fi
23692done
23693  done
23694IFS=$as_save_IFS
23695
23696  ;;
23697esac
23698fi
23699CODESIGN=$ac_cv_path_CODESIGN
23700if test -n "$CODESIGN"; then
23701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23702$as_echo "$CODESIGN" >&6; }
23703else
23704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23705$as_echo "no" >&6; }
23706fi
23707
23708
23709  test -n "$CODESIGN" && break
23710done
23711
23712    else
23713      # If it succeeded, then it was overridden by the user. We will use it
23714      # for the tool.
23715
23716      # First remove it from the list of overridden variables, so we can test
23717      # for unknown variables in the end.
23718      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23719
23720      # Check if we try to supply an empty value
23721      if test "x$CODESIGN" = x; then
23722        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23723$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23724        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23725$as_echo_n "checking for CODESIGN... " >&6; }
23726        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23727$as_echo "disabled" >&6; }
23728      else
23729        # Check if the provided tool contains a complete path.
23730        tool_specified="$CODESIGN"
23731        tool_basename="${tool_specified##*/}"
23732        if test "x$tool_basename" = "x$tool_specified"; then
23733          # A command without a complete path is provided, search $PATH.
23734          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23735$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23736          # Extract the first word of "$tool_basename", so it can be a program name with args.
23737set dummy $tool_basename; ac_word=$2
23738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23739$as_echo_n "checking for $ac_word... " >&6; }
23740if ${ac_cv_path_CODESIGN+:} false; then :
23741  $as_echo_n "(cached) " >&6
23742else
23743  case $CODESIGN in
23744  [\\/]* | ?:[\\/]*)
23745  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23746  ;;
23747  *)
23748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23749for as_dir in $PATH
23750do
23751  IFS=$as_save_IFS
23752  test -z "$as_dir" && as_dir=.
23753    for ac_exec_ext in '' $ac_executable_extensions; do
23754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23755    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23757    break 2
23758  fi
23759done
23760  done
23761IFS=$as_save_IFS
23762
23763  ;;
23764esac
23765fi
23766CODESIGN=$ac_cv_path_CODESIGN
23767if test -n "$CODESIGN"; then
23768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23769$as_echo "$CODESIGN" >&6; }
23770else
23771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23772$as_echo "no" >&6; }
23773fi
23774
23775
23776          if test "x$CODESIGN" = x; then
23777            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23778          fi
23779        else
23780          # Otherwise we believe it is a complete path. Use it as it is.
23781          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23782$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23783          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23784$as_echo_n "checking for CODESIGN... " >&6; }
23785          if test ! -x "$tool_specified"; then
23786            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23787$as_echo "not found" >&6; }
23788            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23789          fi
23790          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23791$as_echo "$tool_specified" >&6; }
23792        fi
23793      fi
23794    fi
23795
23796  fi
23797
23798
23799    if test "x$CODESIGN" != "x"; then
23800      # Verify that the openjdk_codesign certificate is present
23801      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23802$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23803      $RM codesign-testfile
23804      $TOUCH codesign-testfile
23805      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23806      $RM codesign-testfile
23807      if test "x$CODESIGN" = x; then
23808        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23809$as_echo "no" >&6; }
23810      else
23811        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23812$as_echo "yes" >&6; }
23813      fi
23814    fi
23815
23816
23817
23818  # Publish this variable in the help.
23819
23820
23821  if [ -z "${SETFILE+x}" ]; then
23822    # The variable is not set by user, try to locate tool using the code snippet
23823    for ac_prog in SetFile
23824do
23825  # Extract the first word of "$ac_prog", so it can be a program name with args.
23826set dummy $ac_prog; ac_word=$2
23827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23828$as_echo_n "checking for $ac_word... " >&6; }
23829if ${ac_cv_path_SETFILE+:} false; then :
23830  $as_echo_n "(cached) " >&6
23831else
23832  case $SETFILE in
23833  [\\/]* | ?:[\\/]*)
23834  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23835  ;;
23836  *)
23837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23838for as_dir in $PATH
23839do
23840  IFS=$as_save_IFS
23841  test -z "$as_dir" && as_dir=.
23842    for ac_exec_ext in '' $ac_executable_extensions; do
23843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23844    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23846    break 2
23847  fi
23848done
23849  done
23850IFS=$as_save_IFS
23851
23852  ;;
23853esac
23854fi
23855SETFILE=$ac_cv_path_SETFILE
23856if test -n "$SETFILE"; then
23857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23858$as_echo "$SETFILE" >&6; }
23859else
23860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23861$as_echo "no" >&6; }
23862fi
23863
23864
23865  test -n "$SETFILE" && break
23866done
23867
23868  else
23869    # The variable is set, but is it from the command line or the environment?
23870
23871    # Try to remove the string !SETFILE! from our list.
23872    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23873    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23874      # If it failed, the variable was not from the command line. Ignore it,
23875      # but warn the user (except for BASH, which is always set by the calling BASH).
23876      if test "xSETFILE" != xBASH; then
23877        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23878$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23879      fi
23880      # Try to locate tool using the code snippet
23881      for ac_prog in SetFile
23882do
23883  # Extract the first word of "$ac_prog", so it can be a program name with args.
23884set dummy $ac_prog; ac_word=$2
23885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23886$as_echo_n "checking for $ac_word... " >&6; }
23887if ${ac_cv_path_SETFILE+:} false; then :
23888  $as_echo_n "(cached) " >&6
23889else
23890  case $SETFILE in
23891  [\\/]* | ?:[\\/]*)
23892  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23893  ;;
23894  *)
23895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23896for as_dir in $PATH
23897do
23898  IFS=$as_save_IFS
23899  test -z "$as_dir" && as_dir=.
23900    for ac_exec_ext in '' $ac_executable_extensions; do
23901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23902    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23904    break 2
23905  fi
23906done
23907  done
23908IFS=$as_save_IFS
23909
23910  ;;
23911esac
23912fi
23913SETFILE=$ac_cv_path_SETFILE
23914if test -n "$SETFILE"; then
23915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23916$as_echo "$SETFILE" >&6; }
23917else
23918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23919$as_echo "no" >&6; }
23920fi
23921
23922
23923  test -n "$SETFILE" && break
23924done
23925
23926    else
23927      # If it succeeded, then it was overridden by the user. We will use it
23928      # for the tool.
23929
23930      # First remove it from the list of overridden variables, so we can test
23931      # for unknown variables in the end.
23932      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23933
23934      # Check if we try to supply an empty value
23935      if test "x$SETFILE" = x; then
23936        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23937$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23938        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23939$as_echo_n "checking for SETFILE... " >&6; }
23940        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23941$as_echo "disabled" >&6; }
23942      else
23943        # Check if the provided tool contains a complete path.
23944        tool_specified="$SETFILE"
23945        tool_basename="${tool_specified##*/}"
23946        if test "x$tool_basename" = "x$tool_specified"; then
23947          # A command without a complete path is provided, search $PATH.
23948          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23949$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23950          # Extract the first word of "$tool_basename", so it can be a program name with args.
23951set dummy $tool_basename; ac_word=$2
23952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23953$as_echo_n "checking for $ac_word... " >&6; }
23954if ${ac_cv_path_SETFILE+:} false; then :
23955  $as_echo_n "(cached) " >&6
23956else
23957  case $SETFILE in
23958  [\\/]* | ?:[\\/]*)
23959  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23960  ;;
23961  *)
23962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23963for as_dir in $PATH
23964do
23965  IFS=$as_save_IFS
23966  test -z "$as_dir" && as_dir=.
23967    for ac_exec_ext in '' $ac_executable_extensions; do
23968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23969    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23971    break 2
23972  fi
23973done
23974  done
23975IFS=$as_save_IFS
23976
23977  ;;
23978esac
23979fi
23980SETFILE=$ac_cv_path_SETFILE
23981if test -n "$SETFILE"; then
23982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23983$as_echo "$SETFILE" >&6; }
23984else
23985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23986$as_echo "no" >&6; }
23987fi
23988
23989
23990          if test "x$SETFILE" = x; then
23991            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23992          fi
23993        else
23994          # Otherwise we believe it is a complete path. Use it as it is.
23995          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23996$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23997          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23998$as_echo_n "checking for SETFILE... " >&6; }
23999          if test ! -x "$tool_specified"; then
24000            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24001$as_echo "not found" >&6; }
24002            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24003          fi
24004          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24005$as_echo "$tool_specified" >&6; }
24006        fi
24007      fi
24008    fi
24009
24010  fi
24011
24012
24013
24014  if test "x$SETFILE" = x; then
24015    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24016  fi
24017
24018
24019  fi
24020
24021
24022  # Test if bash supports pipefail.
24023  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24024$as_echo_n "checking if bash supports pipefail... " >&6; }
24025  if ${BASH} -c 'set -o pipefail'; then
24026    BASH_ARGS="$BASH_ARGS -o pipefail"
24027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24028$as_echo "yes" >&6; }
24029  else
24030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24031$as_echo "no" >&6; }
24032  fi
24033
24034  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24035$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24036  if ${BASH} -e -c 'true'; then
24037    BASH_ARGS="$BASH_ARGS -e"
24038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24039$as_echo "yes" >&6; }
24040  else
24041    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24042$as_echo "no" >&6; }
24043  fi
24044
24045
24046
24047
24048# Check if pkg-config is available.
24049
24050
24051if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24052	if test -n "$ac_tool_prefix"; then
24053  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24054set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24056$as_echo_n "checking for $ac_word... " >&6; }
24057if ${ac_cv_path_PKG_CONFIG+:} false; then :
24058  $as_echo_n "(cached) " >&6
24059else
24060  case $PKG_CONFIG in
24061  [\\/]* | ?:[\\/]*)
24062  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24063  ;;
24064  *)
24065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24066for as_dir in $PATH
24067do
24068  IFS=$as_save_IFS
24069  test -z "$as_dir" && as_dir=.
24070    for ac_exec_ext in '' $ac_executable_extensions; do
24071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24072    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24074    break 2
24075  fi
24076done
24077  done
24078IFS=$as_save_IFS
24079
24080  ;;
24081esac
24082fi
24083PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24084if test -n "$PKG_CONFIG"; then
24085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24086$as_echo "$PKG_CONFIG" >&6; }
24087else
24088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24089$as_echo "no" >&6; }
24090fi
24091
24092
24093fi
24094if test -z "$ac_cv_path_PKG_CONFIG"; then
24095  ac_pt_PKG_CONFIG=$PKG_CONFIG
24096  # Extract the first word of "pkg-config", so it can be a program name with args.
24097set dummy pkg-config; ac_word=$2
24098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24099$as_echo_n "checking for $ac_word... " >&6; }
24100if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24101  $as_echo_n "(cached) " >&6
24102else
24103  case $ac_pt_PKG_CONFIG in
24104  [\\/]* | ?:[\\/]*)
24105  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24106  ;;
24107  *)
24108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24109for as_dir in $PATH
24110do
24111  IFS=$as_save_IFS
24112  test -z "$as_dir" && as_dir=.
24113    for ac_exec_ext in '' $ac_executable_extensions; do
24114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24115    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24117    break 2
24118  fi
24119done
24120  done
24121IFS=$as_save_IFS
24122
24123  ;;
24124esac
24125fi
24126ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24127if test -n "$ac_pt_PKG_CONFIG"; then
24128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24129$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24130else
24131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24132$as_echo "no" >&6; }
24133fi
24134
24135  if test "x$ac_pt_PKG_CONFIG" = x; then
24136    PKG_CONFIG=""
24137  else
24138    case $cross_compiling:$ac_tool_warned in
24139yes:)
24140{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24141$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24142ac_tool_warned=yes ;;
24143esac
24144    PKG_CONFIG=$ac_pt_PKG_CONFIG
24145  fi
24146else
24147  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24148fi
24149
24150fi
24151if test -n "$PKG_CONFIG"; then
24152	_pkg_min_version=0.9.0
24153	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24154$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24155	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24156		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24157$as_echo "yes" >&6; }
24158	else
24159		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24160$as_echo "no" >&6; }
24161		PKG_CONFIG=""
24162	fi
24163
24164fi
24165
24166# After basic tools have been setup, we can check build os specific details.
24167
24168  ###############################################################################
24169
24170  # Note that this is the build platform OS version!
24171
24172  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24173  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24174  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24175  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24176
24177
24178
24179
24180
24181# Misc basic settings
24182
24183
24184# Check whether --with-default-make-target was given.
24185if test "${with_default_make_target+set}" = set; then :
24186  withval=$with_default_make_target;
24187fi
24188
24189  if test "x$with_default_make_target" = "x" \
24190      || test "x$with_default_make_target" = "xyes"; then
24191    DEFAULT_MAKE_TARGET="exploded-image"
24192  elif test "x$with_default_make_target" = "xno"; then
24193    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24194  else
24195    DEFAULT_MAKE_TARGET="$with_default_make_target"
24196  fi
24197
24198
24199
24200
24201###############################################################################
24202#
24203# Determine OpenJDK variants, options and version numbers.
24204#
24205###############################################################################
24206
24207# We need build & target for this.
24208
24209  # Should we build a JDK without a graphical UI?
24210  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24211$as_echo_n "checking headless only... " >&6; }
24212  # Check whether --enable-headless-only was given.
24213if test "${enable_headless_only+set}" = set; then :
24214  enableval=$enable_headless_only;
24215fi
24216
24217
24218  if test "x$enable_headless_only" = "xyes"; then
24219    ENABLE_HEADLESS_ONLY="true"
24220    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24221$as_echo "yes" >&6; }
24222  elif test "x$enable_headless_only" = "xno"; then
24223    ENABLE_HEADLESS_ONLY="false"
24224    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24225$as_echo "no" >&6; }
24226  elif test "x$enable_headless_only" = "x"; then
24227    ENABLE_HEADLESS_ONLY="false"
24228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24229$as_echo "no" >&6; }
24230  else
24231    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24232  fi
24233
24234
24235
24236  # Choose cacerts source file
24237
24238# Check whether --with-cacerts-file was given.
24239if test "${with_cacerts_file+set}" = set; then :
24240  withval=$with_cacerts_file;
24241fi
24242
24243  if test "x$with_cacerts_file" != x; then
24244    CACERTS_FILE=$with_cacerts_file
24245  fi
24246
24247
24248  # Enable or disable unlimited crypto
24249  # Check whether --enable-unlimited-crypto was given.
24250if test "${enable_unlimited_crypto+set}" = set; then :
24251  enableval=$enable_unlimited_crypto;
24252else
24253  enable_unlimited_crypto=yes
24254fi
24255
24256  if test "x$enable_unlimited_crypto" = "xyes"; then
24257    UNLIMITED_CRYPTO=true
24258  else
24259    UNLIMITED_CRYPTO=false
24260  fi
24261
24262
24263  # Should we build the serviceability agent (SA)?
24264  INCLUDE_SA=true
24265  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24266    INCLUDE_SA=false
24267  fi
24268  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24269    INCLUDE_SA=false
24270  fi
24271
24272
24273  # Compress jars
24274  COMPRESS_JARS=false
24275
24276
24277
24278  # Setup default copyright year. Mostly overridden when building close to a new year.
24279
24280# Check whether --with-copyright-year was given.
24281if test "${with_copyright_year+set}" = set; then :
24282  withval=$with_copyright_year;
24283fi
24284
24285  if test "x$with_copyright_year" = xyes; then
24286    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24287  elif test "x$with_copyright_year" != x; then
24288    COPYRIGHT_YEAR="$with_copyright_year"
24289  else
24290    COPYRIGHT_YEAR=`$DATE +'%Y'`
24291  fi
24292
24293
24294
24295  # Check whether --enable-keep-packaged-modules was given.
24296if test "${enable_keep_packaged_modules+set}" = set; then :
24297  enableval=$enable_keep_packaged_modules;
24298fi
24299
24300
24301  if test "x$enable_keep_packaged_modules" = "xyes"; then
24302    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24303$as_echo_n "checking if packaged modules are kept... " >&6; }
24304    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24305$as_echo "yes" >&6; }
24306    JLINK_KEEP_PACKAGED_MODULES=true
24307  elif test "x$enable_keep_packaged_modules" = "xno"; then
24308    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24309$as_echo_n "checking if packaged modules are kept... " >&6; }
24310    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24311$as_echo "no" >&6; }
24312    JLINK_KEEP_PACKAGED_MODULES=false
24313  elif test "x$enable_keep_packaged_modules" = "x"; then
24314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24315$as_echo "yes (default)" >&6; }
24316    JLINK_KEEP_PACKAGED_MODULES=true
24317  else
24318    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24319  fi
24320
24321
24322
24323
24324  # Warn user that old version arguments are deprecated.
24325
24326
24327# Check whether --with-milestone was given.
24328if test "${with_milestone+set}" = set; then :
24329  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24330$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24331fi
24332
24333
24334
24335
24336# Check whether --with-update-version was given.
24337if test "${with_update_version+set}" = set; then :
24338  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24339$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24340fi
24341
24342
24343
24344
24345# Check whether --with-user-release-suffix was given.
24346if test "${with_user_release_suffix+set}" = set; then :
24347  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
24348$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24349fi
24350
24351
24352
24353
24354# Check whether --with-build-number was given.
24355if test "${with_build_number+set}" = set; then :
24356  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24357$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24358fi
24359
24360
24361
24362  # Source the version numbers file
24363  . $AUTOCONF_DIR/version-numbers
24364
24365  # Some non-version number information is set in that file
24366
24367
24368
24369
24370
24371
24372
24373
24374
24375  # Override version from arguments
24376
24377  # If --with-version-string is set, process it first. It is possible to
24378  # override parts with more specific flags, since these are processed later.
24379
24380# Check whether --with-version-string was given.
24381if test "${with_version_string+set}" = set; then :
24382  withval=$with_version_string;
24383fi
24384
24385  if test "x$with_version_string" = xyes; then
24386    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24387  elif test "x$with_version_string" != x; then
24388    # Additional [] needed to keep m4 from mangling shell constructs.
24389    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24390      VERSION_MAJOR=${BASH_REMATCH[1]}
24391      VERSION_MINOR=${BASH_REMATCH[3]}
24392      VERSION_SECURITY=${BASH_REMATCH[5]}
24393      VERSION_PATCH=${BASH_REMATCH[7]}
24394      VERSION_PRE=${BASH_REMATCH[9]}
24395      version_plus_separator=${BASH_REMATCH[11]}
24396      VERSION_BUILD=${BASH_REMATCH[12]}
24397      VERSION_OPT=${BASH_REMATCH[14]}
24398      # Unspecified numerical fields are interpreted as 0.
24399      if test "x$VERSION_MINOR" = x; then
24400        VERSION_MINOR=0
24401      fi
24402      if test "x$VERSION_SECURITY" = x; then
24403        VERSION_SECURITY=0
24404      fi
24405      if test "x$VERSION_PATCH" = x; then
24406        VERSION_PATCH=0
24407      fi
24408      if test "x$version_plus_separator" != x \
24409          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24410        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24411      fi
24412      # Stop the version part process from setting default values.
24413      # We still allow them to explicitly override though.
24414      NO_DEFAULT_VERSION_PARTS=true
24415    else
24416      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24417    fi
24418  fi
24419
24420
24421# Check whether --with-version-pre was given.
24422if test "${with_version_pre+set}" = set; then :
24423  withval=$with_version_pre; with_version_pre_present=true
24424else
24425  with_version_pre_present=false
24426fi
24427
24428
24429  if test "x$with_version_pre_present" = xtrue; then
24430    if test "x$with_version_pre" = xyes; then
24431      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24432    elif test "x$with_version_pre" = xno; then
24433      # Interpret --without-* as empty string instead of the literal "no"
24434      VERSION_PRE=
24435    else
24436      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24437       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24438      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24439        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24440$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24441      fi
24442    fi
24443  else
24444    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24445      # Default is to use "internal" as pre
24446      VERSION_PRE="internal"
24447    fi
24448  fi
24449
24450
24451# Check whether --with-version-opt was given.
24452if test "${with_version_opt+set}" = set; then :
24453  withval=$with_version_opt; with_version_opt_present=true
24454else
24455  with_version_opt_present=false
24456fi
24457
24458
24459  if test "x$with_version_opt_present" = xtrue; then
24460    if test "x$with_version_opt" = xyes; then
24461      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24462    elif test "x$with_version_opt" = xno; then
24463      # Interpret --without-* as empty string instead of the literal "no"
24464      VERSION_OPT=
24465    else
24466      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24467       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24468      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24469        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24470$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24471      fi
24472    fi
24473  else
24474    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24475      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
24476      # Outer [ ] to quote m4.
24477       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24478      VERSION_OPT="adhoc.$USERNAME.$basedirname"
24479    fi
24480  fi
24481
24482
24483# Check whether --with-version-build was given.
24484if test "${with_version_build+set}" = set; then :
24485  withval=$with_version_build; with_version_build_present=true
24486else
24487  with_version_build_present=false
24488fi
24489
24490
24491  if test "x$with_version_build_present" = xtrue; then
24492    if test "x$with_version_build" = xyes; then
24493      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24494    elif test "x$with_version_build" = xno; then
24495      # Interpret --without-* as empty string instead of the literal "no"
24496      VERSION_BUILD=
24497    elif test "x$with_version_build" = x; then
24498      VERSION_BUILD=
24499    else
24500
24501  # Additional [] needed to keep m4 from mangling shell constructs.
24502  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24503    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24504  fi
24505  # Extract the version number without leading zeros.
24506  cleaned_value=${BASH_REMATCH[1]}
24507  if test "x$cleaned_value" = x; then
24508    # Special case for zero
24509    cleaned_value=${BASH_REMATCH[2]}
24510  fi
24511
24512  if test $cleaned_value -gt 255; then
24513    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24514  fi
24515  if test "x$cleaned_value" != "x$with_version_build"; then
24516    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24517$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24518  fi
24519  VERSION_BUILD=$cleaned_value
24520
24521    fi
24522  else
24523    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24524      # Default is to not have a build number.
24525      VERSION_BUILD=""
24526      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24527      VERSION_BUILD=0
24528    fi
24529  fi
24530
24531
24532# Check whether --with-version-major was given.
24533if test "${with_version_major+set}" = set; then :
24534  withval=$with_version_major; with_version_major_present=true
24535else
24536  with_version_major_present=false
24537fi
24538
24539
24540  if test "x$with_version_major_present" = xtrue; then
24541    if test "x$with_version_major" = xyes; then
24542      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24543    else
24544
24545  # Additional [] needed to keep m4 from mangling shell constructs.
24546  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24547    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24548  fi
24549  # Extract the version number without leading zeros.
24550  cleaned_value=${BASH_REMATCH[1]}
24551  if test "x$cleaned_value" = x; then
24552    # Special case for zero
24553    cleaned_value=${BASH_REMATCH[2]}
24554  fi
24555
24556  if test $cleaned_value -gt 255; then
24557    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24558  fi
24559  if test "x$cleaned_value" != "x$with_version_major"; then
24560    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24561$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24562  fi
24563  VERSION_MAJOR=$cleaned_value
24564
24565    fi
24566  else
24567    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24568      # Default is to get value from version-numbers
24569      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24570    fi
24571  fi
24572
24573
24574# Check whether --with-version-minor was given.
24575if test "${with_version_minor+set}" = set; then :
24576  withval=$with_version_minor; with_version_minor_present=true
24577else
24578  with_version_minor_present=false
24579fi
24580
24581
24582  if test "x$with_version_minor_present" = xtrue; then
24583    if test "x$with_version_minor" = xyes; then
24584      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24585    elif test "x$with_version_minor" = xno; then
24586      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24587      VERSION_MINOR=0
24588    elif test "x$with_version_minor" = x; then
24589      VERSION_MINOR=0
24590    else
24591
24592  # Additional [] needed to keep m4 from mangling shell constructs.
24593  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24594    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24595  fi
24596  # Extract the version number without leading zeros.
24597  cleaned_value=${BASH_REMATCH[1]}
24598  if test "x$cleaned_value" = x; then
24599    # Special case for zero
24600    cleaned_value=${BASH_REMATCH[2]}
24601  fi
24602
24603  if test $cleaned_value -gt 255; then
24604    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24605  fi
24606  if test "x$cleaned_value" != "x$with_version_minor"; then
24607    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24608$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24609  fi
24610  VERSION_MINOR=$cleaned_value
24611
24612    fi
24613  else
24614    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24615      # Default is 0, if unspecified
24616      VERSION_MINOR=0
24617    fi
24618  fi
24619
24620
24621# Check whether --with-version-security was given.
24622if test "${with_version_security+set}" = set; then :
24623  withval=$with_version_security; with_version_security_present=true
24624else
24625  with_version_security_present=false
24626fi
24627
24628
24629  if test "x$with_version_security_present" = xtrue; then
24630    if test "x$with_version_security" = xyes; then
24631      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24632    elif test "x$with_version_security" = xno; then
24633      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24634      VERSION_SECURITY=0
24635    elif test "x$with_version_security" = x; then
24636      VERSION_SECURITY=0
24637    else
24638
24639  # Additional [] needed to keep m4 from mangling shell constructs.
24640  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24641    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24642  fi
24643  # Extract the version number without leading zeros.
24644  cleaned_value=${BASH_REMATCH[1]}
24645  if test "x$cleaned_value" = x; then
24646    # Special case for zero
24647    cleaned_value=${BASH_REMATCH[2]}
24648  fi
24649
24650  if test $cleaned_value -gt 255; then
24651    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24652  fi
24653  if test "x$cleaned_value" != "x$with_version_security"; then
24654    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24655$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24656  fi
24657  VERSION_SECURITY=$cleaned_value
24658
24659    fi
24660  else
24661    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24662      # Default is 0, if unspecified
24663      VERSION_SECURITY=0
24664    fi
24665  fi
24666
24667
24668# Check whether --with-version-patch was given.
24669if test "${with_version_patch+set}" = set; then :
24670  withval=$with_version_patch; with_version_patch_present=true
24671else
24672  with_version_patch_present=false
24673fi
24674
24675
24676  if test "x$with_version_patch_present" = xtrue; then
24677    if test "x$with_version_patch" = xyes; then
24678      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24679    elif test "x$with_version_patch" = xno; then
24680      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24681      VERSION_PATCH=0
24682    elif test "x$with_version_patch" = x; then
24683      VERSION_PATCH=0
24684    else
24685
24686  # Additional [] needed to keep m4 from mangling shell constructs.
24687  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24688    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24689  fi
24690  # Extract the version number without leading zeros.
24691  cleaned_value=${BASH_REMATCH[1]}
24692  if test "x$cleaned_value" = x; then
24693    # Special case for zero
24694    cleaned_value=${BASH_REMATCH[2]}
24695  fi
24696
24697  if test $cleaned_value -gt 255; then
24698    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24699  fi
24700  if test "x$cleaned_value" != "x$with_version_patch"; then
24701    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24702$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24703  fi
24704  VERSION_PATCH=$cleaned_value
24705
24706    fi
24707  else
24708    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24709      # Default is 0, if unspecified
24710      VERSION_PATCH=0
24711    fi
24712  fi
24713
24714  # Calculate derived version properties
24715
24716  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24717  if test "x$VERSION_PRE" = x; then
24718    VERSION_IS_GA=true
24719  else
24720    VERSION_IS_GA=false
24721  fi
24722
24723  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24724  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24725
24726  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24727  # Strip trailing zeroes from stripped_version_number
24728  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24729  VERSION_NUMBER=$stripped_version_number
24730
24731  # The complete version string, with additional build information
24732  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24733    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24734  else
24735    # If either build or opt is set, we need a + separator
24736    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24737  fi
24738
24739  # The short version string, just VERSION_NUMBER and PRE, if present.
24740  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24741
24742  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24743$as_echo_n "checking for version string... " >&6; }
24744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24745$as_echo "$VERSION_STRING" >&6; }
24746
24747
24748
24749
24750
24751
24752
24753
24754
24755
24756
24757
24758
24759
24760
24761###############################################################################
24762#
24763# Setup BootJDK, used to bootstrap the build.
24764#
24765###############################################################################
24766
24767
24768  BOOT_JDK_FOUND=no
24769
24770# Check whether --with-boot-jdk was given.
24771if test "${with_boot_jdk+set}" = set; then :
24772  withval=$with_boot_jdk;
24773fi
24774
24775
24776  # We look for the Boot JDK through various means, going from more certain to
24777  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24778  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24779  # must check if this is indeed valid; otherwise we'll continue looking.
24780
24781  # Test: Is bootjdk explicitly set by command line arguments?
24782
24783  if test "x$BOOT_JDK_FOUND" = xno; then
24784    # Now execute the test
24785
24786  if test "x$with_boot_jdk" != x; then
24787    BOOT_JDK=$with_boot_jdk
24788    BOOT_JDK_FOUND=maybe
24789    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24790$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24791  fi
24792
24793
24794    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24795    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24796      # Do we have a bin/java?
24797      if test ! -x "$BOOT_JDK/bin/java"; then
24798        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24800        BOOT_JDK_FOUND=no
24801      else
24802        # Do we have a bin/javac?
24803        if test ! -x "$BOOT_JDK/bin/javac"; then
24804          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24806          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24807$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24808          BOOT_JDK_FOUND=no
24809        else
24810          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24811          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24812
24813          # Extra M4 quote needed to protect [] in grep expression.
24814          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24815          if test "x$FOUND_CORRECT_VERSION" = x; then
24816            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24817$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24818            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24819$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24820            BOOT_JDK_FOUND=no
24821          else
24822            # We're done! :-)
24823            BOOT_JDK_FOUND=yes
24824
24825  # Only process if variable expands to non-empty
24826
24827  if test "x$BOOT_JDK" != x; then
24828    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24829
24830  # Input might be given as Windows format, start by converting to
24831  # unix format.
24832  path="$BOOT_JDK"
24833  new_path=`$CYGPATH -u "$path"`
24834
24835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24838  # "foo.exe" is OK but "foo" is an error.
24839  #
24840  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24841  # It is also a way to make sure we got the proper file name for the real test later on.
24842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24843  if test "x$test_shortpath" = x; then
24844    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24845$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24846    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24847  fi
24848
24849  # Call helper function which possibly converts this using DOS-style short mode.
24850  # If so, the updated path is stored in $new_path.
24851
24852  input_path="$new_path"
24853  # Check if we need to convert this using DOS-style short mode. If the path
24854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24855  # take no chances and rewrite it.
24856  # Note: m4 eats our [], so we need to use [ and ] instead.
24857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24858  if test "x$has_forbidden_chars" != x; then
24859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24863      # Going to short mode and back again did indeed matter. Since short mode is
24864      # case insensitive, let's make it lowercase to improve readability.
24865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24866      # Now convert it back to Unix-style (cygpath)
24867      input_path=`$CYGPATH -u "$shortmode_path"`
24868      new_path="$input_path"
24869    fi
24870  fi
24871
24872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24873  if test "x$test_cygdrive_prefix" = x; then
24874    # As a simple fix, exclude /usr/bin since it's not a real path.
24875    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24877      # a path prefixed by /cygdrive for fixpath to work.
24878      new_path="$CYGWIN_ROOT_PATH$input_path"
24879    fi
24880  fi
24881
24882
24883  if test "x$path" != "x$new_path"; then
24884    BOOT_JDK="$new_path"
24885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24886$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24887  fi
24888
24889    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24890
24891  path="$BOOT_JDK"
24892  has_colon=`$ECHO $path | $GREP ^.:`
24893  new_path="$path"
24894  if test "x$has_colon" = x; then
24895    # Not in mixed or Windows style, start by that.
24896    new_path=`cmd //c echo $path`
24897  fi
24898
24899
24900  input_path="$new_path"
24901  # Check if we need to convert this using DOS-style short mode. If the path
24902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24903  # take no chances and rewrite it.
24904  # Note: m4 eats our [], so we need to use [ and ] instead.
24905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24906  if test "x$has_forbidden_chars" != x; then
24907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24909  fi
24910
24911
24912  windows_path="$new_path"
24913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24914    unix_path=`$CYGPATH -u "$windows_path"`
24915    new_path="$unix_path"
24916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24918    new_path="$unix_path"
24919  fi
24920
24921  if test "x$path" != "x$new_path"; then
24922    BOOT_JDK="$new_path"
24923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24924$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24925  fi
24926
24927  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24928  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24929
24930    else
24931      # We're on a unix platform. Hooray! :)
24932      path="$BOOT_JDK"
24933      has_space=`$ECHO "$path" | $GREP " "`
24934      if test "x$has_space" != x; then
24935        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24936$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24937        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24938      fi
24939
24940      # Use eval to expand a potential ~
24941      eval path="$path"
24942      if test ! -f "$path" && test ! -d "$path"; then
24943        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24944      fi
24945
24946      if test -d "$path"; then
24947        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24948      else
24949        dir="`$DIRNAME "$path"`"
24950        base="`$BASENAME "$path"`"
24951        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24952      fi
24953    fi
24954  fi
24955
24956            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24957$as_echo_n "checking for Boot JDK... " >&6; }
24958            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24959$as_echo "$BOOT_JDK" >&6; }
24960            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24961$as_echo_n "checking Boot JDK version... " >&6; }
24962            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24963            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24964$as_echo "$BOOT_JDK_VERSION" >&6; }
24965          fi # end check jdk version
24966        fi # end check javac
24967      fi # end check java
24968    fi # end check boot jdk found
24969  fi
24970
24971  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24972    # Having specified an argument which is incorrect will produce an instant failure;
24973    # we should not go on looking
24974    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24975  fi
24976
24977  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24978
24979  if test "x$BOOT_JDK_FOUND" = xno; then
24980    # Now execute the test
24981
24982  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24983    # First check at user selected default
24984
24985  if test "x$BOOT_JDK_FOUND" = xno; then
24986    # Now execute the test
24987
24988  if test -x /usr/libexec/java_home; then
24989    BOOT_JDK=`/usr/libexec/java_home `
24990    BOOT_JDK_FOUND=maybe
24991    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24992$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24993  fi
24994
24995
24996    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24997    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24998      # Do we have a bin/java?
24999      if test ! -x "$BOOT_JDK/bin/java"; then
25000        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25002        BOOT_JDK_FOUND=no
25003      else
25004        # Do we have a bin/javac?
25005        if test ! -x "$BOOT_JDK/bin/javac"; then
25006          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25007$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25008          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25009$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25010          BOOT_JDK_FOUND=no
25011        else
25012          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25013          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25014
25015          # Extra M4 quote needed to protect [] in grep expression.
25016          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25017          if test "x$FOUND_CORRECT_VERSION" = x; then
25018            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25019$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25020            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25021$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25022            BOOT_JDK_FOUND=no
25023          else
25024            # We're done! :-)
25025            BOOT_JDK_FOUND=yes
25026
25027  # Only process if variable expands to non-empty
25028
25029  if test "x$BOOT_JDK" != x; then
25030    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25031
25032  # Input might be given as Windows format, start by converting to
25033  # unix format.
25034  path="$BOOT_JDK"
25035  new_path=`$CYGPATH -u "$path"`
25036
25037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25040  # "foo.exe" is OK but "foo" is an error.
25041  #
25042  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25043  # It is also a way to make sure we got the proper file name for the real test later on.
25044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25045  if test "x$test_shortpath" = x; then
25046    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25047$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25048    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25049  fi
25050
25051  # Call helper function which possibly converts this using DOS-style short mode.
25052  # If so, the updated path is stored in $new_path.
25053
25054  input_path="$new_path"
25055  # Check if we need to convert this using DOS-style short mode. If the path
25056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25057  # take no chances and rewrite it.
25058  # Note: m4 eats our [], so we need to use [ and ] instead.
25059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25060  if test "x$has_forbidden_chars" != x; then
25061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25062    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25063    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25064    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25065      # Going to short mode and back again did indeed matter. Since short mode is
25066      # case insensitive, let's make it lowercase to improve readability.
25067      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25068      # Now convert it back to Unix-style (cygpath)
25069      input_path=`$CYGPATH -u "$shortmode_path"`
25070      new_path="$input_path"
25071    fi
25072  fi
25073
25074  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25075  if test "x$test_cygdrive_prefix" = x; then
25076    # As a simple fix, exclude /usr/bin since it's not a real path.
25077    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25078      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25079      # a path prefixed by /cygdrive for fixpath to work.
25080      new_path="$CYGWIN_ROOT_PATH$input_path"
25081    fi
25082  fi
25083
25084
25085  if test "x$path" != "x$new_path"; then
25086    BOOT_JDK="$new_path"
25087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25088$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25089  fi
25090
25091    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25092
25093  path="$BOOT_JDK"
25094  has_colon=`$ECHO $path | $GREP ^.:`
25095  new_path="$path"
25096  if test "x$has_colon" = x; then
25097    # Not in mixed or Windows style, start by that.
25098    new_path=`cmd //c echo $path`
25099  fi
25100
25101
25102  input_path="$new_path"
25103  # Check if we need to convert this using DOS-style short mode. If the path
25104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25105  # take no chances and rewrite it.
25106  # Note: m4 eats our [], so we need to use [ and ] instead.
25107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25108  if test "x$has_forbidden_chars" != x; then
25109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25110    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25111  fi
25112
25113
25114  windows_path="$new_path"
25115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25116    unix_path=`$CYGPATH -u "$windows_path"`
25117    new_path="$unix_path"
25118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25120    new_path="$unix_path"
25121  fi
25122
25123  if test "x$path" != "x$new_path"; then
25124    BOOT_JDK="$new_path"
25125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25126$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25127  fi
25128
25129  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25130  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25131
25132    else
25133      # We're on a unix platform. Hooray! :)
25134      path="$BOOT_JDK"
25135      has_space=`$ECHO "$path" | $GREP " "`
25136      if test "x$has_space" != x; then
25137        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25138$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25139        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25140      fi
25141
25142      # Use eval to expand a potential ~
25143      eval path="$path"
25144      if test ! -f "$path" && test ! -d "$path"; then
25145        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25146      fi
25147
25148      if test -d "$path"; then
25149        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25150      else
25151        dir="`$DIRNAME "$path"`"
25152        base="`$BASENAME "$path"`"
25153        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25154      fi
25155    fi
25156  fi
25157
25158            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25159$as_echo_n "checking for Boot JDK... " >&6; }
25160            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25161$as_echo "$BOOT_JDK" >&6; }
25162            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25163$as_echo_n "checking Boot JDK version... " >&6; }
25164            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25165            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25166$as_echo "$BOOT_JDK_VERSION" >&6; }
25167          fi # end check jdk version
25168        fi # end check javac
25169      fi # end check java
25170    fi # end check boot jdk found
25171  fi
25172
25173    # If that did not work out (e.g. too old), try explicit versions instead
25174
25175  if test "x$BOOT_JDK_FOUND" = xno; then
25176    # Now execute the test
25177
25178  if test -x /usr/libexec/java_home; then
25179    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25180    BOOT_JDK_FOUND=maybe
25181    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25182$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25183  fi
25184
25185
25186    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25187    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25188      # Do we have a bin/java?
25189      if test ! -x "$BOOT_JDK/bin/java"; then
25190        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25192        BOOT_JDK_FOUND=no
25193      else
25194        # Do we have a bin/javac?
25195        if test ! -x "$BOOT_JDK/bin/javac"; then
25196          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25198          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25199$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25200          BOOT_JDK_FOUND=no
25201        else
25202          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25203          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25204
25205          # Extra M4 quote needed to protect [] in grep expression.
25206          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25207          if test "x$FOUND_CORRECT_VERSION" = x; then
25208            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25209$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25210            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25211$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25212            BOOT_JDK_FOUND=no
25213          else
25214            # We're done! :-)
25215            BOOT_JDK_FOUND=yes
25216
25217  # Only process if variable expands to non-empty
25218
25219  if test "x$BOOT_JDK" != x; then
25220    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25221
25222  # Input might be given as Windows format, start by converting to
25223  # unix format.
25224  path="$BOOT_JDK"
25225  new_path=`$CYGPATH -u "$path"`
25226
25227  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25228  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25229  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25230  # "foo.exe" is OK but "foo" is an error.
25231  #
25232  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25233  # It is also a way to make sure we got the proper file name for the real test later on.
25234  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25235  if test "x$test_shortpath" = x; then
25236    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25237$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25238    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25239  fi
25240
25241  # Call helper function which possibly converts this using DOS-style short mode.
25242  # If so, the updated path is stored in $new_path.
25243
25244  input_path="$new_path"
25245  # Check if we need to convert this using DOS-style short mode. If the path
25246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25247  # take no chances and rewrite it.
25248  # Note: m4 eats our [], so we need to use [ and ] instead.
25249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25250  if test "x$has_forbidden_chars" != x; then
25251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25252    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25253    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25254    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25255      # Going to short mode and back again did indeed matter. Since short mode is
25256      # case insensitive, let's make it lowercase to improve readability.
25257      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25258      # Now convert it back to Unix-style (cygpath)
25259      input_path=`$CYGPATH -u "$shortmode_path"`
25260      new_path="$input_path"
25261    fi
25262  fi
25263
25264  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25265  if test "x$test_cygdrive_prefix" = x; then
25266    # As a simple fix, exclude /usr/bin since it's not a real path.
25267    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25268      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25269      # a path prefixed by /cygdrive for fixpath to work.
25270      new_path="$CYGWIN_ROOT_PATH$input_path"
25271    fi
25272  fi
25273
25274
25275  if test "x$path" != "x$new_path"; then
25276    BOOT_JDK="$new_path"
25277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25278$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25279  fi
25280
25281    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25282
25283  path="$BOOT_JDK"
25284  has_colon=`$ECHO $path | $GREP ^.:`
25285  new_path="$path"
25286  if test "x$has_colon" = x; then
25287    # Not in mixed or Windows style, start by that.
25288    new_path=`cmd //c echo $path`
25289  fi
25290
25291
25292  input_path="$new_path"
25293  # Check if we need to convert this using DOS-style short mode. If the path
25294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25295  # take no chances and rewrite it.
25296  # Note: m4 eats our [], so we need to use [ and ] instead.
25297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25298  if test "x$has_forbidden_chars" != x; then
25299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25300    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25301  fi
25302
25303
25304  windows_path="$new_path"
25305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25306    unix_path=`$CYGPATH -u "$windows_path"`
25307    new_path="$unix_path"
25308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25310    new_path="$unix_path"
25311  fi
25312
25313  if test "x$path" != "x$new_path"; then
25314    BOOT_JDK="$new_path"
25315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25316$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25317  fi
25318
25319  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25320  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25321
25322    else
25323      # We're on a unix platform. Hooray! :)
25324      path="$BOOT_JDK"
25325      has_space=`$ECHO "$path" | $GREP " "`
25326      if test "x$has_space" != x; then
25327        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25328$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25329        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25330      fi
25331
25332      # Use eval to expand a potential ~
25333      eval path="$path"
25334      if test ! -f "$path" && test ! -d "$path"; then
25335        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25336      fi
25337
25338      if test -d "$path"; then
25339        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25340      else
25341        dir="`$DIRNAME "$path"`"
25342        base="`$BASENAME "$path"`"
25343        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25344      fi
25345    fi
25346  fi
25347
25348            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25349$as_echo_n "checking for Boot JDK... " >&6; }
25350            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25351$as_echo "$BOOT_JDK" >&6; }
25352            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25353$as_echo_n "checking Boot JDK version... " >&6; }
25354            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25355            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25356$as_echo "$BOOT_JDK_VERSION" >&6; }
25357          fi # end check jdk version
25358        fi # end check javac
25359      fi # end check java
25360    fi # end check boot jdk found
25361  fi
25362
25363
25364  if test "x$BOOT_JDK_FOUND" = xno; then
25365    # Now execute the test
25366
25367  if test -x /usr/libexec/java_home; then
25368    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25369    BOOT_JDK_FOUND=maybe
25370    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25371$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25372  fi
25373
25374
25375    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25376    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25377      # Do we have a bin/java?
25378      if test ! -x "$BOOT_JDK/bin/java"; then
25379        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25380$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25381        BOOT_JDK_FOUND=no
25382      else
25383        # Do we have a bin/javac?
25384        if test ! -x "$BOOT_JDK/bin/javac"; then
25385          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25386$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25387          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25388$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25389          BOOT_JDK_FOUND=no
25390        else
25391          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25392          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25393
25394          # Extra M4 quote needed to protect [] in grep expression.
25395          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25396          if test "x$FOUND_CORRECT_VERSION" = x; then
25397            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25398$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25399            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25400$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25401            BOOT_JDK_FOUND=no
25402          else
25403            # We're done! :-)
25404            BOOT_JDK_FOUND=yes
25405
25406  # Only process if variable expands to non-empty
25407
25408  if test "x$BOOT_JDK" != x; then
25409    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25410
25411  # Input might be given as Windows format, start by converting to
25412  # unix format.
25413  path="$BOOT_JDK"
25414  new_path=`$CYGPATH -u "$path"`
25415
25416  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25417  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25418  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25419  # "foo.exe" is OK but "foo" is an error.
25420  #
25421  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25422  # It is also a way to make sure we got the proper file name for the real test later on.
25423  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25424  if test "x$test_shortpath" = x; then
25425    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25426$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25427    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25428  fi
25429
25430  # Call helper function which possibly converts this using DOS-style short mode.
25431  # If so, the updated path is stored in $new_path.
25432
25433  input_path="$new_path"
25434  # Check if we need to convert this using DOS-style short mode. If the path
25435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25436  # take no chances and rewrite it.
25437  # Note: m4 eats our [], so we need to use [ and ] instead.
25438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25439  if test "x$has_forbidden_chars" != x; then
25440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25444      # Going to short mode and back again did indeed matter. Since short mode is
25445      # case insensitive, let's make it lowercase to improve readability.
25446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25447      # Now convert it back to Unix-style (cygpath)
25448      input_path=`$CYGPATH -u "$shortmode_path"`
25449      new_path="$input_path"
25450    fi
25451  fi
25452
25453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25454  if test "x$test_cygdrive_prefix" = x; then
25455    # As a simple fix, exclude /usr/bin since it's not a real path.
25456    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25458      # a path prefixed by /cygdrive for fixpath to work.
25459      new_path="$CYGWIN_ROOT_PATH$input_path"
25460    fi
25461  fi
25462
25463
25464  if test "x$path" != "x$new_path"; then
25465    BOOT_JDK="$new_path"
25466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25467$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25468  fi
25469
25470    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25471
25472  path="$BOOT_JDK"
25473  has_colon=`$ECHO $path | $GREP ^.:`
25474  new_path="$path"
25475  if test "x$has_colon" = x; then
25476    # Not in mixed or Windows style, start by that.
25477    new_path=`cmd //c echo $path`
25478  fi
25479
25480
25481  input_path="$new_path"
25482  # Check if we need to convert this using DOS-style short mode. If the path
25483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25484  # take no chances and rewrite it.
25485  # Note: m4 eats our [], so we need to use [ and ] instead.
25486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25487  if test "x$has_forbidden_chars" != x; then
25488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25490  fi
25491
25492
25493  windows_path="$new_path"
25494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25495    unix_path=`$CYGPATH -u "$windows_path"`
25496    new_path="$unix_path"
25497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25499    new_path="$unix_path"
25500  fi
25501
25502  if test "x$path" != "x$new_path"; then
25503    BOOT_JDK="$new_path"
25504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25505$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25506  fi
25507
25508  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25509  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25510
25511    else
25512      # We're on a unix platform. Hooray! :)
25513      path="$BOOT_JDK"
25514      has_space=`$ECHO "$path" | $GREP " "`
25515      if test "x$has_space" != x; then
25516        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25517$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25518        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25519      fi
25520
25521      # Use eval to expand a potential ~
25522      eval path="$path"
25523      if test ! -f "$path" && test ! -d "$path"; then
25524        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25525      fi
25526
25527      if test -d "$path"; then
25528        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25529      else
25530        dir="`$DIRNAME "$path"`"
25531        base="`$BASENAME "$path"`"
25532        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25533      fi
25534    fi
25535  fi
25536
25537            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25538$as_echo_n "checking for Boot JDK... " >&6; }
25539            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25540$as_echo "$BOOT_JDK" >&6; }
25541            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25542$as_echo_n "checking Boot JDK version... " >&6; }
25543            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25544            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25545$as_echo "$BOOT_JDK_VERSION" >&6; }
25546          fi # end check jdk version
25547        fi # end check javac
25548      fi # end check java
25549    fi # end check boot jdk found
25550  fi
25551
25552
25553  if test "x$BOOT_JDK_FOUND" = xno; then
25554    # Now execute the test
25555
25556  if test -x /usr/libexec/java_home; then
25557    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25558    BOOT_JDK_FOUND=maybe
25559    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25560$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25561  fi
25562
25563
25564    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25565    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25566      # Do we have a bin/java?
25567      if test ! -x "$BOOT_JDK/bin/java"; then
25568        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25569$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25570        BOOT_JDK_FOUND=no
25571      else
25572        # Do we have a bin/javac?
25573        if test ! -x "$BOOT_JDK/bin/javac"; then
25574          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25575$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25576          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25577$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25578          BOOT_JDK_FOUND=no
25579        else
25580          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25581          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25582
25583          # Extra M4 quote needed to protect [] in grep expression.
25584          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25585          if test "x$FOUND_CORRECT_VERSION" = x; then
25586            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25587$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25588            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25589$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25590            BOOT_JDK_FOUND=no
25591          else
25592            # We're done! :-)
25593            BOOT_JDK_FOUND=yes
25594
25595  # Only process if variable expands to non-empty
25596
25597  if test "x$BOOT_JDK" != x; then
25598    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25599
25600  # Input might be given as Windows format, start by converting to
25601  # unix format.
25602  path="$BOOT_JDK"
25603  new_path=`$CYGPATH -u "$path"`
25604
25605  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25606  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25607  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25608  # "foo.exe" is OK but "foo" is an error.
25609  #
25610  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25611  # It is also a way to make sure we got the proper file name for the real test later on.
25612  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25613  if test "x$test_shortpath" = x; then
25614    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25615$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25616    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25617  fi
25618
25619  # Call helper function which possibly converts this using DOS-style short mode.
25620  # If so, the updated path is stored in $new_path.
25621
25622  input_path="$new_path"
25623  # Check if we need to convert this using DOS-style short mode. If the path
25624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25625  # take no chances and rewrite it.
25626  # Note: m4 eats our [], so we need to use [ and ] instead.
25627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25628  if test "x$has_forbidden_chars" != x; then
25629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25630    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25631    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25632    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25633      # Going to short mode and back again did indeed matter. Since short mode is
25634      # case insensitive, let's make it lowercase to improve readability.
25635      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25636      # Now convert it back to Unix-style (cygpath)
25637      input_path=`$CYGPATH -u "$shortmode_path"`
25638      new_path="$input_path"
25639    fi
25640  fi
25641
25642  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25643  if test "x$test_cygdrive_prefix" = x; then
25644    # As a simple fix, exclude /usr/bin since it's not a real path.
25645    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25646      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25647      # a path prefixed by /cygdrive for fixpath to work.
25648      new_path="$CYGWIN_ROOT_PATH$input_path"
25649    fi
25650  fi
25651
25652
25653  if test "x$path" != "x$new_path"; then
25654    BOOT_JDK="$new_path"
25655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25656$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25657  fi
25658
25659    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25660
25661  path="$BOOT_JDK"
25662  has_colon=`$ECHO $path | $GREP ^.:`
25663  new_path="$path"
25664  if test "x$has_colon" = x; then
25665    # Not in mixed or Windows style, start by that.
25666    new_path=`cmd //c echo $path`
25667  fi
25668
25669
25670  input_path="$new_path"
25671  # Check if we need to convert this using DOS-style short mode. If the path
25672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25673  # take no chances and rewrite it.
25674  # Note: m4 eats our [], so we need to use [ and ] instead.
25675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25676  if test "x$has_forbidden_chars" != x; then
25677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25678    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25679  fi
25680
25681
25682  windows_path="$new_path"
25683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25684    unix_path=`$CYGPATH -u "$windows_path"`
25685    new_path="$unix_path"
25686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25688    new_path="$unix_path"
25689  fi
25690
25691  if test "x$path" != "x$new_path"; then
25692    BOOT_JDK="$new_path"
25693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25694$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25695  fi
25696
25697  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25698  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25699
25700    else
25701      # We're on a unix platform. Hooray! :)
25702      path="$BOOT_JDK"
25703      has_space=`$ECHO "$path" | $GREP " "`
25704      if test "x$has_space" != x; then
25705        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25706$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25707        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25708      fi
25709
25710      # Use eval to expand a potential ~
25711      eval path="$path"
25712      if test ! -f "$path" && test ! -d "$path"; then
25713        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25714      fi
25715
25716      if test -d "$path"; then
25717        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25718      else
25719        dir="`$DIRNAME "$path"`"
25720        base="`$BASENAME "$path"`"
25721        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25722      fi
25723    fi
25724  fi
25725
25726            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25727$as_echo_n "checking for Boot JDK... " >&6; }
25728            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25729$as_echo "$BOOT_JDK" >&6; }
25730            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25731$as_echo_n "checking Boot JDK version... " >&6; }
25732            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25733            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25734$as_echo "$BOOT_JDK_VERSION" >&6; }
25735          fi # end check jdk version
25736        fi # end check javac
25737      fi # end check java
25738    fi # end check boot jdk found
25739  fi
25740
25741  fi
25742
25743
25744    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25745    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25746      # Do we have a bin/java?
25747      if test ! -x "$BOOT_JDK/bin/java"; then
25748        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25749$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25750        BOOT_JDK_FOUND=no
25751      else
25752        # Do we have a bin/javac?
25753        if test ! -x "$BOOT_JDK/bin/javac"; then
25754          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25755$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25756          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25757$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25758          BOOT_JDK_FOUND=no
25759        else
25760          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25761          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25762
25763          # Extra M4 quote needed to protect [] in grep expression.
25764          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25765          if test "x$FOUND_CORRECT_VERSION" = x; then
25766            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25767$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25768            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25769$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25770            BOOT_JDK_FOUND=no
25771          else
25772            # We're done! :-)
25773            BOOT_JDK_FOUND=yes
25774
25775  # Only process if variable expands to non-empty
25776
25777  if test "x$BOOT_JDK" != x; then
25778    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25779
25780  # Input might be given as Windows format, start by converting to
25781  # unix format.
25782  path="$BOOT_JDK"
25783  new_path=`$CYGPATH -u "$path"`
25784
25785  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25786  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25787  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25788  # "foo.exe" is OK but "foo" is an error.
25789  #
25790  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25791  # It is also a way to make sure we got the proper file name for the real test later on.
25792  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25793  if test "x$test_shortpath" = x; then
25794    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25795$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25796    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25797  fi
25798
25799  # Call helper function which possibly converts this using DOS-style short mode.
25800  # If so, the updated path is stored in $new_path.
25801
25802  input_path="$new_path"
25803  # Check if we need to convert this using DOS-style short mode. If the path
25804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25805  # take no chances and rewrite it.
25806  # Note: m4 eats our [], so we need to use [ and ] instead.
25807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25808  if test "x$has_forbidden_chars" != x; then
25809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25810    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25811    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25812    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25813      # Going to short mode and back again did indeed matter. Since short mode is
25814      # case insensitive, let's make it lowercase to improve readability.
25815      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25816      # Now convert it back to Unix-style (cygpath)
25817      input_path=`$CYGPATH -u "$shortmode_path"`
25818      new_path="$input_path"
25819    fi
25820  fi
25821
25822  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25823  if test "x$test_cygdrive_prefix" = x; then
25824    # As a simple fix, exclude /usr/bin since it's not a real path.
25825    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25826      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25827      # a path prefixed by /cygdrive for fixpath to work.
25828      new_path="$CYGWIN_ROOT_PATH$input_path"
25829    fi
25830  fi
25831
25832
25833  if test "x$path" != "x$new_path"; then
25834    BOOT_JDK="$new_path"
25835    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25836$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25837  fi
25838
25839    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25840
25841  path="$BOOT_JDK"
25842  has_colon=`$ECHO $path | $GREP ^.:`
25843  new_path="$path"
25844  if test "x$has_colon" = x; then
25845    # Not in mixed or Windows style, start by that.
25846    new_path=`cmd //c echo $path`
25847  fi
25848
25849
25850  input_path="$new_path"
25851  # Check if we need to convert this using DOS-style short mode. If the path
25852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25853  # take no chances and rewrite it.
25854  # Note: m4 eats our [], so we need to use [ and ] instead.
25855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25856  if test "x$has_forbidden_chars" != x; then
25857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25858    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25859  fi
25860
25861
25862  windows_path="$new_path"
25863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25864    unix_path=`$CYGPATH -u "$windows_path"`
25865    new_path="$unix_path"
25866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25868    new_path="$unix_path"
25869  fi
25870
25871  if test "x$path" != "x$new_path"; then
25872    BOOT_JDK="$new_path"
25873    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25874$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25875  fi
25876
25877  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25878  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25879
25880    else
25881      # We're on a unix platform. Hooray! :)
25882      path="$BOOT_JDK"
25883      has_space=`$ECHO "$path" | $GREP " "`
25884      if test "x$has_space" != x; then
25885        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25886$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25887        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25888      fi
25889
25890      # Use eval to expand a potential ~
25891      eval path="$path"
25892      if test ! -f "$path" && test ! -d "$path"; then
25893        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25894      fi
25895
25896      if test -d "$path"; then
25897        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25898      else
25899        dir="`$DIRNAME "$path"`"
25900        base="`$BASENAME "$path"`"
25901        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25902      fi
25903    fi
25904  fi
25905
25906            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25907$as_echo_n "checking for Boot JDK... " >&6; }
25908            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25909$as_echo "$BOOT_JDK" >&6; }
25910            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25911$as_echo_n "checking Boot JDK version... " >&6; }
25912            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25913            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25914$as_echo "$BOOT_JDK_VERSION" >&6; }
25915          fi # end check jdk version
25916        fi # end check javac
25917      fi # end check java
25918    fi # end check boot jdk found
25919  fi
25920
25921
25922  # Test: Is $JAVA_HOME set?
25923
25924  if test "x$BOOT_JDK_FOUND" = xno; then
25925    # Now execute the test
25926
25927  if test "x$JAVA_HOME" != x; then
25928    JAVA_HOME_PROCESSED="$JAVA_HOME"
25929
25930  # Only process if variable expands to non-empty
25931
25932  if test "x$JAVA_HOME_PROCESSED" != x; then
25933    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25934
25935  # Input might be given as Windows format, start by converting to
25936  # unix format.
25937  path="$JAVA_HOME_PROCESSED"
25938  new_path=`$CYGPATH -u "$path"`
25939
25940  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25941  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25942  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25943  # "foo.exe" is OK but "foo" is an error.
25944  #
25945  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25946  # It is also a way to make sure we got the proper file name for the real test later on.
25947  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25948  if test "x$test_shortpath" = x; then
25949    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25950$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25951    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25952  fi
25953
25954  # Call helper function which possibly converts this using DOS-style short mode.
25955  # If so, the updated path is stored in $new_path.
25956
25957  input_path="$new_path"
25958  # Check if we need to convert this using DOS-style short mode. If the path
25959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25960  # take no chances and rewrite it.
25961  # Note: m4 eats our [], so we need to use [ and ] instead.
25962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25963  if test "x$has_forbidden_chars" != x; then
25964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25965    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25966    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25967    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25968      # Going to short mode and back again did indeed matter. Since short mode is
25969      # case insensitive, let's make it lowercase to improve readability.
25970      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25971      # Now convert it back to Unix-style (cygpath)
25972      input_path=`$CYGPATH -u "$shortmode_path"`
25973      new_path="$input_path"
25974    fi
25975  fi
25976
25977  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25978  if test "x$test_cygdrive_prefix" = x; then
25979    # As a simple fix, exclude /usr/bin since it's not a real path.
25980    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25981      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25982      # a path prefixed by /cygdrive for fixpath to work.
25983      new_path="$CYGWIN_ROOT_PATH$input_path"
25984    fi
25985  fi
25986
25987
25988  if test "x$path" != "x$new_path"; then
25989    JAVA_HOME_PROCESSED="$new_path"
25990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25991$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25992  fi
25993
25994    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25995
25996  path="$JAVA_HOME_PROCESSED"
25997  has_colon=`$ECHO $path | $GREP ^.:`
25998  new_path="$path"
25999  if test "x$has_colon" = x; then
26000    # Not in mixed or Windows style, start by that.
26001    new_path=`cmd //c echo $path`
26002  fi
26003
26004
26005  input_path="$new_path"
26006  # Check if we need to convert this using DOS-style short mode. If the path
26007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26008  # take no chances and rewrite it.
26009  # Note: m4 eats our [], so we need to use [ and ] instead.
26010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26011  if test "x$has_forbidden_chars" != x; then
26012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26013    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26014  fi
26015
26016
26017  windows_path="$new_path"
26018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26019    unix_path=`$CYGPATH -u "$windows_path"`
26020    new_path="$unix_path"
26021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26023    new_path="$unix_path"
26024  fi
26025
26026  if test "x$path" != "x$new_path"; then
26027    JAVA_HOME_PROCESSED="$new_path"
26028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26029$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26030  fi
26031
26032  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26033  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26034
26035    else
26036      # We're on a unix platform. Hooray! :)
26037      path="$JAVA_HOME_PROCESSED"
26038      has_space=`$ECHO "$path" | $GREP " "`
26039      if test "x$has_space" != x; then
26040        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26041$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26042        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26043      fi
26044
26045      # Use eval to expand a potential ~
26046      eval path="$path"
26047      if test ! -f "$path" && test ! -d "$path"; then
26048        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26049      fi
26050
26051      if test -d "$path"; then
26052        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26053      else
26054        dir="`$DIRNAME "$path"`"
26055        base="`$BASENAME "$path"`"
26056        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26057      fi
26058    fi
26059  fi
26060
26061    if test ! -d "$JAVA_HOME_PROCESSED"; then
26062      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26063$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26064    else
26065      # Aha, the user has set a JAVA_HOME
26066      # let us use that as the Boot JDK.
26067      BOOT_JDK="$JAVA_HOME_PROCESSED"
26068      BOOT_JDK_FOUND=maybe
26069      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26070$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26071    fi
26072  fi
26073
26074
26075    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26076    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26077      # Do we have a bin/java?
26078      if test ! -x "$BOOT_JDK/bin/java"; then
26079        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26080$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26081        BOOT_JDK_FOUND=no
26082      else
26083        # Do we have a bin/javac?
26084        if test ! -x "$BOOT_JDK/bin/javac"; then
26085          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26086$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26087          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26088$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26089          BOOT_JDK_FOUND=no
26090        else
26091          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26092          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26093
26094          # Extra M4 quote needed to protect [] in grep expression.
26095          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26096          if test "x$FOUND_CORRECT_VERSION" = x; then
26097            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26098$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26099            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26100$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26101            BOOT_JDK_FOUND=no
26102          else
26103            # We're done! :-)
26104            BOOT_JDK_FOUND=yes
26105
26106  # Only process if variable expands to non-empty
26107
26108  if test "x$BOOT_JDK" != x; then
26109    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26110
26111  # Input might be given as Windows format, start by converting to
26112  # unix format.
26113  path="$BOOT_JDK"
26114  new_path=`$CYGPATH -u "$path"`
26115
26116  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26117  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26118  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26119  # "foo.exe" is OK but "foo" is an error.
26120  #
26121  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26122  # It is also a way to make sure we got the proper file name for the real test later on.
26123  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26124  if test "x$test_shortpath" = x; then
26125    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26126$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26127    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26128  fi
26129
26130  # Call helper function which possibly converts this using DOS-style short mode.
26131  # If so, the updated path is stored in $new_path.
26132
26133  input_path="$new_path"
26134  # Check if we need to convert this using DOS-style short mode. If the path
26135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26136  # take no chances and rewrite it.
26137  # Note: m4 eats our [], so we need to use [ and ] instead.
26138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26139  if test "x$has_forbidden_chars" != x; then
26140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26141    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26142    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26143    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26144      # Going to short mode and back again did indeed matter. Since short mode is
26145      # case insensitive, let's make it lowercase to improve readability.
26146      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26147      # Now convert it back to Unix-style (cygpath)
26148      input_path=`$CYGPATH -u "$shortmode_path"`
26149      new_path="$input_path"
26150    fi
26151  fi
26152
26153  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26154  if test "x$test_cygdrive_prefix" = x; then
26155    # As a simple fix, exclude /usr/bin since it's not a real path.
26156    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26157      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26158      # a path prefixed by /cygdrive for fixpath to work.
26159      new_path="$CYGWIN_ROOT_PATH$input_path"
26160    fi
26161  fi
26162
26163
26164  if test "x$path" != "x$new_path"; then
26165    BOOT_JDK="$new_path"
26166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26167$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26168  fi
26169
26170    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26171
26172  path="$BOOT_JDK"
26173  has_colon=`$ECHO $path | $GREP ^.:`
26174  new_path="$path"
26175  if test "x$has_colon" = x; then
26176    # Not in mixed or Windows style, start by that.
26177    new_path=`cmd //c echo $path`
26178  fi
26179
26180
26181  input_path="$new_path"
26182  # Check if we need to convert this using DOS-style short mode. If the path
26183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26184  # take no chances and rewrite it.
26185  # Note: m4 eats our [], so we need to use [ and ] instead.
26186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26187  if test "x$has_forbidden_chars" != x; then
26188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26189    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26190  fi
26191
26192
26193  windows_path="$new_path"
26194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26195    unix_path=`$CYGPATH -u "$windows_path"`
26196    new_path="$unix_path"
26197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26199    new_path="$unix_path"
26200  fi
26201
26202  if test "x$path" != "x$new_path"; then
26203    BOOT_JDK="$new_path"
26204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26205$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26206  fi
26207
26208  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26209  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26210
26211    else
26212      # We're on a unix platform. Hooray! :)
26213      path="$BOOT_JDK"
26214      has_space=`$ECHO "$path" | $GREP " "`
26215      if test "x$has_space" != x; then
26216        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26217$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26218        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26219      fi
26220
26221      # Use eval to expand a potential ~
26222      eval path="$path"
26223      if test ! -f "$path" && test ! -d "$path"; then
26224        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26225      fi
26226
26227      if test -d "$path"; then
26228        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26229      else
26230        dir="`$DIRNAME "$path"`"
26231        base="`$BASENAME "$path"`"
26232        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26233      fi
26234    fi
26235  fi
26236
26237            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26238$as_echo_n "checking for Boot JDK... " >&6; }
26239            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26240$as_echo "$BOOT_JDK" >&6; }
26241            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26242$as_echo_n "checking Boot JDK version... " >&6; }
26243            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26244            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26245$as_echo "$BOOT_JDK_VERSION" >&6; }
26246          fi # end check jdk version
26247        fi # end check javac
26248      fi # end check java
26249    fi # end check boot jdk found
26250  fi
26251
26252
26253  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26254
26255  if test "x$BOOT_JDK_FOUND" = xno; then
26256    # Now execute the test
26257
26258  # Extract the first word of "javac", so it can be a program name with args.
26259set dummy javac; ac_word=$2
26260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26261$as_echo_n "checking for $ac_word... " >&6; }
26262if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26263  $as_echo_n "(cached) " >&6
26264else
26265  case $JAVAC_CHECK in
26266  [\\/]* | ?:[\\/]*)
26267  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26268  ;;
26269  *)
26270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26271for as_dir in $PATH
26272do
26273  IFS=$as_save_IFS
26274  test -z "$as_dir" && as_dir=.
26275    for ac_exec_ext in '' $ac_executable_extensions; do
26276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26277    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26279    break 2
26280  fi
26281done
26282  done
26283IFS=$as_save_IFS
26284
26285  ;;
26286esac
26287fi
26288JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26289if test -n "$JAVAC_CHECK"; then
26290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26291$as_echo "$JAVAC_CHECK" >&6; }
26292else
26293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26294$as_echo "no" >&6; }
26295fi
26296
26297
26298  # Extract the first word of "java", so it can be a program name with args.
26299set dummy java; ac_word=$2
26300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26301$as_echo_n "checking for $ac_word... " >&6; }
26302if ${ac_cv_path_JAVA_CHECK+:} false; then :
26303  $as_echo_n "(cached) " >&6
26304else
26305  case $JAVA_CHECK in
26306  [\\/]* | ?:[\\/]*)
26307  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26308  ;;
26309  *)
26310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26311for as_dir in $PATH
26312do
26313  IFS=$as_save_IFS
26314  test -z "$as_dir" && as_dir=.
26315    for ac_exec_ext in '' $ac_executable_extensions; do
26316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26317    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26319    break 2
26320  fi
26321done
26322  done
26323IFS=$as_save_IFS
26324
26325  ;;
26326esac
26327fi
26328JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26329if test -n "$JAVA_CHECK"; then
26330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26331$as_echo "$JAVA_CHECK" >&6; }
26332else
26333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26334$as_echo "no" >&6; }
26335fi
26336
26337
26338  BINARY="$JAVAC_CHECK"
26339  if test "x$JAVAC_CHECK" = x; then
26340    BINARY="$JAVA_CHECK"
26341  fi
26342  if test "x$BINARY" != x; then
26343    # So there is a java(c) binary, it might be part of a JDK.
26344    # Lets find the JDK/JRE directory by following symbolic links.
26345    # Linux/GNU systems often have links from /usr/bin/java to
26346    # /etc/alternatives/java to the real JDK binary.
26347
26348  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26349    # Follow a chain of symbolic links. Use readlink
26350    # where it exists, else fall back to horribly
26351    # complicated shell code.
26352    if test "x$READLINK_TESTED" != yes; then
26353      # On MacOSX there is a readlink tool with a different
26354      # purpose than the GNU readlink tool. Check the found readlink.
26355      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26356      if test "x$ISGNU" = x; then
26357        # A readlink that we do not know how to use.
26358        # Are there other non-GNU readlinks out there?
26359        READLINK_TESTED=yes
26360        READLINK=
26361      fi
26362    fi
26363
26364    if test "x$READLINK" != x; then
26365      BINARY=`$READLINK -f $BINARY`
26366    else
26367      # Save the current directory for restoring afterwards
26368      STARTDIR=$PWD
26369      COUNTER=0
26370      sym_link_dir=`$DIRNAME $BINARY`
26371      sym_link_file=`$BASENAME $BINARY`
26372      cd $sym_link_dir
26373      # Use -P flag to resolve symlinks in directories.
26374      cd `$THEPWDCMD -P`
26375      sym_link_dir=`$THEPWDCMD -P`
26376      # Resolve file symlinks
26377      while test $COUNTER -lt 20; do
26378        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26379        if test "x$ISLINK" == x; then
26380          # This is not a symbolic link! We are done!
26381          break
26382        fi
26383        # Again resolve directory symlinks since the target of the just found
26384        # link could be in a different directory
26385        cd `$DIRNAME $ISLINK`
26386        sym_link_dir=`$THEPWDCMD -P`
26387        sym_link_file=`$BASENAME $ISLINK`
26388        let COUNTER=COUNTER+1
26389      done
26390      cd $STARTDIR
26391      BINARY=$sym_link_dir/$sym_link_file
26392    fi
26393  fi
26394
26395    BOOT_JDK=`dirname "$BINARY"`
26396    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26397    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26398      # Looks like we found ourselves an JDK
26399      BOOT_JDK_FOUND=maybe
26400      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26401$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26402    fi
26403  fi
26404
26405
26406    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26407    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26408      # Do we have a bin/java?
26409      if test ! -x "$BOOT_JDK/bin/java"; then
26410        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26411$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26412        BOOT_JDK_FOUND=no
26413      else
26414        # Do we have a bin/javac?
26415        if test ! -x "$BOOT_JDK/bin/javac"; then
26416          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26417$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26418          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26419$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26420          BOOT_JDK_FOUND=no
26421        else
26422          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26423          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26424
26425          # Extra M4 quote needed to protect [] in grep expression.
26426          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26427          if test "x$FOUND_CORRECT_VERSION" = x; then
26428            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26429$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26430            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26431$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26432            BOOT_JDK_FOUND=no
26433          else
26434            # We're done! :-)
26435            BOOT_JDK_FOUND=yes
26436
26437  # Only process if variable expands to non-empty
26438
26439  if test "x$BOOT_JDK" != x; then
26440    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26441
26442  # Input might be given as Windows format, start by converting to
26443  # unix format.
26444  path="$BOOT_JDK"
26445  new_path=`$CYGPATH -u "$path"`
26446
26447  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26448  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26449  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26450  # "foo.exe" is OK but "foo" is an error.
26451  #
26452  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26453  # It is also a way to make sure we got the proper file name for the real test later on.
26454  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26455  if test "x$test_shortpath" = x; then
26456    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26457$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26458    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26459  fi
26460
26461  # Call helper function which possibly converts this using DOS-style short mode.
26462  # If so, the updated path is stored in $new_path.
26463
26464  input_path="$new_path"
26465  # Check if we need to convert this using DOS-style short mode. If the path
26466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26467  # take no chances and rewrite it.
26468  # Note: m4 eats our [], so we need to use [ and ] instead.
26469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26470  if test "x$has_forbidden_chars" != x; then
26471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26472    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26473    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26474    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26475      # Going to short mode and back again did indeed matter. Since short mode is
26476      # case insensitive, let's make it lowercase to improve readability.
26477      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26478      # Now convert it back to Unix-style (cygpath)
26479      input_path=`$CYGPATH -u "$shortmode_path"`
26480      new_path="$input_path"
26481    fi
26482  fi
26483
26484  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26485  if test "x$test_cygdrive_prefix" = x; then
26486    # As a simple fix, exclude /usr/bin since it's not a real path.
26487    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26488      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26489      # a path prefixed by /cygdrive for fixpath to work.
26490      new_path="$CYGWIN_ROOT_PATH$input_path"
26491    fi
26492  fi
26493
26494
26495  if test "x$path" != "x$new_path"; then
26496    BOOT_JDK="$new_path"
26497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26498$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26499  fi
26500
26501    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26502
26503  path="$BOOT_JDK"
26504  has_colon=`$ECHO $path | $GREP ^.:`
26505  new_path="$path"
26506  if test "x$has_colon" = x; then
26507    # Not in mixed or Windows style, start by that.
26508    new_path=`cmd //c echo $path`
26509  fi
26510
26511
26512  input_path="$new_path"
26513  # Check if we need to convert this using DOS-style short mode. If the path
26514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26515  # take no chances and rewrite it.
26516  # Note: m4 eats our [], so we need to use [ and ] instead.
26517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26518  if test "x$has_forbidden_chars" != x; then
26519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26520    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26521  fi
26522
26523
26524  windows_path="$new_path"
26525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26526    unix_path=`$CYGPATH -u "$windows_path"`
26527    new_path="$unix_path"
26528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26530    new_path="$unix_path"
26531  fi
26532
26533  if test "x$path" != "x$new_path"; then
26534    BOOT_JDK="$new_path"
26535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26536$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26537  fi
26538
26539  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26540  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26541
26542    else
26543      # We're on a unix platform. Hooray! :)
26544      path="$BOOT_JDK"
26545      has_space=`$ECHO "$path" | $GREP " "`
26546      if test "x$has_space" != x; then
26547        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26548$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26549        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26550      fi
26551
26552      # Use eval to expand a potential ~
26553      eval path="$path"
26554      if test ! -f "$path" && test ! -d "$path"; then
26555        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26556      fi
26557
26558      if test -d "$path"; then
26559        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26560      else
26561        dir="`$DIRNAME "$path"`"
26562        base="`$BASENAME "$path"`"
26563        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26564      fi
26565    fi
26566  fi
26567
26568            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26569$as_echo_n "checking for Boot JDK... " >&6; }
26570            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26571$as_echo "$BOOT_JDK" >&6; }
26572            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26573$as_echo_n "checking Boot JDK version... " >&6; }
26574            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26575            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26576$as_echo "$BOOT_JDK_VERSION" >&6; }
26577          fi # end check jdk version
26578        fi # end check javac
26579      fi # end check java
26580    fi # end check boot jdk found
26581  fi
26582
26583
26584  # Test: Is there a JDK installed in default, well-known locations?
26585
26586  if test "x$BOOT_JDK_FOUND" = xno; then
26587    # Now execute the test
26588
26589  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26590
26591  if test "x$BOOT_JDK_FOUND" = xno; then
26592    # Now execute the test
26593
26594  if test "x$ProgramW6432" != x; then
26595    VIRTUAL_DIR="$ProgramW6432/Java"
26596
26597  windows_path="$VIRTUAL_DIR"
26598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26599    unix_path=`$CYGPATH -u "$windows_path"`
26600    VIRTUAL_DIR="$unix_path"
26601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26603    VIRTUAL_DIR="$unix_path"
26604  fi
26605
26606
26607  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26608  BOOT_JDK_SUFFIX=""
26609  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26610  if test "x$ALL_JDKS_FOUND" != x; then
26611    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26612
26613  if test "x$BOOT_JDK_FOUND" = xno; then
26614    # Now execute the test
26615
26616        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26617        if test -d "$BOOT_JDK"; then
26618          BOOT_JDK_FOUND=maybe
26619          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26620$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26621        fi
26622
26623
26624    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26625    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26626      # Do we have a bin/java?
26627      if test ! -x "$BOOT_JDK/bin/java"; then
26628        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26629$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26630        BOOT_JDK_FOUND=no
26631      else
26632        # Do we have a bin/javac?
26633        if test ! -x "$BOOT_JDK/bin/javac"; then
26634          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26635$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26636          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26637$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26638          BOOT_JDK_FOUND=no
26639        else
26640          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26641          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26642
26643          # Extra M4 quote needed to protect [] in grep expression.
26644          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26645          if test "x$FOUND_CORRECT_VERSION" = x; then
26646            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26647$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26648            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26649$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26650            BOOT_JDK_FOUND=no
26651          else
26652            # We're done! :-)
26653            BOOT_JDK_FOUND=yes
26654
26655  # Only process if variable expands to non-empty
26656
26657  if test "x$BOOT_JDK" != x; then
26658    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26659
26660  # Input might be given as Windows format, start by converting to
26661  # unix format.
26662  path="$BOOT_JDK"
26663  new_path=`$CYGPATH -u "$path"`
26664
26665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26668  # "foo.exe" is OK but "foo" is an error.
26669  #
26670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26671  # It is also a way to make sure we got the proper file name for the real test later on.
26672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26673  if test "x$test_shortpath" = x; then
26674    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26675$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26676    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26677  fi
26678
26679  # Call helper function which possibly converts this using DOS-style short mode.
26680  # If so, the updated path is stored in $new_path.
26681
26682  input_path="$new_path"
26683  # Check if we need to convert this using DOS-style short mode. If the path
26684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26685  # take no chances and rewrite it.
26686  # Note: m4 eats our [], so we need to use [ and ] instead.
26687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26688  if test "x$has_forbidden_chars" != x; then
26689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26693      # Going to short mode and back again did indeed matter. Since short mode is
26694      # case insensitive, let's make it lowercase to improve readability.
26695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26696      # Now convert it back to Unix-style (cygpath)
26697      input_path=`$CYGPATH -u "$shortmode_path"`
26698      new_path="$input_path"
26699    fi
26700  fi
26701
26702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26703  if test "x$test_cygdrive_prefix" = x; then
26704    # As a simple fix, exclude /usr/bin since it's not a real path.
26705    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26707      # a path prefixed by /cygdrive for fixpath to work.
26708      new_path="$CYGWIN_ROOT_PATH$input_path"
26709    fi
26710  fi
26711
26712
26713  if test "x$path" != "x$new_path"; then
26714    BOOT_JDK="$new_path"
26715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26716$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26717  fi
26718
26719    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26720
26721  path="$BOOT_JDK"
26722  has_colon=`$ECHO $path | $GREP ^.:`
26723  new_path="$path"
26724  if test "x$has_colon" = x; then
26725    # Not in mixed or Windows style, start by that.
26726    new_path=`cmd //c echo $path`
26727  fi
26728
26729
26730  input_path="$new_path"
26731  # Check if we need to convert this using DOS-style short mode. If the path
26732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26733  # take no chances and rewrite it.
26734  # Note: m4 eats our [], so we need to use [ and ] instead.
26735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26736  if test "x$has_forbidden_chars" != x; then
26737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26739  fi
26740
26741
26742  windows_path="$new_path"
26743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26744    unix_path=`$CYGPATH -u "$windows_path"`
26745    new_path="$unix_path"
26746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26748    new_path="$unix_path"
26749  fi
26750
26751  if test "x$path" != "x$new_path"; then
26752    BOOT_JDK="$new_path"
26753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26754$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26755  fi
26756
26757  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26758  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26759
26760    else
26761      # We're on a unix platform. Hooray! :)
26762      path="$BOOT_JDK"
26763      has_space=`$ECHO "$path" | $GREP " "`
26764      if test "x$has_space" != x; then
26765        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26766$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26767        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26768      fi
26769
26770      # Use eval to expand a potential ~
26771      eval path="$path"
26772      if test ! -f "$path" && test ! -d "$path"; then
26773        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26774      fi
26775
26776      if test -d "$path"; then
26777        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26778      else
26779        dir="`$DIRNAME "$path"`"
26780        base="`$BASENAME "$path"`"
26781        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26782      fi
26783    fi
26784  fi
26785
26786            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26787$as_echo_n "checking for Boot JDK... " >&6; }
26788            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26789$as_echo "$BOOT_JDK" >&6; }
26790            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26791$as_echo_n "checking Boot JDK version... " >&6; }
26792            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26793            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26794$as_echo "$BOOT_JDK_VERSION" >&6; }
26795          fi # end check jdk version
26796        fi # end check javac
26797      fi # end check java
26798    fi # end check boot jdk found
26799  fi
26800
26801    done
26802  fi
26803
26804  fi
26805
26806
26807    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26808    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26809      # Do we have a bin/java?
26810      if test ! -x "$BOOT_JDK/bin/java"; then
26811        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26813        BOOT_JDK_FOUND=no
26814      else
26815        # Do we have a bin/javac?
26816        if test ! -x "$BOOT_JDK/bin/javac"; then
26817          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26818$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26819          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26820$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26821          BOOT_JDK_FOUND=no
26822        else
26823          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26824          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26825
26826          # Extra M4 quote needed to protect [] in grep expression.
26827          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26828          if test "x$FOUND_CORRECT_VERSION" = x; then
26829            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26830$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26831            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26832$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26833            BOOT_JDK_FOUND=no
26834          else
26835            # We're done! :-)
26836            BOOT_JDK_FOUND=yes
26837
26838  # Only process if variable expands to non-empty
26839
26840  if test "x$BOOT_JDK" != x; then
26841    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26842
26843  # Input might be given as Windows format, start by converting to
26844  # unix format.
26845  path="$BOOT_JDK"
26846  new_path=`$CYGPATH -u "$path"`
26847
26848  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26849  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26850  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26851  # "foo.exe" is OK but "foo" is an error.
26852  #
26853  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26854  # It is also a way to make sure we got the proper file name for the real test later on.
26855  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26856  if test "x$test_shortpath" = x; then
26857    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26858$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26859    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26860  fi
26861
26862  # Call helper function which possibly converts this using DOS-style short mode.
26863  # If so, the updated path is stored in $new_path.
26864
26865  input_path="$new_path"
26866  # Check if we need to convert this using DOS-style short mode. If the path
26867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26868  # take no chances and rewrite it.
26869  # Note: m4 eats our [], so we need to use [ and ] instead.
26870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26871  if test "x$has_forbidden_chars" != x; then
26872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26873    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26874    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26875    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26876      # Going to short mode and back again did indeed matter. Since short mode is
26877      # case insensitive, let's make it lowercase to improve readability.
26878      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26879      # Now convert it back to Unix-style (cygpath)
26880      input_path=`$CYGPATH -u "$shortmode_path"`
26881      new_path="$input_path"
26882    fi
26883  fi
26884
26885  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26886  if test "x$test_cygdrive_prefix" = x; then
26887    # As a simple fix, exclude /usr/bin since it's not a real path.
26888    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26889      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26890      # a path prefixed by /cygdrive for fixpath to work.
26891      new_path="$CYGWIN_ROOT_PATH$input_path"
26892    fi
26893  fi
26894
26895
26896  if test "x$path" != "x$new_path"; then
26897    BOOT_JDK="$new_path"
26898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26899$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26900  fi
26901
26902    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26903
26904  path="$BOOT_JDK"
26905  has_colon=`$ECHO $path | $GREP ^.:`
26906  new_path="$path"
26907  if test "x$has_colon" = x; then
26908    # Not in mixed or Windows style, start by that.
26909    new_path=`cmd //c echo $path`
26910  fi
26911
26912
26913  input_path="$new_path"
26914  # Check if we need to convert this using DOS-style short mode. If the path
26915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26916  # take no chances and rewrite it.
26917  # Note: m4 eats our [], so we need to use [ and ] instead.
26918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26919  if test "x$has_forbidden_chars" != x; then
26920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26921    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26922  fi
26923
26924
26925  windows_path="$new_path"
26926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26927    unix_path=`$CYGPATH -u "$windows_path"`
26928    new_path="$unix_path"
26929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26931    new_path="$unix_path"
26932  fi
26933
26934  if test "x$path" != "x$new_path"; then
26935    BOOT_JDK="$new_path"
26936    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26937$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26938  fi
26939
26940  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26941  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26942
26943    else
26944      # We're on a unix platform. Hooray! :)
26945      path="$BOOT_JDK"
26946      has_space=`$ECHO "$path" | $GREP " "`
26947      if test "x$has_space" != x; then
26948        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26949$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26950        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26951      fi
26952
26953      # Use eval to expand a potential ~
26954      eval path="$path"
26955      if test ! -f "$path" && test ! -d "$path"; then
26956        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26957      fi
26958
26959      if test -d "$path"; then
26960        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26961      else
26962        dir="`$DIRNAME "$path"`"
26963        base="`$BASENAME "$path"`"
26964        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26965      fi
26966    fi
26967  fi
26968
26969            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26970$as_echo_n "checking for Boot JDK... " >&6; }
26971            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26972$as_echo "$BOOT_JDK" >&6; }
26973            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26974$as_echo_n "checking Boot JDK version... " >&6; }
26975            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26976            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26977$as_echo "$BOOT_JDK_VERSION" >&6; }
26978          fi # end check jdk version
26979        fi # end check javac
26980      fi # end check java
26981    fi # end check boot jdk found
26982  fi
26983
26984
26985  if test "x$BOOT_JDK_FOUND" = xno; then
26986    # Now execute the test
26987
26988  if test "x$PROGRAMW6432" != x; then
26989    VIRTUAL_DIR="$PROGRAMW6432/Java"
26990
26991  windows_path="$VIRTUAL_DIR"
26992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26993    unix_path=`$CYGPATH -u "$windows_path"`
26994    VIRTUAL_DIR="$unix_path"
26995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26997    VIRTUAL_DIR="$unix_path"
26998  fi
26999
27000
27001  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27002  BOOT_JDK_SUFFIX=""
27003  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27004  if test "x$ALL_JDKS_FOUND" != x; then
27005    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27006
27007  if test "x$BOOT_JDK_FOUND" = xno; then
27008    # Now execute the test
27009
27010        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27011        if test -d "$BOOT_JDK"; then
27012          BOOT_JDK_FOUND=maybe
27013          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27014$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27015        fi
27016
27017
27018    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27019    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27020      # Do we have a bin/java?
27021      if test ! -x "$BOOT_JDK/bin/java"; then
27022        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27023$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27024        BOOT_JDK_FOUND=no
27025      else
27026        # Do we have a bin/javac?
27027        if test ! -x "$BOOT_JDK/bin/javac"; then
27028          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27029$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27030          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27031$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27032          BOOT_JDK_FOUND=no
27033        else
27034          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27035          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27036
27037          # Extra M4 quote needed to protect [] in grep expression.
27038          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27039          if test "x$FOUND_CORRECT_VERSION" = x; then
27040            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27041$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27042            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27043$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27044            BOOT_JDK_FOUND=no
27045          else
27046            # We're done! :-)
27047            BOOT_JDK_FOUND=yes
27048
27049  # Only process if variable expands to non-empty
27050
27051  if test "x$BOOT_JDK" != x; then
27052    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27053
27054  # Input might be given as Windows format, start by converting to
27055  # unix format.
27056  path="$BOOT_JDK"
27057  new_path=`$CYGPATH -u "$path"`
27058
27059  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27060  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27061  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27062  # "foo.exe" is OK but "foo" is an error.
27063  #
27064  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27065  # It is also a way to make sure we got the proper file name for the real test later on.
27066  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27067  if test "x$test_shortpath" = x; then
27068    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27069$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27070    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27071  fi
27072
27073  # Call helper function which possibly converts this using DOS-style short mode.
27074  # If so, the updated path is stored in $new_path.
27075
27076  input_path="$new_path"
27077  # Check if we need to convert this using DOS-style short mode. If the path
27078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27079  # take no chances and rewrite it.
27080  # Note: m4 eats our [], so we need to use [ and ] instead.
27081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27082  if test "x$has_forbidden_chars" != x; then
27083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27084    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27085    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27086    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27087      # Going to short mode and back again did indeed matter. Since short mode is
27088      # case insensitive, let's make it lowercase to improve readability.
27089      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27090      # Now convert it back to Unix-style (cygpath)
27091      input_path=`$CYGPATH -u "$shortmode_path"`
27092      new_path="$input_path"
27093    fi
27094  fi
27095
27096  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27097  if test "x$test_cygdrive_prefix" = x; then
27098    # As a simple fix, exclude /usr/bin since it's not a real path.
27099    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27100      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27101      # a path prefixed by /cygdrive for fixpath to work.
27102      new_path="$CYGWIN_ROOT_PATH$input_path"
27103    fi
27104  fi
27105
27106
27107  if test "x$path" != "x$new_path"; then
27108    BOOT_JDK="$new_path"
27109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27110$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27111  fi
27112
27113    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27114
27115  path="$BOOT_JDK"
27116  has_colon=`$ECHO $path | $GREP ^.:`
27117  new_path="$path"
27118  if test "x$has_colon" = x; then
27119    # Not in mixed or Windows style, start by that.
27120    new_path=`cmd //c echo $path`
27121  fi
27122
27123
27124  input_path="$new_path"
27125  # Check if we need to convert this using DOS-style short mode. If the path
27126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27127  # take no chances and rewrite it.
27128  # Note: m4 eats our [], so we need to use [ and ] instead.
27129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27130  if test "x$has_forbidden_chars" != x; then
27131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27132    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27133  fi
27134
27135
27136  windows_path="$new_path"
27137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27138    unix_path=`$CYGPATH -u "$windows_path"`
27139    new_path="$unix_path"
27140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27142    new_path="$unix_path"
27143  fi
27144
27145  if test "x$path" != "x$new_path"; then
27146    BOOT_JDK="$new_path"
27147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27148$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27149  fi
27150
27151  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27152  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27153
27154    else
27155      # We're on a unix platform. Hooray! :)
27156      path="$BOOT_JDK"
27157      has_space=`$ECHO "$path" | $GREP " "`
27158      if test "x$has_space" != x; then
27159        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27160$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27161        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27162      fi
27163
27164      # Use eval to expand a potential ~
27165      eval path="$path"
27166      if test ! -f "$path" && test ! -d "$path"; then
27167        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27168      fi
27169
27170      if test -d "$path"; then
27171        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27172      else
27173        dir="`$DIRNAME "$path"`"
27174        base="`$BASENAME "$path"`"
27175        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27176      fi
27177    fi
27178  fi
27179
27180            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27181$as_echo_n "checking for Boot JDK... " >&6; }
27182            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27183$as_echo "$BOOT_JDK" >&6; }
27184            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27185$as_echo_n "checking Boot JDK version... " >&6; }
27186            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27187            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27188$as_echo "$BOOT_JDK_VERSION" >&6; }
27189          fi # end check jdk version
27190        fi # end check javac
27191      fi # end check java
27192    fi # end check boot jdk found
27193  fi
27194
27195    done
27196  fi
27197
27198  fi
27199
27200
27201    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27202    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27203      # Do we have a bin/java?
27204      if test ! -x "$BOOT_JDK/bin/java"; then
27205        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27206$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27207        BOOT_JDK_FOUND=no
27208      else
27209        # Do we have a bin/javac?
27210        if test ! -x "$BOOT_JDK/bin/javac"; then
27211          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27212$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27213          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27214$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27215          BOOT_JDK_FOUND=no
27216        else
27217          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27218          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27219
27220          # Extra M4 quote needed to protect [] in grep expression.
27221          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27222          if test "x$FOUND_CORRECT_VERSION" = x; then
27223            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27225            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27226$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27227            BOOT_JDK_FOUND=no
27228          else
27229            # We're done! :-)
27230            BOOT_JDK_FOUND=yes
27231
27232  # Only process if variable expands to non-empty
27233
27234  if test "x$BOOT_JDK" != x; then
27235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27236
27237  # Input might be given as Windows format, start by converting to
27238  # unix format.
27239  path="$BOOT_JDK"
27240  new_path=`$CYGPATH -u "$path"`
27241
27242  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27243  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27244  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27245  # "foo.exe" is OK but "foo" is an error.
27246  #
27247  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27248  # It is also a way to make sure we got the proper file name for the real test later on.
27249  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27250  if test "x$test_shortpath" = x; then
27251    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27252$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27253    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27254  fi
27255
27256  # Call helper function which possibly converts this using DOS-style short mode.
27257  # If so, the updated path is stored in $new_path.
27258
27259  input_path="$new_path"
27260  # Check if we need to convert this using DOS-style short mode. If the path
27261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27262  # take no chances and rewrite it.
27263  # Note: m4 eats our [], so we need to use [ and ] instead.
27264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27265  if test "x$has_forbidden_chars" != x; then
27266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27267    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27268    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27269    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27270      # Going to short mode and back again did indeed matter. Since short mode is
27271      # case insensitive, let's make it lowercase to improve readability.
27272      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27273      # Now convert it back to Unix-style (cygpath)
27274      input_path=`$CYGPATH -u "$shortmode_path"`
27275      new_path="$input_path"
27276    fi
27277  fi
27278
27279  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27280  if test "x$test_cygdrive_prefix" = x; then
27281    # As a simple fix, exclude /usr/bin since it's not a real path.
27282    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27283      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27284      # a path prefixed by /cygdrive for fixpath to work.
27285      new_path="$CYGWIN_ROOT_PATH$input_path"
27286    fi
27287  fi
27288
27289
27290  if test "x$path" != "x$new_path"; then
27291    BOOT_JDK="$new_path"
27292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27293$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27294  fi
27295
27296    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27297
27298  path="$BOOT_JDK"
27299  has_colon=`$ECHO $path | $GREP ^.:`
27300  new_path="$path"
27301  if test "x$has_colon" = x; then
27302    # Not in mixed or Windows style, start by that.
27303    new_path=`cmd //c echo $path`
27304  fi
27305
27306
27307  input_path="$new_path"
27308  # Check if we need to convert this using DOS-style short mode. If the path
27309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27310  # take no chances and rewrite it.
27311  # Note: m4 eats our [], so we need to use [ and ] instead.
27312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27313  if test "x$has_forbidden_chars" != x; then
27314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27315    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27316  fi
27317
27318
27319  windows_path="$new_path"
27320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27321    unix_path=`$CYGPATH -u "$windows_path"`
27322    new_path="$unix_path"
27323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27325    new_path="$unix_path"
27326  fi
27327
27328  if test "x$path" != "x$new_path"; then
27329    BOOT_JDK="$new_path"
27330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27331$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27332  fi
27333
27334  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27335  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27336
27337    else
27338      # We're on a unix platform. Hooray! :)
27339      path="$BOOT_JDK"
27340      has_space=`$ECHO "$path" | $GREP " "`
27341      if test "x$has_space" != x; then
27342        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27343$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27344        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27345      fi
27346
27347      # Use eval to expand a potential ~
27348      eval path="$path"
27349      if test ! -f "$path" && test ! -d "$path"; then
27350        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27351      fi
27352
27353      if test -d "$path"; then
27354        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27355      else
27356        dir="`$DIRNAME "$path"`"
27357        base="`$BASENAME "$path"`"
27358        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27359      fi
27360    fi
27361  fi
27362
27363            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27364$as_echo_n "checking for Boot JDK... " >&6; }
27365            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27366$as_echo "$BOOT_JDK" >&6; }
27367            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27368$as_echo_n "checking Boot JDK version... " >&6; }
27369            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27370            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27371$as_echo "$BOOT_JDK_VERSION" >&6; }
27372          fi # end check jdk version
27373        fi # end check javac
27374      fi # end check java
27375    fi # end check boot jdk found
27376  fi
27377
27378
27379  if test "x$BOOT_JDK_FOUND" = xno; then
27380    # Now execute the test
27381
27382  if test "x$PROGRAMFILES" != x; then
27383    VIRTUAL_DIR="$PROGRAMFILES/Java"
27384
27385  windows_path="$VIRTUAL_DIR"
27386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27387    unix_path=`$CYGPATH -u "$windows_path"`
27388    VIRTUAL_DIR="$unix_path"
27389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27391    VIRTUAL_DIR="$unix_path"
27392  fi
27393
27394
27395  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27396  BOOT_JDK_SUFFIX=""
27397  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27398  if test "x$ALL_JDKS_FOUND" != x; then
27399    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27400
27401  if test "x$BOOT_JDK_FOUND" = xno; then
27402    # Now execute the test
27403
27404        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27405        if test -d "$BOOT_JDK"; then
27406          BOOT_JDK_FOUND=maybe
27407          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27408$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27409        fi
27410
27411
27412    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27413    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27414      # Do we have a bin/java?
27415      if test ! -x "$BOOT_JDK/bin/java"; then
27416        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27417$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27418        BOOT_JDK_FOUND=no
27419      else
27420        # Do we have a bin/javac?
27421        if test ! -x "$BOOT_JDK/bin/javac"; then
27422          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27423$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27424          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27425$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27426          BOOT_JDK_FOUND=no
27427        else
27428          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27429          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27430
27431          # Extra M4 quote needed to protect [] in grep expression.
27432          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27433          if test "x$FOUND_CORRECT_VERSION" = x; then
27434            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27435$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27436            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27437$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27438            BOOT_JDK_FOUND=no
27439          else
27440            # We're done! :-)
27441            BOOT_JDK_FOUND=yes
27442
27443  # Only process if variable expands to non-empty
27444
27445  if test "x$BOOT_JDK" != x; then
27446    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27447
27448  # Input might be given as Windows format, start by converting to
27449  # unix format.
27450  path="$BOOT_JDK"
27451  new_path=`$CYGPATH -u "$path"`
27452
27453  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27454  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27455  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27456  # "foo.exe" is OK but "foo" is an error.
27457  #
27458  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27459  # It is also a way to make sure we got the proper file name for the real test later on.
27460  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27461  if test "x$test_shortpath" = x; then
27462    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27463$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27464    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27465  fi
27466
27467  # Call helper function which possibly converts this using DOS-style short mode.
27468  # If so, the updated path is stored in $new_path.
27469
27470  input_path="$new_path"
27471  # Check if we need to convert this using DOS-style short mode. If the path
27472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27473  # take no chances and rewrite it.
27474  # Note: m4 eats our [], so we need to use [ and ] instead.
27475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27476  if test "x$has_forbidden_chars" != x; then
27477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27478    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27479    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27480    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27481      # Going to short mode and back again did indeed matter. Since short mode is
27482      # case insensitive, let's make it lowercase to improve readability.
27483      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27484      # Now convert it back to Unix-style (cygpath)
27485      input_path=`$CYGPATH -u "$shortmode_path"`
27486      new_path="$input_path"
27487    fi
27488  fi
27489
27490  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27491  if test "x$test_cygdrive_prefix" = x; then
27492    # As a simple fix, exclude /usr/bin since it's not a real path.
27493    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27494      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27495      # a path prefixed by /cygdrive for fixpath to work.
27496      new_path="$CYGWIN_ROOT_PATH$input_path"
27497    fi
27498  fi
27499
27500
27501  if test "x$path" != "x$new_path"; then
27502    BOOT_JDK="$new_path"
27503    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27504$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27505  fi
27506
27507    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27508
27509  path="$BOOT_JDK"
27510  has_colon=`$ECHO $path | $GREP ^.:`
27511  new_path="$path"
27512  if test "x$has_colon" = x; then
27513    # Not in mixed or Windows style, start by that.
27514    new_path=`cmd //c echo $path`
27515  fi
27516
27517
27518  input_path="$new_path"
27519  # Check if we need to convert this using DOS-style short mode. If the path
27520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27521  # take no chances and rewrite it.
27522  # Note: m4 eats our [], so we need to use [ and ] instead.
27523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27524  if test "x$has_forbidden_chars" != x; then
27525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27526    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27527  fi
27528
27529
27530  windows_path="$new_path"
27531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27532    unix_path=`$CYGPATH -u "$windows_path"`
27533    new_path="$unix_path"
27534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27536    new_path="$unix_path"
27537  fi
27538
27539  if test "x$path" != "x$new_path"; then
27540    BOOT_JDK="$new_path"
27541    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27542$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27543  fi
27544
27545  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27546  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27547
27548    else
27549      # We're on a unix platform. Hooray! :)
27550      path="$BOOT_JDK"
27551      has_space=`$ECHO "$path" | $GREP " "`
27552      if test "x$has_space" != x; then
27553        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27554$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27555        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27556      fi
27557
27558      # Use eval to expand a potential ~
27559      eval path="$path"
27560      if test ! -f "$path" && test ! -d "$path"; then
27561        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27562      fi
27563
27564      if test -d "$path"; then
27565        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27566      else
27567        dir="`$DIRNAME "$path"`"
27568        base="`$BASENAME "$path"`"
27569        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27570      fi
27571    fi
27572  fi
27573
27574            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27575$as_echo_n "checking for Boot JDK... " >&6; }
27576            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27577$as_echo "$BOOT_JDK" >&6; }
27578            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27579$as_echo_n "checking Boot JDK version... " >&6; }
27580            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27581            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27582$as_echo "$BOOT_JDK_VERSION" >&6; }
27583          fi # end check jdk version
27584        fi # end check javac
27585      fi # end check java
27586    fi # end check boot jdk found
27587  fi
27588
27589    done
27590  fi
27591
27592  fi
27593
27594
27595    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27596    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27597      # Do we have a bin/java?
27598      if test ! -x "$BOOT_JDK/bin/java"; then
27599        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27600$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27601        BOOT_JDK_FOUND=no
27602      else
27603        # Do we have a bin/javac?
27604        if test ! -x "$BOOT_JDK/bin/javac"; then
27605          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27607          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27608$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27609          BOOT_JDK_FOUND=no
27610        else
27611          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27612          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27613
27614          # Extra M4 quote needed to protect [] in grep expression.
27615          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27616          if test "x$FOUND_CORRECT_VERSION" = x; then
27617            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27618$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27619            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27620$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27621            BOOT_JDK_FOUND=no
27622          else
27623            # We're done! :-)
27624            BOOT_JDK_FOUND=yes
27625
27626  # Only process if variable expands to non-empty
27627
27628  if test "x$BOOT_JDK" != x; then
27629    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27630
27631  # Input might be given as Windows format, start by converting to
27632  # unix format.
27633  path="$BOOT_JDK"
27634  new_path=`$CYGPATH -u "$path"`
27635
27636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27639  # "foo.exe" is OK but "foo" is an error.
27640  #
27641  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27642  # It is also a way to make sure we got the proper file name for the real test later on.
27643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27644  if test "x$test_shortpath" = x; then
27645    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27646$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27647    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27648  fi
27649
27650  # Call helper function which possibly converts this using DOS-style short mode.
27651  # If so, the updated path is stored in $new_path.
27652
27653  input_path="$new_path"
27654  # Check if we need to convert this using DOS-style short mode. If the path
27655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27656  # take no chances and rewrite it.
27657  # Note: m4 eats our [], so we need to use [ and ] instead.
27658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27659  if test "x$has_forbidden_chars" != x; then
27660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27664      # Going to short mode and back again did indeed matter. Since short mode is
27665      # case insensitive, let's make it lowercase to improve readability.
27666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27667      # Now convert it back to Unix-style (cygpath)
27668      input_path=`$CYGPATH -u "$shortmode_path"`
27669      new_path="$input_path"
27670    fi
27671  fi
27672
27673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27674  if test "x$test_cygdrive_prefix" = x; then
27675    # As a simple fix, exclude /usr/bin since it's not a real path.
27676    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27678      # a path prefixed by /cygdrive for fixpath to work.
27679      new_path="$CYGWIN_ROOT_PATH$input_path"
27680    fi
27681  fi
27682
27683
27684  if test "x$path" != "x$new_path"; then
27685    BOOT_JDK="$new_path"
27686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27687$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27688  fi
27689
27690    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27691
27692  path="$BOOT_JDK"
27693  has_colon=`$ECHO $path | $GREP ^.:`
27694  new_path="$path"
27695  if test "x$has_colon" = x; then
27696    # Not in mixed or Windows style, start by that.
27697    new_path=`cmd //c echo $path`
27698  fi
27699
27700
27701  input_path="$new_path"
27702  # Check if we need to convert this using DOS-style short mode. If the path
27703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27704  # take no chances and rewrite it.
27705  # Note: m4 eats our [], so we need to use [ and ] instead.
27706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27707  if test "x$has_forbidden_chars" != x; then
27708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27709    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27710  fi
27711
27712
27713  windows_path="$new_path"
27714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27715    unix_path=`$CYGPATH -u "$windows_path"`
27716    new_path="$unix_path"
27717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27719    new_path="$unix_path"
27720  fi
27721
27722  if test "x$path" != "x$new_path"; then
27723    BOOT_JDK="$new_path"
27724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27725$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27726  fi
27727
27728  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27729  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27730
27731    else
27732      # We're on a unix platform. Hooray! :)
27733      path="$BOOT_JDK"
27734      has_space=`$ECHO "$path" | $GREP " "`
27735      if test "x$has_space" != x; then
27736        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27737$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27738        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27739      fi
27740
27741      # Use eval to expand a potential ~
27742      eval path="$path"
27743      if test ! -f "$path" && test ! -d "$path"; then
27744        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27745      fi
27746
27747      if test -d "$path"; then
27748        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27749      else
27750        dir="`$DIRNAME "$path"`"
27751        base="`$BASENAME "$path"`"
27752        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27753      fi
27754    fi
27755  fi
27756
27757            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27758$as_echo_n "checking for Boot JDK... " >&6; }
27759            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27760$as_echo "$BOOT_JDK" >&6; }
27761            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27762$as_echo_n "checking Boot JDK version... " >&6; }
27763            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27764            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27765$as_echo "$BOOT_JDK_VERSION" >&6; }
27766          fi # end check jdk version
27767        fi # end check javac
27768      fi # end check java
27769    fi # end check boot jdk found
27770  fi
27771
27772
27773  if test "x$BOOT_JDK_FOUND" = xno; then
27774    # Now execute the test
27775
27776  if test "x$ProgramFiles" != x; then
27777    VIRTUAL_DIR="$ProgramFiles/Java"
27778
27779  windows_path="$VIRTUAL_DIR"
27780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27781    unix_path=`$CYGPATH -u "$windows_path"`
27782    VIRTUAL_DIR="$unix_path"
27783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27785    VIRTUAL_DIR="$unix_path"
27786  fi
27787
27788
27789  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27790  BOOT_JDK_SUFFIX=""
27791  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27792  if test "x$ALL_JDKS_FOUND" != x; then
27793    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27794
27795  if test "x$BOOT_JDK_FOUND" = xno; then
27796    # Now execute the test
27797
27798        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27799        if test -d "$BOOT_JDK"; then
27800          BOOT_JDK_FOUND=maybe
27801          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27802$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27803        fi
27804
27805
27806    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27807    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27808      # Do we have a bin/java?
27809      if test ! -x "$BOOT_JDK/bin/java"; then
27810        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27812        BOOT_JDK_FOUND=no
27813      else
27814        # Do we have a bin/javac?
27815        if test ! -x "$BOOT_JDK/bin/javac"; then
27816          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27817$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27818          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27819$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27820          BOOT_JDK_FOUND=no
27821        else
27822          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27823          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27824
27825          # Extra M4 quote needed to protect [] in grep expression.
27826          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27827          if test "x$FOUND_CORRECT_VERSION" = x; then
27828            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27829$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27830            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27831$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27832            BOOT_JDK_FOUND=no
27833          else
27834            # We're done! :-)
27835            BOOT_JDK_FOUND=yes
27836
27837  # Only process if variable expands to non-empty
27838
27839  if test "x$BOOT_JDK" != x; then
27840    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27841
27842  # Input might be given as Windows format, start by converting to
27843  # unix format.
27844  path="$BOOT_JDK"
27845  new_path=`$CYGPATH -u "$path"`
27846
27847  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27848  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27849  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27850  # "foo.exe" is OK but "foo" is an error.
27851  #
27852  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27853  # It is also a way to make sure we got the proper file name for the real test later on.
27854  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27855  if test "x$test_shortpath" = x; then
27856    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27857$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27858    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27859  fi
27860
27861  # Call helper function which possibly converts this using DOS-style short mode.
27862  # If so, the updated path is stored in $new_path.
27863
27864  input_path="$new_path"
27865  # Check if we need to convert this using DOS-style short mode. If the path
27866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27867  # take no chances and rewrite it.
27868  # Note: m4 eats our [], so we need to use [ and ] instead.
27869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27870  if test "x$has_forbidden_chars" != x; then
27871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27872    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27873    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27874    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27875      # Going to short mode and back again did indeed matter. Since short mode is
27876      # case insensitive, let's make it lowercase to improve readability.
27877      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27878      # Now convert it back to Unix-style (cygpath)
27879      input_path=`$CYGPATH -u "$shortmode_path"`
27880      new_path="$input_path"
27881    fi
27882  fi
27883
27884  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27885  if test "x$test_cygdrive_prefix" = x; then
27886    # As a simple fix, exclude /usr/bin since it's not a real path.
27887    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27888      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27889      # a path prefixed by /cygdrive for fixpath to work.
27890      new_path="$CYGWIN_ROOT_PATH$input_path"
27891    fi
27892  fi
27893
27894
27895  if test "x$path" != "x$new_path"; then
27896    BOOT_JDK="$new_path"
27897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27898$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27899  fi
27900
27901    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27902
27903  path="$BOOT_JDK"
27904  has_colon=`$ECHO $path | $GREP ^.:`
27905  new_path="$path"
27906  if test "x$has_colon" = x; then
27907    # Not in mixed or Windows style, start by that.
27908    new_path=`cmd //c echo $path`
27909  fi
27910
27911
27912  input_path="$new_path"
27913  # Check if we need to convert this using DOS-style short mode. If the path
27914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27915  # take no chances and rewrite it.
27916  # Note: m4 eats our [], so we need to use [ and ] instead.
27917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27918  if test "x$has_forbidden_chars" != x; then
27919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27920    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27921  fi
27922
27923
27924  windows_path="$new_path"
27925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27926    unix_path=`$CYGPATH -u "$windows_path"`
27927    new_path="$unix_path"
27928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27930    new_path="$unix_path"
27931  fi
27932
27933  if test "x$path" != "x$new_path"; then
27934    BOOT_JDK="$new_path"
27935    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27936$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27937  fi
27938
27939  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27940  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27941
27942    else
27943      # We're on a unix platform. Hooray! :)
27944      path="$BOOT_JDK"
27945      has_space=`$ECHO "$path" | $GREP " "`
27946      if test "x$has_space" != x; then
27947        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27948$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27949        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27950      fi
27951
27952      # Use eval to expand a potential ~
27953      eval path="$path"
27954      if test ! -f "$path" && test ! -d "$path"; then
27955        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27956      fi
27957
27958      if test -d "$path"; then
27959        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27960      else
27961        dir="`$DIRNAME "$path"`"
27962        base="`$BASENAME "$path"`"
27963        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27964      fi
27965    fi
27966  fi
27967
27968            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27969$as_echo_n "checking for Boot JDK... " >&6; }
27970            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27971$as_echo "$BOOT_JDK" >&6; }
27972            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27973$as_echo_n "checking Boot JDK version... " >&6; }
27974            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27975            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27976$as_echo "$BOOT_JDK_VERSION" >&6; }
27977          fi # end check jdk version
27978        fi # end check javac
27979      fi # end check java
27980    fi # end check boot jdk found
27981  fi
27982
27983    done
27984  fi
27985
27986  fi
27987
27988
27989    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27990    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27991      # Do we have a bin/java?
27992      if test ! -x "$BOOT_JDK/bin/java"; then
27993        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27995        BOOT_JDK_FOUND=no
27996      else
27997        # Do we have a bin/javac?
27998        if test ! -x "$BOOT_JDK/bin/javac"; then
27999          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28000$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28001          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28002$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28003          BOOT_JDK_FOUND=no
28004        else
28005          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28006          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28007
28008          # Extra M4 quote needed to protect [] in grep expression.
28009          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28010          if test "x$FOUND_CORRECT_VERSION" = x; then
28011            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28013            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28014$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28015            BOOT_JDK_FOUND=no
28016          else
28017            # We're done! :-)
28018            BOOT_JDK_FOUND=yes
28019
28020  # Only process if variable expands to non-empty
28021
28022  if test "x$BOOT_JDK" != x; then
28023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28024
28025  # Input might be given as Windows format, start by converting to
28026  # unix format.
28027  path="$BOOT_JDK"
28028  new_path=`$CYGPATH -u "$path"`
28029
28030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28033  # "foo.exe" is OK but "foo" is an error.
28034  #
28035  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28036  # It is also a way to make sure we got the proper file name for the real test later on.
28037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28038  if test "x$test_shortpath" = x; then
28039    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28040$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28041    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28042  fi
28043
28044  # Call helper function which possibly converts this using DOS-style short mode.
28045  # If so, the updated path is stored in $new_path.
28046
28047  input_path="$new_path"
28048  # Check if we need to convert this using DOS-style short mode. If the path
28049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28050  # take no chances and rewrite it.
28051  # Note: m4 eats our [], so we need to use [ and ] instead.
28052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28053  if test "x$has_forbidden_chars" != x; then
28054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28058      # Going to short mode and back again did indeed matter. Since short mode is
28059      # case insensitive, let's make it lowercase to improve readability.
28060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28061      # Now convert it back to Unix-style (cygpath)
28062      input_path=`$CYGPATH -u "$shortmode_path"`
28063      new_path="$input_path"
28064    fi
28065  fi
28066
28067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28068  if test "x$test_cygdrive_prefix" = x; then
28069    # As a simple fix, exclude /usr/bin since it's not a real path.
28070    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28072      # a path prefixed by /cygdrive for fixpath to work.
28073      new_path="$CYGWIN_ROOT_PATH$input_path"
28074    fi
28075  fi
28076
28077
28078  if test "x$path" != "x$new_path"; then
28079    BOOT_JDK="$new_path"
28080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28081$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28082  fi
28083
28084    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28085
28086  path="$BOOT_JDK"
28087  has_colon=`$ECHO $path | $GREP ^.:`
28088  new_path="$path"
28089  if test "x$has_colon" = x; then
28090    # Not in mixed or Windows style, start by that.
28091    new_path=`cmd //c echo $path`
28092  fi
28093
28094
28095  input_path="$new_path"
28096  # Check if we need to convert this using DOS-style short mode. If the path
28097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28098  # take no chances and rewrite it.
28099  # Note: m4 eats our [], so we need to use [ and ] instead.
28100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28101  if test "x$has_forbidden_chars" != x; then
28102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28103    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28104  fi
28105
28106
28107  windows_path="$new_path"
28108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28109    unix_path=`$CYGPATH -u "$windows_path"`
28110    new_path="$unix_path"
28111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28113    new_path="$unix_path"
28114  fi
28115
28116  if test "x$path" != "x$new_path"; then
28117    BOOT_JDK="$new_path"
28118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28119$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28120  fi
28121
28122  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28123  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28124
28125    else
28126      # We're on a unix platform. Hooray! :)
28127      path="$BOOT_JDK"
28128      has_space=`$ECHO "$path" | $GREP " "`
28129      if test "x$has_space" != x; then
28130        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28131$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28132        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28133      fi
28134
28135      # Use eval to expand a potential ~
28136      eval path="$path"
28137      if test ! -f "$path" && test ! -d "$path"; then
28138        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28139      fi
28140
28141      if test -d "$path"; then
28142        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28143      else
28144        dir="`$DIRNAME "$path"`"
28145        base="`$BASENAME "$path"`"
28146        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28147      fi
28148    fi
28149  fi
28150
28151            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28152$as_echo_n "checking for Boot JDK... " >&6; }
28153            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28154$as_echo "$BOOT_JDK" >&6; }
28155            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28156$as_echo_n "checking Boot JDK version... " >&6; }
28157            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28159$as_echo "$BOOT_JDK_VERSION" >&6; }
28160          fi # end check jdk version
28161        fi # end check javac
28162      fi # end check java
28163    fi # end check boot jdk found
28164  fi
28165
28166
28167  if test "x$BOOT_JDK_FOUND" = xno; then
28168    # Now execute the test
28169
28170  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28171  BOOT_JDK_SUFFIX=""
28172  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28173  if test "x$ALL_JDKS_FOUND" != x; then
28174    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28175
28176  if test "x$BOOT_JDK_FOUND" = xno; then
28177    # Now execute the test
28178
28179        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28180        if test -d "$BOOT_JDK"; then
28181          BOOT_JDK_FOUND=maybe
28182          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28183$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28184        fi
28185
28186
28187    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28188    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28189      # Do we have a bin/java?
28190      if test ! -x "$BOOT_JDK/bin/java"; then
28191        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28193        BOOT_JDK_FOUND=no
28194      else
28195        # Do we have a bin/javac?
28196        if test ! -x "$BOOT_JDK/bin/javac"; then
28197          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28198$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28199          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28200$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28201          BOOT_JDK_FOUND=no
28202        else
28203          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28204          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28205
28206          # Extra M4 quote needed to protect [] in grep expression.
28207          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28208          if test "x$FOUND_CORRECT_VERSION" = x; then
28209            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28210$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28211            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28212$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28213            BOOT_JDK_FOUND=no
28214          else
28215            # We're done! :-)
28216            BOOT_JDK_FOUND=yes
28217
28218  # Only process if variable expands to non-empty
28219
28220  if test "x$BOOT_JDK" != x; then
28221    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28222
28223  # Input might be given as Windows format, start by converting to
28224  # unix format.
28225  path="$BOOT_JDK"
28226  new_path=`$CYGPATH -u "$path"`
28227
28228  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28229  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28230  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28231  # "foo.exe" is OK but "foo" is an error.
28232  #
28233  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28234  # It is also a way to make sure we got the proper file name for the real test later on.
28235  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28236  if test "x$test_shortpath" = x; then
28237    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28238$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28239    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28240  fi
28241
28242  # Call helper function which possibly converts this using DOS-style short mode.
28243  # If so, the updated path is stored in $new_path.
28244
28245  input_path="$new_path"
28246  # Check if we need to convert this using DOS-style short mode. If the path
28247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28248  # take no chances and rewrite it.
28249  # Note: m4 eats our [], so we need to use [ and ] instead.
28250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28251  if test "x$has_forbidden_chars" != x; then
28252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28253    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28254    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28255    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28256      # Going to short mode and back again did indeed matter. Since short mode is
28257      # case insensitive, let's make it lowercase to improve readability.
28258      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28259      # Now convert it back to Unix-style (cygpath)
28260      input_path=`$CYGPATH -u "$shortmode_path"`
28261      new_path="$input_path"
28262    fi
28263  fi
28264
28265  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28266  if test "x$test_cygdrive_prefix" = x; then
28267    # As a simple fix, exclude /usr/bin since it's not a real path.
28268    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28269      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28270      # a path prefixed by /cygdrive for fixpath to work.
28271      new_path="$CYGWIN_ROOT_PATH$input_path"
28272    fi
28273  fi
28274
28275
28276  if test "x$path" != "x$new_path"; then
28277    BOOT_JDK="$new_path"
28278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28279$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28280  fi
28281
28282    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28283
28284  path="$BOOT_JDK"
28285  has_colon=`$ECHO $path | $GREP ^.:`
28286  new_path="$path"
28287  if test "x$has_colon" = x; then
28288    # Not in mixed or Windows style, start by that.
28289    new_path=`cmd //c echo $path`
28290  fi
28291
28292
28293  input_path="$new_path"
28294  # Check if we need to convert this using DOS-style short mode. If the path
28295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28296  # take no chances and rewrite it.
28297  # Note: m4 eats our [], so we need to use [ and ] instead.
28298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28299  if test "x$has_forbidden_chars" != x; then
28300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28301    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28302  fi
28303
28304
28305  windows_path="$new_path"
28306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28307    unix_path=`$CYGPATH -u "$windows_path"`
28308    new_path="$unix_path"
28309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28311    new_path="$unix_path"
28312  fi
28313
28314  if test "x$path" != "x$new_path"; then
28315    BOOT_JDK="$new_path"
28316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28317$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28318  fi
28319
28320  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28321  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28322
28323    else
28324      # We're on a unix platform. Hooray! :)
28325      path="$BOOT_JDK"
28326      has_space=`$ECHO "$path" | $GREP " "`
28327      if test "x$has_space" != x; then
28328        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28329$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28330        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28331      fi
28332
28333      # Use eval to expand a potential ~
28334      eval path="$path"
28335      if test ! -f "$path" && test ! -d "$path"; then
28336        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28337      fi
28338
28339      if test -d "$path"; then
28340        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28341      else
28342        dir="`$DIRNAME "$path"`"
28343        base="`$BASENAME "$path"`"
28344        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28345      fi
28346    fi
28347  fi
28348
28349            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28350$as_echo_n "checking for Boot JDK... " >&6; }
28351            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28352$as_echo "$BOOT_JDK" >&6; }
28353            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28354$as_echo_n "checking Boot JDK version... " >&6; }
28355            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28357$as_echo "$BOOT_JDK_VERSION" >&6; }
28358          fi # end check jdk version
28359        fi # end check javac
28360      fi # end check java
28361    fi # end check boot jdk found
28362  fi
28363
28364    done
28365  fi
28366
28367
28368    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28369    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28370      # Do we have a bin/java?
28371      if test ! -x "$BOOT_JDK/bin/java"; then
28372        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28374        BOOT_JDK_FOUND=no
28375      else
28376        # Do we have a bin/javac?
28377        if test ! -x "$BOOT_JDK/bin/javac"; then
28378          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28379$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28380          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28381$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28382          BOOT_JDK_FOUND=no
28383        else
28384          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28385          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28386
28387          # Extra M4 quote needed to protect [] in grep expression.
28388          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28389          if test "x$FOUND_CORRECT_VERSION" = x; then
28390            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28392            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28393$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28394            BOOT_JDK_FOUND=no
28395          else
28396            # We're done! :-)
28397            BOOT_JDK_FOUND=yes
28398
28399  # Only process if variable expands to non-empty
28400
28401  if test "x$BOOT_JDK" != x; then
28402    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28403
28404  # Input might be given as Windows format, start by converting to
28405  # unix format.
28406  path="$BOOT_JDK"
28407  new_path=`$CYGPATH -u "$path"`
28408
28409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28412  # "foo.exe" is OK but "foo" is an error.
28413  #
28414  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28415  # It is also a way to make sure we got the proper file name for the real test later on.
28416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28417  if test "x$test_shortpath" = x; then
28418    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28419$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28420    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28421  fi
28422
28423  # Call helper function which possibly converts this using DOS-style short mode.
28424  # If so, the updated path is stored in $new_path.
28425
28426  input_path="$new_path"
28427  # Check if we need to convert this using DOS-style short mode. If the path
28428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28429  # take no chances and rewrite it.
28430  # Note: m4 eats our [], so we need to use [ and ] instead.
28431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28432  if test "x$has_forbidden_chars" != x; then
28433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28434    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28435    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28436    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28437      # Going to short mode and back again did indeed matter. Since short mode is
28438      # case insensitive, let's make it lowercase to improve readability.
28439      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28440      # Now convert it back to Unix-style (cygpath)
28441      input_path=`$CYGPATH -u "$shortmode_path"`
28442      new_path="$input_path"
28443    fi
28444  fi
28445
28446  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28447  if test "x$test_cygdrive_prefix" = x; then
28448    # As a simple fix, exclude /usr/bin since it's not a real path.
28449    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28450      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28451      # a path prefixed by /cygdrive for fixpath to work.
28452      new_path="$CYGWIN_ROOT_PATH$input_path"
28453    fi
28454  fi
28455
28456
28457  if test "x$path" != "x$new_path"; then
28458    BOOT_JDK="$new_path"
28459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28460$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28461  fi
28462
28463    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28464
28465  path="$BOOT_JDK"
28466  has_colon=`$ECHO $path | $GREP ^.:`
28467  new_path="$path"
28468  if test "x$has_colon" = x; then
28469    # Not in mixed or Windows style, start by that.
28470    new_path=`cmd //c echo $path`
28471  fi
28472
28473
28474  input_path="$new_path"
28475  # Check if we need to convert this using DOS-style short mode. If the path
28476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28477  # take no chances and rewrite it.
28478  # Note: m4 eats our [], so we need to use [ and ] instead.
28479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28480  if test "x$has_forbidden_chars" != x; then
28481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28483  fi
28484
28485
28486  windows_path="$new_path"
28487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28488    unix_path=`$CYGPATH -u "$windows_path"`
28489    new_path="$unix_path"
28490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28492    new_path="$unix_path"
28493  fi
28494
28495  if test "x$path" != "x$new_path"; then
28496    BOOT_JDK="$new_path"
28497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28498$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28499  fi
28500
28501  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28502  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28503
28504    else
28505      # We're on a unix platform. Hooray! :)
28506      path="$BOOT_JDK"
28507      has_space=`$ECHO "$path" | $GREP " "`
28508      if test "x$has_space" != x; then
28509        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28510$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28511        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28512      fi
28513
28514      # Use eval to expand a potential ~
28515      eval path="$path"
28516      if test ! -f "$path" && test ! -d "$path"; then
28517        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28518      fi
28519
28520      if test -d "$path"; then
28521        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28522      else
28523        dir="`$DIRNAME "$path"`"
28524        base="`$BASENAME "$path"`"
28525        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28526      fi
28527    fi
28528  fi
28529
28530            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28531$as_echo_n "checking for Boot JDK... " >&6; }
28532            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28533$as_echo "$BOOT_JDK" >&6; }
28534            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28535$as_echo_n "checking Boot JDK version... " >&6; }
28536            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28538$as_echo "$BOOT_JDK_VERSION" >&6; }
28539          fi # end check jdk version
28540        fi # end check javac
28541      fi # end check java
28542    fi # end check boot jdk found
28543  fi
28544
28545  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28546
28547  if test "x$BOOT_JDK_FOUND" = xno; then
28548    # Now execute the test
28549
28550  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28551  BOOT_JDK_SUFFIX="/Contents/Home"
28552  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28553  if test "x$ALL_JDKS_FOUND" != x; then
28554    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28555
28556  if test "x$BOOT_JDK_FOUND" = xno; then
28557    # Now execute the test
28558
28559        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28560        if test -d "$BOOT_JDK"; then
28561          BOOT_JDK_FOUND=maybe
28562          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28563$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28564        fi
28565
28566
28567    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28568    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28569      # Do we have a bin/java?
28570      if test ! -x "$BOOT_JDK/bin/java"; then
28571        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28573        BOOT_JDK_FOUND=no
28574      else
28575        # Do we have a bin/javac?
28576        if test ! -x "$BOOT_JDK/bin/javac"; then
28577          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28578$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28579          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28580$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28581          BOOT_JDK_FOUND=no
28582        else
28583          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28584          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28585
28586          # Extra M4 quote needed to protect [] in grep expression.
28587          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28588          if test "x$FOUND_CORRECT_VERSION" = x; then
28589            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28590$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28591            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28592$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28593            BOOT_JDK_FOUND=no
28594          else
28595            # We're done! :-)
28596            BOOT_JDK_FOUND=yes
28597
28598  # Only process if variable expands to non-empty
28599
28600  if test "x$BOOT_JDK" != x; then
28601    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28602
28603  # Input might be given as Windows format, start by converting to
28604  # unix format.
28605  path="$BOOT_JDK"
28606  new_path=`$CYGPATH -u "$path"`
28607
28608  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28609  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28610  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28611  # "foo.exe" is OK but "foo" is an error.
28612  #
28613  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28614  # It is also a way to make sure we got the proper file name for the real test later on.
28615  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28616  if test "x$test_shortpath" = x; then
28617    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28618$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28619    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28620  fi
28621
28622  # Call helper function which possibly converts this using DOS-style short mode.
28623  # If so, the updated path is stored in $new_path.
28624
28625  input_path="$new_path"
28626  # Check if we need to convert this using DOS-style short mode. If the path
28627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28628  # take no chances and rewrite it.
28629  # Note: m4 eats our [], so we need to use [ and ] instead.
28630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28631  if test "x$has_forbidden_chars" != x; then
28632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28633    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28634    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28635    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28636      # Going to short mode and back again did indeed matter. Since short mode is
28637      # case insensitive, let's make it lowercase to improve readability.
28638      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28639      # Now convert it back to Unix-style (cygpath)
28640      input_path=`$CYGPATH -u "$shortmode_path"`
28641      new_path="$input_path"
28642    fi
28643  fi
28644
28645  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28646  if test "x$test_cygdrive_prefix" = x; then
28647    # As a simple fix, exclude /usr/bin since it's not a real path.
28648    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28649      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28650      # a path prefixed by /cygdrive for fixpath to work.
28651      new_path="$CYGWIN_ROOT_PATH$input_path"
28652    fi
28653  fi
28654
28655
28656  if test "x$path" != "x$new_path"; then
28657    BOOT_JDK="$new_path"
28658    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28659$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28660  fi
28661
28662    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28663
28664  path="$BOOT_JDK"
28665  has_colon=`$ECHO $path | $GREP ^.:`
28666  new_path="$path"
28667  if test "x$has_colon" = x; then
28668    # Not in mixed or Windows style, start by that.
28669    new_path=`cmd //c echo $path`
28670  fi
28671
28672
28673  input_path="$new_path"
28674  # Check if we need to convert this using DOS-style short mode. If the path
28675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28676  # take no chances and rewrite it.
28677  # Note: m4 eats our [], so we need to use [ and ] instead.
28678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28679  if test "x$has_forbidden_chars" != x; then
28680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28681    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28682  fi
28683
28684
28685  windows_path="$new_path"
28686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28687    unix_path=`$CYGPATH -u "$windows_path"`
28688    new_path="$unix_path"
28689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28691    new_path="$unix_path"
28692  fi
28693
28694  if test "x$path" != "x$new_path"; then
28695    BOOT_JDK="$new_path"
28696    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28697$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28698  fi
28699
28700  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28701  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28702
28703    else
28704      # We're on a unix platform. Hooray! :)
28705      path="$BOOT_JDK"
28706      has_space=`$ECHO "$path" | $GREP " "`
28707      if test "x$has_space" != x; then
28708        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28709$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28710        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28711      fi
28712
28713      # Use eval to expand a potential ~
28714      eval path="$path"
28715      if test ! -f "$path" && test ! -d "$path"; then
28716        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28717      fi
28718
28719      if test -d "$path"; then
28720        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28721      else
28722        dir="`$DIRNAME "$path"`"
28723        base="`$BASENAME "$path"`"
28724        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28725      fi
28726    fi
28727  fi
28728
28729            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28730$as_echo_n "checking for Boot JDK... " >&6; }
28731            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28732$as_echo "$BOOT_JDK" >&6; }
28733            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28734$as_echo_n "checking Boot JDK version... " >&6; }
28735            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28736            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28737$as_echo "$BOOT_JDK_VERSION" >&6; }
28738          fi # end check jdk version
28739        fi # end check javac
28740      fi # end check java
28741    fi # end check boot jdk found
28742  fi
28743
28744    done
28745  fi
28746
28747
28748    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28749    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28750      # Do we have a bin/java?
28751      if test ! -x "$BOOT_JDK/bin/java"; then
28752        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28753$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28754        BOOT_JDK_FOUND=no
28755      else
28756        # Do we have a bin/javac?
28757        if test ! -x "$BOOT_JDK/bin/javac"; then
28758          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28760          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28761$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28762          BOOT_JDK_FOUND=no
28763        else
28764          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28765          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28766
28767          # Extra M4 quote needed to protect [] in grep expression.
28768          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28769          if test "x$FOUND_CORRECT_VERSION" = x; then
28770            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28772            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28773$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28774            BOOT_JDK_FOUND=no
28775          else
28776            # We're done! :-)
28777            BOOT_JDK_FOUND=yes
28778
28779  # Only process if variable expands to non-empty
28780
28781  if test "x$BOOT_JDK" != x; then
28782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28783
28784  # Input might be given as Windows format, start by converting to
28785  # unix format.
28786  path="$BOOT_JDK"
28787  new_path=`$CYGPATH -u "$path"`
28788
28789  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28790  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28791  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28792  # "foo.exe" is OK but "foo" is an error.
28793  #
28794  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28795  # It is also a way to make sure we got the proper file name for the real test later on.
28796  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28797  if test "x$test_shortpath" = x; then
28798    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28799$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28800    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28801  fi
28802
28803  # Call helper function which possibly converts this using DOS-style short mode.
28804  # If so, the updated path is stored in $new_path.
28805
28806  input_path="$new_path"
28807  # Check if we need to convert this using DOS-style short mode. If the path
28808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28809  # take no chances and rewrite it.
28810  # Note: m4 eats our [], so we need to use [ and ] instead.
28811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28812  if test "x$has_forbidden_chars" != x; then
28813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28817      # Going to short mode and back again did indeed matter. Since short mode is
28818      # case insensitive, let's make it lowercase to improve readability.
28819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28820      # Now convert it back to Unix-style (cygpath)
28821      input_path=`$CYGPATH -u "$shortmode_path"`
28822      new_path="$input_path"
28823    fi
28824  fi
28825
28826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28827  if test "x$test_cygdrive_prefix" = x; then
28828    # As a simple fix, exclude /usr/bin since it's not a real path.
28829    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28831      # a path prefixed by /cygdrive for fixpath to work.
28832      new_path="$CYGWIN_ROOT_PATH$input_path"
28833    fi
28834  fi
28835
28836
28837  if test "x$path" != "x$new_path"; then
28838    BOOT_JDK="$new_path"
28839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28840$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28841  fi
28842
28843    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28844
28845  path="$BOOT_JDK"
28846  has_colon=`$ECHO $path | $GREP ^.:`
28847  new_path="$path"
28848  if test "x$has_colon" = x; then
28849    # Not in mixed or Windows style, start by that.
28850    new_path=`cmd //c echo $path`
28851  fi
28852
28853
28854  input_path="$new_path"
28855  # Check if we need to convert this using DOS-style short mode. If the path
28856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28857  # take no chances and rewrite it.
28858  # Note: m4 eats our [], so we need to use [ and ] instead.
28859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28860  if test "x$has_forbidden_chars" != x; then
28861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28863  fi
28864
28865
28866  windows_path="$new_path"
28867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28868    unix_path=`$CYGPATH -u "$windows_path"`
28869    new_path="$unix_path"
28870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28872    new_path="$unix_path"
28873  fi
28874
28875  if test "x$path" != "x$new_path"; then
28876    BOOT_JDK="$new_path"
28877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28878$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28879  fi
28880
28881  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28882  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28883
28884    else
28885      # We're on a unix platform. Hooray! :)
28886      path="$BOOT_JDK"
28887      has_space=`$ECHO "$path" | $GREP " "`
28888      if test "x$has_space" != x; then
28889        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28890$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28891        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28892      fi
28893
28894      # Use eval to expand a potential ~
28895      eval path="$path"
28896      if test ! -f "$path" && test ! -d "$path"; then
28897        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28898      fi
28899
28900      if test -d "$path"; then
28901        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28902      else
28903        dir="`$DIRNAME "$path"`"
28904        base="`$BASENAME "$path"`"
28905        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28906      fi
28907    fi
28908  fi
28909
28910            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28911$as_echo_n "checking for Boot JDK... " >&6; }
28912            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28913$as_echo "$BOOT_JDK" >&6; }
28914            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28915$as_echo_n "checking Boot JDK version... " >&6; }
28916            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28917            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28918$as_echo "$BOOT_JDK_VERSION" >&6; }
28919          fi # end check jdk version
28920        fi # end check javac
28921      fi # end check java
28922    fi # end check boot jdk found
28923  fi
28924
28925
28926  if test "x$BOOT_JDK_FOUND" = xno; then
28927    # Now execute the test
28928
28929  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28930  BOOT_JDK_SUFFIX="/Contents/Home"
28931  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28932  if test "x$ALL_JDKS_FOUND" != x; then
28933    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28934
28935  if test "x$BOOT_JDK_FOUND" = xno; then
28936    # Now execute the test
28937
28938        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28939        if test -d "$BOOT_JDK"; then
28940          BOOT_JDK_FOUND=maybe
28941          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28942$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28943        fi
28944
28945
28946    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28947    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28948      # Do we have a bin/java?
28949      if test ! -x "$BOOT_JDK/bin/java"; then
28950        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28951$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28952        BOOT_JDK_FOUND=no
28953      else
28954        # Do we have a bin/javac?
28955        if test ! -x "$BOOT_JDK/bin/javac"; then
28956          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28957$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28958          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28959$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28960          BOOT_JDK_FOUND=no
28961        else
28962          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28963          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28964
28965          # Extra M4 quote needed to protect [] in grep expression.
28966          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28967          if test "x$FOUND_CORRECT_VERSION" = x; then
28968            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28969$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28970            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28971$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28972            BOOT_JDK_FOUND=no
28973          else
28974            # We're done! :-)
28975            BOOT_JDK_FOUND=yes
28976
28977  # Only process if variable expands to non-empty
28978
28979  if test "x$BOOT_JDK" != x; then
28980    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28981
28982  # Input might be given as Windows format, start by converting to
28983  # unix format.
28984  path="$BOOT_JDK"
28985  new_path=`$CYGPATH -u "$path"`
28986
28987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28990  # "foo.exe" is OK but "foo" is an error.
28991  #
28992  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28993  # It is also a way to make sure we got the proper file name for the real test later on.
28994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28995  if test "x$test_shortpath" = x; then
28996    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28997$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28998    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28999  fi
29000
29001  # Call helper function which possibly converts this using DOS-style short mode.
29002  # If so, the updated path is stored in $new_path.
29003
29004  input_path="$new_path"
29005  # Check if we need to convert this using DOS-style short mode. If the path
29006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29007  # take no chances and rewrite it.
29008  # Note: m4 eats our [], so we need to use [ and ] instead.
29009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29010  if test "x$has_forbidden_chars" != x; then
29011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29012    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29013    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29014    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29015      # Going to short mode and back again did indeed matter. Since short mode is
29016      # case insensitive, let's make it lowercase to improve readability.
29017      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29018      # Now convert it back to Unix-style (cygpath)
29019      input_path=`$CYGPATH -u "$shortmode_path"`
29020      new_path="$input_path"
29021    fi
29022  fi
29023
29024  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29025  if test "x$test_cygdrive_prefix" = x; then
29026    # As a simple fix, exclude /usr/bin since it's not a real path.
29027    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29028      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29029      # a path prefixed by /cygdrive for fixpath to work.
29030      new_path="$CYGWIN_ROOT_PATH$input_path"
29031    fi
29032  fi
29033
29034
29035  if test "x$path" != "x$new_path"; then
29036    BOOT_JDK="$new_path"
29037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29038$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29039  fi
29040
29041    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29042
29043  path="$BOOT_JDK"
29044  has_colon=`$ECHO $path | $GREP ^.:`
29045  new_path="$path"
29046  if test "x$has_colon" = x; then
29047    # Not in mixed or Windows style, start by that.
29048    new_path=`cmd //c echo $path`
29049  fi
29050
29051
29052  input_path="$new_path"
29053  # Check if we need to convert this using DOS-style short mode. If the path
29054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29055  # take no chances and rewrite it.
29056  # Note: m4 eats our [], so we need to use [ and ] instead.
29057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29058  if test "x$has_forbidden_chars" != x; then
29059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29061  fi
29062
29063
29064  windows_path="$new_path"
29065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29066    unix_path=`$CYGPATH -u "$windows_path"`
29067    new_path="$unix_path"
29068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29070    new_path="$unix_path"
29071  fi
29072
29073  if test "x$path" != "x$new_path"; then
29074    BOOT_JDK="$new_path"
29075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29076$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29077  fi
29078
29079  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29080  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29081
29082    else
29083      # We're on a unix platform. Hooray! :)
29084      path="$BOOT_JDK"
29085      has_space=`$ECHO "$path" | $GREP " "`
29086      if test "x$has_space" != x; then
29087        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29088$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29089        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29090      fi
29091
29092      # Use eval to expand a potential ~
29093      eval path="$path"
29094      if test ! -f "$path" && test ! -d "$path"; then
29095        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29096      fi
29097
29098      if test -d "$path"; then
29099        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29100      else
29101        dir="`$DIRNAME "$path"`"
29102        base="`$BASENAME "$path"`"
29103        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29104      fi
29105    fi
29106  fi
29107
29108            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29109$as_echo_n "checking for Boot JDK... " >&6; }
29110            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29111$as_echo "$BOOT_JDK" >&6; }
29112            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29113$as_echo_n "checking Boot JDK version... " >&6; }
29114            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29115            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29116$as_echo "$BOOT_JDK_VERSION" >&6; }
29117          fi # end check jdk version
29118        fi # end check javac
29119      fi # end check java
29120    fi # end check boot jdk found
29121  fi
29122
29123    done
29124  fi
29125
29126
29127    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29128    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29129      # Do we have a bin/java?
29130      if test ! -x "$BOOT_JDK/bin/java"; then
29131        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29133        BOOT_JDK_FOUND=no
29134      else
29135        # Do we have a bin/javac?
29136        if test ! -x "$BOOT_JDK/bin/javac"; then
29137          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29139          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29140$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29141          BOOT_JDK_FOUND=no
29142        else
29143          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29144          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29145
29146          # Extra M4 quote needed to protect [] in grep expression.
29147          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29148          if test "x$FOUND_CORRECT_VERSION" = x; then
29149            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29150$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29151            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29152$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29153            BOOT_JDK_FOUND=no
29154          else
29155            # We're done! :-)
29156            BOOT_JDK_FOUND=yes
29157
29158  # Only process if variable expands to non-empty
29159
29160  if test "x$BOOT_JDK" != x; then
29161    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29162
29163  # Input might be given as Windows format, start by converting to
29164  # unix format.
29165  path="$BOOT_JDK"
29166  new_path=`$CYGPATH -u "$path"`
29167
29168  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29169  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29170  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29171  # "foo.exe" is OK but "foo" is an error.
29172  #
29173  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29174  # It is also a way to make sure we got the proper file name for the real test later on.
29175  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29176  if test "x$test_shortpath" = x; then
29177    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29178$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29179    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29180  fi
29181
29182  # Call helper function which possibly converts this using DOS-style short mode.
29183  # If so, the updated path is stored in $new_path.
29184
29185  input_path="$new_path"
29186  # Check if we need to convert this using DOS-style short mode. If the path
29187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29188  # take no chances and rewrite it.
29189  # Note: m4 eats our [], so we need to use [ and ] instead.
29190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29191  if test "x$has_forbidden_chars" != x; then
29192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29193    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29194    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29195    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29196      # Going to short mode and back again did indeed matter. Since short mode is
29197      # case insensitive, let's make it lowercase to improve readability.
29198      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29199      # Now convert it back to Unix-style (cygpath)
29200      input_path=`$CYGPATH -u "$shortmode_path"`
29201      new_path="$input_path"
29202    fi
29203  fi
29204
29205  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29206  if test "x$test_cygdrive_prefix" = x; then
29207    # As a simple fix, exclude /usr/bin since it's not a real path.
29208    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29209      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29210      # a path prefixed by /cygdrive for fixpath to work.
29211      new_path="$CYGWIN_ROOT_PATH$input_path"
29212    fi
29213  fi
29214
29215
29216  if test "x$path" != "x$new_path"; then
29217    BOOT_JDK="$new_path"
29218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29219$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29220  fi
29221
29222    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29223
29224  path="$BOOT_JDK"
29225  has_colon=`$ECHO $path | $GREP ^.:`
29226  new_path="$path"
29227  if test "x$has_colon" = x; then
29228    # Not in mixed or Windows style, start by that.
29229    new_path=`cmd //c echo $path`
29230  fi
29231
29232
29233  input_path="$new_path"
29234  # Check if we need to convert this using DOS-style short mode. If the path
29235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29236  # take no chances and rewrite it.
29237  # Note: m4 eats our [], so we need to use [ and ] instead.
29238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29239  if test "x$has_forbidden_chars" != x; then
29240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29242  fi
29243
29244
29245  windows_path="$new_path"
29246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29247    unix_path=`$CYGPATH -u "$windows_path"`
29248    new_path="$unix_path"
29249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29251    new_path="$unix_path"
29252  fi
29253
29254  if test "x$path" != "x$new_path"; then
29255    BOOT_JDK="$new_path"
29256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29258  fi
29259
29260  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29261  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29262
29263    else
29264      # We're on a unix platform. Hooray! :)
29265      path="$BOOT_JDK"
29266      has_space=`$ECHO "$path" | $GREP " "`
29267      if test "x$has_space" != x; then
29268        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29269$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29270        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29271      fi
29272
29273      # Use eval to expand a potential ~
29274      eval path="$path"
29275      if test ! -f "$path" && test ! -d "$path"; then
29276        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29277      fi
29278
29279      if test -d "$path"; then
29280        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29281      else
29282        dir="`$DIRNAME "$path"`"
29283        base="`$BASENAME "$path"`"
29284        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29285      fi
29286    fi
29287  fi
29288
29289            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29290$as_echo_n "checking for Boot JDK... " >&6; }
29291            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29292$as_echo "$BOOT_JDK" >&6; }
29293            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29294$as_echo_n "checking Boot JDK version... " >&6; }
29295            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29296            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29297$as_echo "$BOOT_JDK_VERSION" >&6; }
29298          fi # end check jdk version
29299        fi # end check javac
29300      fi # end check java
29301    fi # end check boot jdk found
29302  fi
29303
29304  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29305
29306  if test "x$BOOT_JDK_FOUND" = xno; then
29307    # Now execute the test
29308
29309  BOOT_JDK_PREFIX="/usr/lib/jvm"
29310  BOOT_JDK_SUFFIX=""
29311  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29312  if test "x$ALL_JDKS_FOUND" != x; then
29313    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29314
29315  if test "x$BOOT_JDK_FOUND" = xno; then
29316    # Now execute the test
29317
29318        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29319        if test -d "$BOOT_JDK"; then
29320          BOOT_JDK_FOUND=maybe
29321          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29322$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29323        fi
29324
29325
29326    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29327    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29328      # Do we have a bin/java?
29329      if test ! -x "$BOOT_JDK/bin/java"; then
29330        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29332        BOOT_JDK_FOUND=no
29333      else
29334        # Do we have a bin/javac?
29335        if test ! -x "$BOOT_JDK/bin/javac"; then
29336          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29337$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29338          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29339$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29340          BOOT_JDK_FOUND=no
29341        else
29342          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29343          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29344
29345          # Extra M4 quote needed to protect [] in grep expression.
29346          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29347          if test "x$FOUND_CORRECT_VERSION" = x; then
29348            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29350            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29351$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29352            BOOT_JDK_FOUND=no
29353          else
29354            # We're done! :-)
29355            BOOT_JDK_FOUND=yes
29356
29357  # Only process if variable expands to non-empty
29358
29359  if test "x$BOOT_JDK" != x; then
29360    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29361
29362  # Input might be given as Windows format, start by converting to
29363  # unix format.
29364  path="$BOOT_JDK"
29365  new_path=`$CYGPATH -u "$path"`
29366
29367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29370  # "foo.exe" is OK but "foo" is an error.
29371  #
29372  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29373  # It is also a way to make sure we got the proper file name for the real test later on.
29374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29375  if test "x$test_shortpath" = x; then
29376    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29377$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29378    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29379  fi
29380
29381  # Call helper function which possibly converts this using DOS-style short mode.
29382  # If so, the updated path is stored in $new_path.
29383
29384  input_path="$new_path"
29385  # Check if we need to convert this using DOS-style short mode. If the path
29386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29387  # take no chances and rewrite it.
29388  # Note: m4 eats our [], so we need to use [ and ] instead.
29389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29390  if test "x$has_forbidden_chars" != x; then
29391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29395      # Going to short mode and back again did indeed matter. Since short mode is
29396      # case insensitive, let's make it lowercase to improve readability.
29397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29398      # Now convert it back to Unix-style (cygpath)
29399      input_path=`$CYGPATH -u "$shortmode_path"`
29400      new_path="$input_path"
29401    fi
29402  fi
29403
29404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29405  if test "x$test_cygdrive_prefix" = x; then
29406    # As a simple fix, exclude /usr/bin since it's not a real path.
29407    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29409      # a path prefixed by /cygdrive for fixpath to work.
29410      new_path="$CYGWIN_ROOT_PATH$input_path"
29411    fi
29412  fi
29413
29414
29415  if test "x$path" != "x$new_path"; then
29416    BOOT_JDK="$new_path"
29417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29418$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29419  fi
29420
29421    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29422
29423  path="$BOOT_JDK"
29424  has_colon=`$ECHO $path | $GREP ^.:`
29425  new_path="$path"
29426  if test "x$has_colon" = x; then
29427    # Not in mixed or Windows style, start by that.
29428    new_path=`cmd //c echo $path`
29429  fi
29430
29431
29432  input_path="$new_path"
29433  # Check if we need to convert this using DOS-style short mode. If the path
29434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29435  # take no chances and rewrite it.
29436  # Note: m4 eats our [], so we need to use [ and ] instead.
29437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29438  if test "x$has_forbidden_chars" != x; then
29439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29441  fi
29442
29443
29444  windows_path="$new_path"
29445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29446    unix_path=`$CYGPATH -u "$windows_path"`
29447    new_path="$unix_path"
29448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29450    new_path="$unix_path"
29451  fi
29452
29453  if test "x$path" != "x$new_path"; then
29454    BOOT_JDK="$new_path"
29455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29456$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29457  fi
29458
29459  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29460  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29461
29462    else
29463      # We're on a unix platform. Hooray! :)
29464      path="$BOOT_JDK"
29465      has_space=`$ECHO "$path" | $GREP " "`
29466      if test "x$has_space" != x; then
29467        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29468$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29469        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29470      fi
29471
29472      # Use eval to expand a potential ~
29473      eval path="$path"
29474      if test ! -f "$path" && test ! -d "$path"; then
29475        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29476      fi
29477
29478      if test -d "$path"; then
29479        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29480      else
29481        dir="`$DIRNAME "$path"`"
29482        base="`$BASENAME "$path"`"
29483        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29484      fi
29485    fi
29486  fi
29487
29488            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29489$as_echo_n "checking for Boot JDK... " >&6; }
29490            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29491$as_echo "$BOOT_JDK" >&6; }
29492            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29493$as_echo_n "checking Boot JDK version... " >&6; }
29494            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29495            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29496$as_echo "$BOOT_JDK_VERSION" >&6; }
29497          fi # end check jdk version
29498        fi # end check javac
29499      fi # end check java
29500    fi # end check boot jdk found
29501  fi
29502
29503    done
29504  fi
29505
29506
29507    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29508    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29509      # Do we have a bin/java?
29510      if test ! -x "$BOOT_JDK/bin/java"; then
29511        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29513        BOOT_JDK_FOUND=no
29514      else
29515        # Do we have a bin/javac?
29516        if test ! -x "$BOOT_JDK/bin/javac"; then
29517          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29518$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29519          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29520$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29521          BOOT_JDK_FOUND=no
29522        else
29523          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29524          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29525
29526          # Extra M4 quote needed to protect [] in grep expression.
29527          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29528          if test "x$FOUND_CORRECT_VERSION" = x; then
29529            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29530$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29531            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29532$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29533            BOOT_JDK_FOUND=no
29534          else
29535            # We're done! :-)
29536            BOOT_JDK_FOUND=yes
29537
29538  # Only process if variable expands to non-empty
29539
29540  if test "x$BOOT_JDK" != x; then
29541    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29542
29543  # Input might be given as Windows format, start by converting to
29544  # unix format.
29545  path="$BOOT_JDK"
29546  new_path=`$CYGPATH -u "$path"`
29547
29548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29551  # "foo.exe" is OK but "foo" is an error.
29552  #
29553  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29554  # It is also a way to make sure we got the proper file name for the real test later on.
29555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29556  if test "x$test_shortpath" = x; then
29557    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29558$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29559    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29560  fi
29561
29562  # Call helper function which possibly converts this using DOS-style short mode.
29563  # If so, the updated path is stored in $new_path.
29564
29565  input_path="$new_path"
29566  # Check if we need to convert this using DOS-style short mode. If the path
29567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29568  # take no chances and rewrite it.
29569  # Note: m4 eats our [], so we need to use [ and ] instead.
29570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29571  if test "x$has_forbidden_chars" != x; then
29572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29576      # Going to short mode and back again did indeed matter. Since short mode is
29577      # case insensitive, let's make it lowercase to improve readability.
29578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29579      # Now convert it back to Unix-style (cygpath)
29580      input_path=`$CYGPATH -u "$shortmode_path"`
29581      new_path="$input_path"
29582    fi
29583  fi
29584
29585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29586  if test "x$test_cygdrive_prefix" = x; then
29587    # As a simple fix, exclude /usr/bin since it's not a real path.
29588    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29590      # a path prefixed by /cygdrive for fixpath to work.
29591      new_path="$CYGWIN_ROOT_PATH$input_path"
29592    fi
29593  fi
29594
29595
29596  if test "x$path" != "x$new_path"; then
29597    BOOT_JDK="$new_path"
29598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29599$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29600  fi
29601
29602    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29603
29604  path="$BOOT_JDK"
29605  has_colon=`$ECHO $path | $GREP ^.:`
29606  new_path="$path"
29607  if test "x$has_colon" = x; then
29608    # Not in mixed or Windows style, start by that.
29609    new_path=`cmd //c echo $path`
29610  fi
29611
29612
29613  input_path="$new_path"
29614  # Check if we need to convert this using DOS-style short mode. If the path
29615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29616  # take no chances and rewrite it.
29617  # Note: m4 eats our [], so we need to use [ and ] instead.
29618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29619  if test "x$has_forbidden_chars" != x; then
29620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29622  fi
29623
29624
29625  windows_path="$new_path"
29626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29627    unix_path=`$CYGPATH -u "$windows_path"`
29628    new_path="$unix_path"
29629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29631    new_path="$unix_path"
29632  fi
29633
29634  if test "x$path" != "x$new_path"; then
29635    BOOT_JDK="$new_path"
29636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29637$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29638  fi
29639
29640  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29641  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29642
29643    else
29644      # We're on a unix platform. Hooray! :)
29645      path="$BOOT_JDK"
29646      has_space=`$ECHO "$path" | $GREP " "`
29647      if test "x$has_space" != x; then
29648        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29649$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29650        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29651      fi
29652
29653      # Use eval to expand a potential ~
29654      eval path="$path"
29655      if test ! -f "$path" && test ! -d "$path"; then
29656        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29657      fi
29658
29659      if test -d "$path"; then
29660        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29661      else
29662        dir="`$DIRNAME "$path"`"
29663        base="`$BASENAME "$path"`"
29664        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29665      fi
29666    fi
29667  fi
29668
29669            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29670$as_echo_n "checking for Boot JDK... " >&6; }
29671            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29672$as_echo "$BOOT_JDK" >&6; }
29673            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29674$as_echo_n "checking Boot JDK version... " >&6; }
29675            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29676            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29677$as_echo "$BOOT_JDK_VERSION" >&6; }
29678          fi # end check jdk version
29679        fi # end check javac
29680      fi # end check java
29681    fi # end check boot jdk found
29682  fi
29683
29684  fi
29685
29686
29687    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29688    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29689      # Do we have a bin/java?
29690      if test ! -x "$BOOT_JDK/bin/java"; then
29691        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29692$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29693        BOOT_JDK_FOUND=no
29694      else
29695        # Do we have a bin/javac?
29696        if test ! -x "$BOOT_JDK/bin/javac"; then
29697          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29698$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29699          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29700$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29701          BOOT_JDK_FOUND=no
29702        else
29703          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29704          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29705
29706          # Extra M4 quote needed to protect [] in grep expression.
29707          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29708          if test "x$FOUND_CORRECT_VERSION" = x; then
29709            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29710$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29711            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29712$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29713            BOOT_JDK_FOUND=no
29714          else
29715            # We're done! :-)
29716            BOOT_JDK_FOUND=yes
29717
29718  # Only process if variable expands to non-empty
29719
29720  if test "x$BOOT_JDK" != x; then
29721    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29722
29723  # Input might be given as Windows format, start by converting to
29724  # unix format.
29725  path="$BOOT_JDK"
29726  new_path=`$CYGPATH -u "$path"`
29727
29728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29731  # "foo.exe" is OK but "foo" is an error.
29732  #
29733  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29734  # It is also a way to make sure we got the proper file name for the real test later on.
29735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29736  if test "x$test_shortpath" = x; then
29737    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29738$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29739    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29740  fi
29741
29742  # Call helper function which possibly converts this using DOS-style short mode.
29743  # If so, the updated path is stored in $new_path.
29744
29745  input_path="$new_path"
29746  # Check if we need to convert this using DOS-style short mode. If the path
29747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29748  # take no chances and rewrite it.
29749  # Note: m4 eats our [], so we need to use [ and ] instead.
29750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29751  if test "x$has_forbidden_chars" != x; then
29752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29753    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29754    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29755    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29756      # Going to short mode and back again did indeed matter. Since short mode is
29757      # case insensitive, let's make it lowercase to improve readability.
29758      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29759      # Now convert it back to Unix-style (cygpath)
29760      input_path=`$CYGPATH -u "$shortmode_path"`
29761      new_path="$input_path"
29762    fi
29763  fi
29764
29765  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29766  if test "x$test_cygdrive_prefix" = x; then
29767    # As a simple fix, exclude /usr/bin since it's not a real path.
29768    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29769      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29770      # a path prefixed by /cygdrive for fixpath to work.
29771      new_path="$CYGWIN_ROOT_PATH$input_path"
29772    fi
29773  fi
29774
29775
29776  if test "x$path" != "x$new_path"; then
29777    BOOT_JDK="$new_path"
29778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29779$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29780  fi
29781
29782    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29783
29784  path="$BOOT_JDK"
29785  has_colon=`$ECHO $path | $GREP ^.:`
29786  new_path="$path"
29787  if test "x$has_colon" = x; then
29788    # Not in mixed or Windows style, start by that.
29789    new_path=`cmd //c echo $path`
29790  fi
29791
29792
29793  input_path="$new_path"
29794  # Check if we need to convert this using DOS-style short mode. If the path
29795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29796  # take no chances and rewrite it.
29797  # Note: m4 eats our [], so we need to use [ and ] instead.
29798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29799  if test "x$has_forbidden_chars" != x; then
29800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29801    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29802  fi
29803
29804
29805  windows_path="$new_path"
29806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29807    unix_path=`$CYGPATH -u "$windows_path"`
29808    new_path="$unix_path"
29809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29811    new_path="$unix_path"
29812  fi
29813
29814  if test "x$path" != "x$new_path"; then
29815    BOOT_JDK="$new_path"
29816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29817$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29818  fi
29819
29820  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29821  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29822
29823    else
29824      # We're on a unix platform. Hooray! :)
29825      path="$BOOT_JDK"
29826      has_space=`$ECHO "$path" | $GREP " "`
29827      if test "x$has_space" != x; then
29828        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29829$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29830        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29831      fi
29832
29833      # Use eval to expand a potential ~
29834      eval path="$path"
29835      if test ! -f "$path" && test ! -d "$path"; then
29836        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29837      fi
29838
29839      if test -d "$path"; then
29840        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29841      else
29842        dir="`$DIRNAME "$path"`"
29843        base="`$BASENAME "$path"`"
29844        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29845      fi
29846    fi
29847  fi
29848
29849            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29850$as_echo_n "checking for Boot JDK... " >&6; }
29851            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29852$as_echo "$BOOT_JDK" >&6; }
29853            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29854$as_echo_n "checking Boot JDK version... " >&6; }
29855            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29856            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29857$as_echo "$BOOT_JDK_VERSION" >&6; }
29858          fi # end check jdk version
29859        fi # end check javac
29860      fi # end check java
29861    fi # end check boot jdk found
29862  fi
29863
29864
29865  # If we haven't found anything yet, we've truly lost. Give up.
29866  if test "x$BOOT_JDK_FOUND" = xno; then
29867
29868  # Print a helpful message on how to acquire the necessary build dependency.
29869  # openjdk is the help tag: freetype, cups, alsa etc
29870  MISSING_DEPENDENCY=openjdk
29871
29872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29873    cygwin_help $MISSING_DEPENDENCY
29874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29875    msys_help $MISSING_DEPENDENCY
29876  else
29877    PKGHANDLER_COMMAND=
29878
29879    case $PKGHANDLER in
29880      apt-get)
29881        apt_help     $MISSING_DEPENDENCY ;;
29882      yum)
29883        yum_help     $MISSING_DEPENDENCY ;;
29884      port)
29885        port_help    $MISSING_DEPENDENCY ;;
29886      pkgutil)
29887        pkgutil_help $MISSING_DEPENDENCY ;;
29888      pkgadd)
29889        pkgadd_help  $MISSING_DEPENDENCY ;;
29890    esac
29891
29892    if test "x$PKGHANDLER_COMMAND" != x; then
29893      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29894    fi
29895  fi
29896
29897    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29898$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29899    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
29900$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29901    as_fn_error $? "Cannot continue" "$LINENO" 5
29902  fi
29903
29904
29905
29906  # Setup tools from the Boot JDK.
29907
29908  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29909
29910  # Publish this variable in the help.
29911
29912
29913  if [ -z "${JAVA+x}" ]; then
29914    # The variable is not set by user, try to locate tool using the code snippet
29915
29916      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29917$as_echo_n "checking for java in Boot JDK... " >&6; }
29918      JAVA=$BOOT_JDK/bin/java
29919      if test ! -x $JAVA; then
29920        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29921$as_echo "not found" >&6; }
29922        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
29923$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29924        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29925      fi
29926      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29927$as_echo "ok" >&6; }
29928
29929
29930  else
29931    # The variable is set, but is it from the command line or the environment?
29932
29933    # Try to remove the string !JAVA! from our list.
29934    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29935    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29936      # If it failed, the variable was not from the command line. Ignore it,
29937      # but warn the user (except for BASH, which is always set by the calling BASH).
29938      if test "xJAVA" != xBASH; then
29939        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29940$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29941      fi
29942      # Try to locate tool using the code snippet
29943
29944      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29945$as_echo_n "checking for java in Boot JDK... " >&6; }
29946      JAVA=$BOOT_JDK/bin/java
29947      if test ! -x $JAVA; then
29948        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29949$as_echo "not found" >&6; }
29950        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
29951$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29952        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29953      fi
29954      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29955$as_echo "ok" >&6; }
29956
29957
29958    else
29959      # If it succeeded, then it was overridden by the user. We will use it
29960      # for the tool.
29961
29962      # First remove it from the list of overridden variables, so we can test
29963      # for unknown variables in the end.
29964      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29965
29966      # Check if we try to supply an empty value
29967      if test "x$JAVA" = x; then
29968        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29969$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29970        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29971$as_echo_n "checking for JAVA... " >&6; }
29972        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29973$as_echo "disabled" >&6; }
29974      else
29975        # Check if the provided tool contains a complete path.
29976        tool_specified="$JAVA"
29977        tool_basename="${tool_specified##*/}"
29978        if test "x$tool_basename" = "x$tool_specified"; then
29979          # A command without a complete path is provided, search $PATH.
29980          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29981$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29982          # Extract the first word of "$tool_basename", so it can be a program name with args.
29983set dummy $tool_basename; ac_word=$2
29984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29985$as_echo_n "checking for $ac_word... " >&6; }
29986if ${ac_cv_path_JAVA+:} false; then :
29987  $as_echo_n "(cached) " >&6
29988else
29989  case $JAVA in
29990  [\\/]* | ?:[\\/]*)
29991  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29992  ;;
29993  *)
29994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29995for as_dir in $PATH
29996do
29997  IFS=$as_save_IFS
29998  test -z "$as_dir" && as_dir=.
29999    for ac_exec_ext in '' $ac_executable_extensions; do
30000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30001    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30003    break 2
30004  fi
30005done
30006  done
30007IFS=$as_save_IFS
30008
30009  ;;
30010esac
30011fi
30012JAVA=$ac_cv_path_JAVA
30013if test -n "$JAVA"; then
30014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30015$as_echo "$JAVA" >&6; }
30016else
30017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30018$as_echo "no" >&6; }
30019fi
30020
30021
30022          if test "x$JAVA" = x; then
30023            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30024          fi
30025        else
30026          # Otherwise we believe it is a complete path. Use it as it is.
30027          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30028$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30029          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30030$as_echo_n "checking for JAVA... " >&6; }
30031          if test ! -x "$tool_specified"; then
30032            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30033$as_echo "not found" >&6; }
30034            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30035          fi
30036          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30037$as_echo "$tool_specified" >&6; }
30038        fi
30039      fi
30040    fi
30041
30042  fi
30043
30044
30045
30046  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30047
30048  # Publish this variable in the help.
30049
30050
30051  if [ -z "${JAVAC+x}" ]; then
30052    # The variable is not set by user, try to locate tool using the code snippet
30053
30054      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30055$as_echo_n "checking for javac in Boot JDK... " >&6; }
30056      JAVAC=$BOOT_JDK/bin/javac
30057      if test ! -x $JAVAC; then
30058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30059$as_echo "not found" >&6; }
30060        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30061$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30062        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30063      fi
30064      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30065$as_echo "ok" >&6; }
30066
30067
30068  else
30069    # The variable is set, but is it from the command line or the environment?
30070
30071    # Try to remove the string !JAVAC! from our list.
30072    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30073    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30074      # If it failed, the variable was not from the command line. Ignore it,
30075      # but warn the user (except for BASH, which is always set by the calling BASH).
30076      if test "xJAVAC" != xBASH; then
30077        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30078$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30079      fi
30080      # Try to locate tool using the code snippet
30081
30082      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30083$as_echo_n "checking for javac in Boot JDK... " >&6; }
30084      JAVAC=$BOOT_JDK/bin/javac
30085      if test ! -x $JAVAC; then
30086        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30087$as_echo "not found" >&6; }
30088        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30089$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30090        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30091      fi
30092      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30093$as_echo "ok" >&6; }
30094
30095
30096    else
30097      # If it succeeded, then it was overridden by the user. We will use it
30098      # for the tool.
30099
30100      # First remove it from the list of overridden variables, so we can test
30101      # for unknown variables in the end.
30102      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30103
30104      # Check if we try to supply an empty value
30105      if test "x$JAVAC" = x; then
30106        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30107$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30108        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30109$as_echo_n "checking for JAVAC... " >&6; }
30110        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30111$as_echo "disabled" >&6; }
30112      else
30113        # Check if the provided tool contains a complete path.
30114        tool_specified="$JAVAC"
30115        tool_basename="${tool_specified##*/}"
30116        if test "x$tool_basename" = "x$tool_specified"; then
30117          # A command without a complete path is provided, search $PATH.
30118          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30119$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30120          # Extract the first word of "$tool_basename", so it can be a program name with args.
30121set dummy $tool_basename; ac_word=$2
30122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30123$as_echo_n "checking for $ac_word... " >&6; }
30124if ${ac_cv_path_JAVAC+:} false; then :
30125  $as_echo_n "(cached) " >&6
30126else
30127  case $JAVAC in
30128  [\\/]* | ?:[\\/]*)
30129  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30130  ;;
30131  *)
30132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30133for as_dir in $PATH
30134do
30135  IFS=$as_save_IFS
30136  test -z "$as_dir" && as_dir=.
30137    for ac_exec_ext in '' $ac_executable_extensions; do
30138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30139    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30141    break 2
30142  fi
30143done
30144  done
30145IFS=$as_save_IFS
30146
30147  ;;
30148esac
30149fi
30150JAVAC=$ac_cv_path_JAVAC
30151if test -n "$JAVAC"; then
30152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30153$as_echo "$JAVAC" >&6; }
30154else
30155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30156$as_echo "no" >&6; }
30157fi
30158
30159
30160          if test "x$JAVAC" = x; then
30161            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30162          fi
30163        else
30164          # Otherwise we believe it is a complete path. Use it as it is.
30165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30166$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30167          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30168$as_echo_n "checking for JAVAC... " >&6; }
30169          if test ! -x "$tool_specified"; then
30170            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30171$as_echo "not found" >&6; }
30172            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30173          fi
30174          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30175$as_echo "$tool_specified" >&6; }
30176        fi
30177      fi
30178    fi
30179
30180  fi
30181
30182
30183
30184  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30185
30186  # Publish this variable in the help.
30187
30188
30189  if [ -z "${JAVAH+x}" ]; then
30190    # The variable is not set by user, try to locate tool using the code snippet
30191
30192      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30193$as_echo_n "checking for javah in Boot JDK... " >&6; }
30194      JAVAH=$BOOT_JDK/bin/javah
30195      if test ! -x $JAVAH; then
30196        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30197$as_echo "not found" >&6; }
30198        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30199$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30200        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30201      fi
30202      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30203$as_echo "ok" >&6; }
30204
30205
30206  else
30207    # The variable is set, but is it from the command line or the environment?
30208
30209    # Try to remove the string !JAVAH! from our list.
30210    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30211    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30212      # If it failed, the variable was not from the command line. Ignore it,
30213      # but warn the user (except for BASH, which is always set by the calling BASH).
30214      if test "xJAVAH" != xBASH; then
30215        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30216$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30217      fi
30218      # Try to locate tool using the code snippet
30219
30220      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30221$as_echo_n "checking for javah in Boot JDK... " >&6; }
30222      JAVAH=$BOOT_JDK/bin/javah
30223      if test ! -x $JAVAH; then
30224        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30225$as_echo "not found" >&6; }
30226        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30227$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30228        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30229      fi
30230      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30231$as_echo "ok" >&6; }
30232
30233
30234    else
30235      # If it succeeded, then it was overridden by the user. We will use it
30236      # for the tool.
30237
30238      # First remove it from the list of overridden variables, so we can test
30239      # for unknown variables in the end.
30240      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30241
30242      # Check if we try to supply an empty value
30243      if test "x$JAVAH" = x; then
30244        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30245$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30246        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30247$as_echo_n "checking for JAVAH... " >&6; }
30248        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30249$as_echo "disabled" >&6; }
30250      else
30251        # Check if the provided tool contains a complete path.
30252        tool_specified="$JAVAH"
30253        tool_basename="${tool_specified##*/}"
30254        if test "x$tool_basename" = "x$tool_specified"; then
30255          # A command without a complete path is provided, search $PATH.
30256          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30257$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30258          # Extract the first word of "$tool_basename", so it can be a program name with args.
30259set dummy $tool_basename; ac_word=$2
30260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30261$as_echo_n "checking for $ac_word... " >&6; }
30262if ${ac_cv_path_JAVAH+:} false; then :
30263  $as_echo_n "(cached) " >&6
30264else
30265  case $JAVAH in
30266  [\\/]* | ?:[\\/]*)
30267  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30268  ;;
30269  *)
30270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30271for as_dir in $PATH
30272do
30273  IFS=$as_save_IFS
30274  test -z "$as_dir" && as_dir=.
30275    for ac_exec_ext in '' $ac_executable_extensions; do
30276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30277    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30279    break 2
30280  fi
30281done
30282  done
30283IFS=$as_save_IFS
30284
30285  ;;
30286esac
30287fi
30288JAVAH=$ac_cv_path_JAVAH
30289if test -n "$JAVAH"; then
30290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30291$as_echo "$JAVAH" >&6; }
30292else
30293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30294$as_echo "no" >&6; }
30295fi
30296
30297
30298          if test "x$JAVAH" = x; then
30299            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30300          fi
30301        else
30302          # Otherwise we believe it is a complete path. Use it as it is.
30303          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30304$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30305          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30306$as_echo_n "checking for JAVAH... " >&6; }
30307          if test ! -x "$tool_specified"; then
30308            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30309$as_echo "not found" >&6; }
30310            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30311          fi
30312          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30313$as_echo "$tool_specified" >&6; }
30314        fi
30315      fi
30316    fi
30317
30318  fi
30319
30320
30321
30322  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30323
30324  # Publish this variable in the help.
30325
30326
30327  if [ -z "${JAR+x}" ]; then
30328    # The variable is not set by user, try to locate tool using the code snippet
30329
30330      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30331$as_echo_n "checking for jar in Boot JDK... " >&6; }
30332      JAR=$BOOT_JDK/bin/jar
30333      if test ! -x $JAR; then
30334        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30335$as_echo "not found" >&6; }
30336        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30337$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30338        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30339      fi
30340      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30341$as_echo "ok" >&6; }
30342
30343
30344  else
30345    # The variable is set, but is it from the command line or the environment?
30346
30347    # Try to remove the string !JAR! from our list.
30348    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30349    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30350      # If it failed, the variable was not from the command line. Ignore it,
30351      # but warn the user (except for BASH, which is always set by the calling BASH).
30352      if test "xJAR" != xBASH; then
30353        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30354$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30355      fi
30356      # Try to locate tool using the code snippet
30357
30358      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30359$as_echo_n "checking for jar in Boot JDK... " >&6; }
30360      JAR=$BOOT_JDK/bin/jar
30361      if test ! -x $JAR; then
30362        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30363$as_echo "not found" >&6; }
30364        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30365$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30366        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30367      fi
30368      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30369$as_echo "ok" >&6; }
30370
30371
30372    else
30373      # If it succeeded, then it was overridden by the user. We will use it
30374      # for the tool.
30375
30376      # First remove it from the list of overridden variables, so we can test
30377      # for unknown variables in the end.
30378      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30379
30380      # Check if we try to supply an empty value
30381      if test "x$JAR" = x; then
30382        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30383$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30384        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30385$as_echo_n "checking for JAR... " >&6; }
30386        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30387$as_echo "disabled" >&6; }
30388      else
30389        # Check if the provided tool contains a complete path.
30390        tool_specified="$JAR"
30391        tool_basename="${tool_specified##*/}"
30392        if test "x$tool_basename" = "x$tool_specified"; then
30393          # A command without a complete path is provided, search $PATH.
30394          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30395$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30396          # Extract the first word of "$tool_basename", so it can be a program name with args.
30397set dummy $tool_basename; ac_word=$2
30398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30399$as_echo_n "checking for $ac_word... " >&6; }
30400if ${ac_cv_path_JAR+:} false; then :
30401  $as_echo_n "(cached) " >&6
30402else
30403  case $JAR in
30404  [\\/]* | ?:[\\/]*)
30405  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30406  ;;
30407  *)
30408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30409for as_dir in $PATH
30410do
30411  IFS=$as_save_IFS
30412  test -z "$as_dir" && as_dir=.
30413    for ac_exec_ext in '' $ac_executable_extensions; do
30414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30415    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30417    break 2
30418  fi
30419done
30420  done
30421IFS=$as_save_IFS
30422
30423  ;;
30424esac
30425fi
30426JAR=$ac_cv_path_JAR
30427if test -n "$JAR"; then
30428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30429$as_echo "$JAR" >&6; }
30430else
30431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30432$as_echo "no" >&6; }
30433fi
30434
30435
30436          if test "x$JAR" = x; then
30437            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30438          fi
30439        else
30440          # Otherwise we believe it is a complete path. Use it as it is.
30441          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30442$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30443          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30444$as_echo_n "checking for JAR... " >&6; }
30445          if test ! -x "$tool_specified"; then
30446            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30447$as_echo "not found" >&6; }
30448            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30449          fi
30450          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30451$as_echo "$tool_specified" >&6; }
30452        fi
30453      fi
30454    fi
30455
30456  fi
30457
30458
30459
30460  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30461
30462  # Publish this variable in the help.
30463
30464
30465  if [ -z "${JARSIGNER+x}" ]; then
30466    # The variable is not set by user, try to locate tool using the code snippet
30467
30468      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30469$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30470      JARSIGNER=$BOOT_JDK/bin/jarsigner
30471      if test ! -x $JARSIGNER; then
30472        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30473$as_echo "not found" >&6; }
30474        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30475$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30476        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30477      fi
30478      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30479$as_echo "ok" >&6; }
30480
30481
30482  else
30483    # The variable is set, but is it from the command line or the environment?
30484
30485    # Try to remove the string !JARSIGNER! from our list.
30486    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30487    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30488      # If it failed, the variable was not from the command line. Ignore it,
30489      # but warn the user (except for BASH, which is always set by the calling BASH).
30490      if test "xJARSIGNER" != xBASH; then
30491        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30492$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30493      fi
30494      # Try to locate tool using the code snippet
30495
30496      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30497$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30498      JARSIGNER=$BOOT_JDK/bin/jarsigner
30499      if test ! -x $JARSIGNER; then
30500        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30501$as_echo "not found" >&6; }
30502        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30503$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30504        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30505      fi
30506      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30507$as_echo "ok" >&6; }
30508
30509
30510    else
30511      # If it succeeded, then it was overridden by the user. We will use it
30512      # for the tool.
30513
30514      # First remove it from the list of overridden variables, so we can test
30515      # for unknown variables in the end.
30516      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30517
30518      # Check if we try to supply an empty value
30519      if test "x$JARSIGNER" = x; then
30520        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30521$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30522        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30523$as_echo_n "checking for JARSIGNER... " >&6; }
30524        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30525$as_echo "disabled" >&6; }
30526      else
30527        # Check if the provided tool contains a complete path.
30528        tool_specified="$JARSIGNER"
30529        tool_basename="${tool_specified##*/}"
30530        if test "x$tool_basename" = "x$tool_specified"; then
30531          # A command without a complete path is provided, search $PATH.
30532          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30533$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30534          # Extract the first word of "$tool_basename", so it can be a program name with args.
30535set dummy $tool_basename; ac_word=$2
30536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30537$as_echo_n "checking for $ac_word... " >&6; }
30538if ${ac_cv_path_JARSIGNER+:} false; then :
30539  $as_echo_n "(cached) " >&6
30540else
30541  case $JARSIGNER in
30542  [\\/]* | ?:[\\/]*)
30543  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30544  ;;
30545  *)
30546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30547for as_dir in $PATH
30548do
30549  IFS=$as_save_IFS
30550  test -z "$as_dir" && as_dir=.
30551    for ac_exec_ext in '' $ac_executable_extensions; do
30552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30553    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30555    break 2
30556  fi
30557done
30558  done
30559IFS=$as_save_IFS
30560
30561  ;;
30562esac
30563fi
30564JARSIGNER=$ac_cv_path_JARSIGNER
30565if test -n "$JARSIGNER"; then
30566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30567$as_echo "$JARSIGNER" >&6; }
30568else
30569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30570$as_echo "no" >&6; }
30571fi
30572
30573
30574          if test "x$JARSIGNER" = x; then
30575            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30576          fi
30577        else
30578          # Otherwise we believe it is a complete path. Use it as it is.
30579          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30580$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30581          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30582$as_echo_n "checking for JARSIGNER... " >&6; }
30583          if test ! -x "$tool_specified"; then
30584            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30585$as_echo "not found" >&6; }
30586            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30587          fi
30588          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30589$as_echo "$tool_specified" >&6; }
30590        fi
30591      fi
30592    fi
30593
30594  fi
30595
30596
30597
30598  # Finally, set some other options...
30599
30600  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30601  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30602
30603
30604
30605  $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30606  $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30607  OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30608  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30609  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30610  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30611    dummy="$dummy --patch-module foo=bar"
30612    JVM_ARG_OK=true
30613  else
30614    $ECHO "Arg failed:" >&5
30615    $ECHO "$OUTPUT" >&5
30616    JVM_ARG_OK=false
30617  fi
30618
30619  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30620$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30621  if test "x$JVM_ARG_OK" = "xtrue"; then
30622    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30623$as_echo "yes" >&6; }
30624    BOOT_JDK_MODULAR="true"
30625  else
30626    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30627$as_echo "no" >&6; }
30628    BOOT_JDK_MODULAR="false"
30629  fi
30630
30631
30632
30633
30634  # Check if the boot jdk is 32 or 64 bit
30635  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30636    BOOT_JDK_BITS="64"
30637  else
30638    BOOT_JDK_BITS="32"
30639  fi
30640  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30641$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30643$as_echo "$BOOT_JDK_BITS" >&6; }
30644
30645
30646
30647
30648# Check whether --with-build-jdk was given.
30649if test "${with_build_jdk+set}" = set; then :
30650  withval=$with_build_jdk;
30651fi
30652
30653
30654  CREATE_BUILDJDK=false
30655  EXTERNAL_BUILDJDK=false
30656  BUILD_JDK_FOUND="no"
30657  if test "x$with_build_jdk" != "x"; then
30658
30659  if test "x$BUILD_JDK_FOUND" = xno; then
30660    # Execute the test
30661
30662       if test "x$with_build_jdk" != x; then
30663         BUILD_JDK=$with_build_jdk
30664         BUILD_JDK_FOUND=maybe
30665         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30666$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30667       fi
30668
30669    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30670    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30671      # Do we have a bin/java?
30672      if test ! -x "$BUILD_JDK/bin/java"; then
30673        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30674$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30675        BUILD_JDK_FOUND=no
30676      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30677        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30678$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30679        BUILD_JDK_FOUND=no
30680      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30681        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30682$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30683        BUILD_JDK_FOUND=no
30684      elif test ! -x "$BUILD_JDK/bin/javac"; then
30685        # Do we have a bin/javac?
30686        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30687$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30688        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30689$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30690        BUILD_JDK_FOUND=no
30691      else
30692        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30693        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30694
30695        # Extra M4 quote needed to protect [] in grep expression.
30696        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30697        if test "x$FOUND_CORRECT_VERSION" = x; then
30698          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30699$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30700          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30701$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30702          BUILD_JDK_FOUND=no
30703        else
30704          # We're done!
30705          BUILD_JDK_FOUND=yes
30706
30707  # Only process if variable expands to non-empty
30708
30709  if test "x$BUILD_JDK" != x; then
30710    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30711
30712  # Input might be given as Windows format, start by converting to
30713  # unix format.
30714  path="$BUILD_JDK"
30715  new_path=`$CYGPATH -u "$path"`
30716
30717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30720  # "foo.exe" is OK but "foo" is an error.
30721  #
30722  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30723  # It is also a way to make sure we got the proper file name for the real test later on.
30724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30725  if test "x$test_shortpath" = x; then
30726    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30727$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30728    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30729  fi
30730
30731  # Call helper function which possibly converts this using DOS-style short mode.
30732  # If so, the updated path is stored in $new_path.
30733
30734  input_path="$new_path"
30735  # Check if we need to convert this using DOS-style short mode. If the path
30736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30737  # take no chances and rewrite it.
30738  # Note: m4 eats our [], so we need to use [ and ] instead.
30739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30740  if test "x$has_forbidden_chars" != x; then
30741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30742    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30743    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30744    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30745      # Going to short mode and back again did indeed matter. Since short mode is
30746      # case insensitive, let's make it lowercase to improve readability.
30747      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30748      # Now convert it back to Unix-style (cygpath)
30749      input_path=`$CYGPATH -u "$shortmode_path"`
30750      new_path="$input_path"
30751    fi
30752  fi
30753
30754  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30755  if test "x$test_cygdrive_prefix" = x; then
30756    # As a simple fix, exclude /usr/bin since it's not a real path.
30757    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30758      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30759      # a path prefixed by /cygdrive for fixpath to work.
30760      new_path="$CYGWIN_ROOT_PATH$input_path"
30761    fi
30762  fi
30763
30764
30765  if test "x$path" != "x$new_path"; then
30766    BUILD_JDK="$new_path"
30767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30768$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30769  fi
30770
30771    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30772
30773  path="$BUILD_JDK"
30774  has_colon=`$ECHO $path | $GREP ^.:`
30775  new_path="$path"
30776  if test "x$has_colon" = x; then
30777    # Not in mixed or Windows style, start by that.
30778    new_path=`cmd //c echo $path`
30779  fi
30780
30781
30782  input_path="$new_path"
30783  # Check if we need to convert this using DOS-style short mode. If the path
30784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30785  # take no chances and rewrite it.
30786  # Note: m4 eats our [], so we need to use [ and ] instead.
30787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30788  if test "x$has_forbidden_chars" != x; then
30789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30790    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30791  fi
30792
30793
30794  windows_path="$new_path"
30795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30796    unix_path=`$CYGPATH -u "$windows_path"`
30797    new_path="$unix_path"
30798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30800    new_path="$unix_path"
30801  fi
30802
30803  if test "x$path" != "x$new_path"; then
30804    BUILD_JDK="$new_path"
30805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30806$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30807  fi
30808
30809  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30810  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30811
30812    else
30813      # We're on a unix platform. Hooray! :)
30814      path="$BUILD_JDK"
30815      has_space=`$ECHO "$path" | $GREP " "`
30816      if test "x$has_space" != x; then
30817        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30818$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30819        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30820      fi
30821
30822      # Use eval to expand a potential ~
30823      eval path="$path"
30824      if test ! -f "$path" && test ! -d "$path"; then
30825        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30826      fi
30827
30828      if test -d "$path"; then
30829        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30830      else
30831        dir="`$DIRNAME "$path"`"
30832        base="`$BASENAME "$path"`"
30833        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30834      fi
30835    fi
30836  fi
30837
30838          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30839$as_echo_n "checking for Build JDK... " >&6; }
30840          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30841$as_echo "$BUILD_JDK" >&6; }
30842          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30843$as_echo_n "checking Build JDK version... " >&6; }
30844          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30845          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30846$as_echo "$BUILD_JDK_VERSION" >&6; }
30847        fi # end check jdk version
30848      fi # end check java
30849    fi # end check build jdk found
30850  fi
30851
30852    EXTERNAL_BUILDJDK=true
30853  else
30854    if test "x$COMPILE_TYPE" = "xcross"; then
30855      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30856      BUILD_JDK_FOUND=yes
30857      CREATE_BUILDJDK=true
30858      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30859$as_echo_n "checking for Build JDK... " >&6; }
30860      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30861$as_echo "yes, will build it for the host platform" >&6; }
30862    else
30863      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30864      BUILD_JDK_FOUND=yes
30865      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30866$as_echo_n "checking for Build JDK... " >&6; }
30867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30868$as_echo "yes, will use output dir" >&6; }
30869    fi
30870  fi
30871
30872  JMOD="$BUILD_JDK/bin/jmod"
30873  JLINK="$BUILD_JDK/bin/jlink"
30874
30875
30876
30877  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30878    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30879$as_echo_n "checking for Build JDK... " >&6; }
30880    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30881$as_echo "no" >&6; }
30882    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30883  fi
30884
30885
30886
30887
30888
30889
30890###############################################################################
30891#
30892# Configure the sources to use. We can add or override individual directories.
30893#
30894###############################################################################
30895
30896
30897  # Where are the sources.
30898  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30899  CORBA_TOPDIR="$SRC_ROOT/corba"
30900  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30901  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30902  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30903  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30904  JDK_TOPDIR="$SRC_ROOT/jdk"
30905
30906
30907
30908
30909
30910
30911
30912
30913
30914  # This feature is no longer supported.
30915
30916
30917
30918# Check whether --with-add-source-root was given.
30919if test "${with_add_source_root+set}" = set; then :
30920  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
30921$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30922fi
30923
30924
30925
30926
30927# Check whether --with-override-source-root was given.
30928if test "${with_override_source_root+set}" = set; then :
30929  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
30930$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30931fi
30932
30933
30934
30935
30936# Check whether --with-adds-and-overrides was given.
30937if test "${with_adds_and_overrides+set}" = set; then :
30938  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
30939$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30940fi
30941
30942
30943
30944
30945# Check whether --with-override-langtools was given.
30946if test "${with_override_langtools+set}" = set; then :
30947  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30948$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30949fi
30950
30951
30952
30953
30954# Check whether --with-override-corba was given.
30955if test "${with_override_corba+set}" = set; then :
30956  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30957$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30958fi
30959
30960
30961
30962
30963# Check whether --with-override-jaxp was given.
30964if test "${with_override_jaxp+set}" = set; then :
30965  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30966$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30967fi
30968
30969
30970
30971
30972# Check whether --with-override-jaxws was given.
30973if test "${with_override_jaxws+set}" = set; then :
30974  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30975$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30976fi
30977
30978
30979
30980
30981# Check whether --with-override-hotspot was given.
30982if test "${with_override_hotspot+set}" = set; then :
30983  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30984$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30985fi
30986
30987
30988
30989
30990# Check whether --with-override-nashorn was given.
30991if test "${with_override_nashorn+set}" = set; then :
30992  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30993$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30994fi
30995
30996
30997
30998
30999# Check whether --with-override-jdk was given.
31000if test "${with_override_jdk+set}" = set; then :
31001  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31002$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31003fi
31004
31005
31006
31007
31008  BUILD_OUTPUT="$OUTPUT_ROOT"
31009
31010  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31011
31012
31013
31014# Check whether --with-import_hotspot was given.
31015if test "${with_import_hotspot+set}" = set; then :
31016  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31017$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31018fi
31019
31020
31021
31022
31023
31024
31025# Check whether --with-import-modules was given.
31026if test "${with_import_modules+set}" = set; then :
31027  withval=$with_import_modules;
31028fi
31029
31030
31031  if test "x$with_import_modules" != x \
31032      && test "x$with_import_modules" != "xno"; then
31033    if test -d "$with_import_modules"; then
31034      IMPORT_MODULES_TOPDIR="$with_import_modules"
31035
31036  # Only process if variable expands to non-empty
31037
31038  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31039    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31040
31041  # Input might be given as Windows format, start by converting to
31042  # unix format.
31043  path="$IMPORT_MODULES_TOPDIR"
31044  new_path=`$CYGPATH -u "$path"`
31045
31046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31049  # "foo.exe" is OK but "foo" is an error.
31050  #
31051  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31052  # It is also a way to make sure we got the proper file name for the real test later on.
31053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31054  if test "x$test_shortpath" = x; then
31055    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31056$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31057    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31058  fi
31059
31060  # Call helper function which possibly converts this using DOS-style short mode.
31061  # If so, the updated path is stored in $new_path.
31062
31063  input_path="$new_path"
31064  # Check if we need to convert this using DOS-style short mode. If the path
31065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31066  # take no chances and rewrite it.
31067  # Note: m4 eats our [], so we need to use [ and ] instead.
31068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31069  if test "x$has_forbidden_chars" != x; then
31070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31074      # Going to short mode and back again did indeed matter. Since short mode is
31075      # case insensitive, let's make it lowercase to improve readability.
31076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31077      # Now convert it back to Unix-style (cygpath)
31078      input_path=`$CYGPATH -u "$shortmode_path"`
31079      new_path="$input_path"
31080    fi
31081  fi
31082
31083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31084  if test "x$test_cygdrive_prefix" = x; then
31085    # As a simple fix, exclude /usr/bin since it's not a real path.
31086    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31088      # a path prefixed by /cygdrive for fixpath to work.
31089      new_path="$CYGWIN_ROOT_PATH$input_path"
31090    fi
31091  fi
31092
31093
31094  if test "x$path" != "x$new_path"; then
31095    IMPORT_MODULES_TOPDIR="$new_path"
31096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31097$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31098  fi
31099
31100    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31101
31102  path="$IMPORT_MODULES_TOPDIR"
31103  has_colon=`$ECHO $path | $GREP ^.:`
31104  new_path="$path"
31105  if test "x$has_colon" = x; then
31106    # Not in mixed or Windows style, start by that.
31107    new_path=`cmd //c echo $path`
31108  fi
31109
31110
31111  input_path="$new_path"
31112  # Check if we need to convert this using DOS-style short mode. If the path
31113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31114  # take no chances and rewrite it.
31115  # Note: m4 eats our [], so we need to use [ and ] instead.
31116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31117  if test "x$has_forbidden_chars" != x; then
31118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31120  fi
31121
31122
31123  windows_path="$new_path"
31124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31125    unix_path=`$CYGPATH -u "$windows_path"`
31126    new_path="$unix_path"
31127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31129    new_path="$unix_path"
31130  fi
31131
31132  if test "x$path" != "x$new_path"; then
31133    IMPORT_MODULES_TOPDIR="$new_path"
31134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31135$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31136  fi
31137
31138  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31139  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31140
31141    else
31142      # We're on a unix platform. Hooray! :)
31143      path="$IMPORT_MODULES_TOPDIR"
31144      has_space=`$ECHO "$path" | $GREP " "`
31145      if test "x$has_space" != x; then
31146        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31147$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31148        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31149      fi
31150
31151      # Use eval to expand a potential ~
31152      eval path="$path"
31153      if test ! -f "$path" && test ! -d "$path"; then
31154        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31155      fi
31156
31157      if test -d "$path"; then
31158        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31159      else
31160        dir="`$DIRNAME "$path"`"
31161        base="`$BASENAME "$path"`"
31162        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31163      fi
31164    fi
31165  fi
31166
31167    elif test -e "$with_import_modules"; then
31168      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31169      $RM -rf "$IMPORT_MODULES_TOPDIR"
31170      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31171      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31172        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31173      fi
31174    else
31175      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31176    fi
31177  fi
31178
31179  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31180    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31181  fi
31182  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31183    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31184  fi
31185  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31186    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31187  fi
31188  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31189    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31190  fi
31191  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31192    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31193  fi
31194  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31195    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31196  fi
31197  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31198    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31199  fi
31200  # Workaround for using different imported module-info.java in Jake due to a
31201  # change in format. Remove once new format is standard in JDK 9 and javafx
31202  # delivers just that.
31203  if test -d "$IMPORT_MODULES_TOPDIR/modules_src_jake"; then
31204    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src_jake $IMPORT_MODULES_SRC"
31205  fi
31206  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31207    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31208  fi
31209
31210
31211
31212
31213
31214
31215
31216
31217
31218
31219
31220###############################################################################
31221#
31222# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31223# native code.
31224#
31225###############################################################################
31226
31227# See if we are doing a complete static build or not
31228
31229  # Check whether --enable-static-build was given.
31230if test "${enable_static_build+set}" = set; then :
31231  enableval=$enable_static_build;
31232fi
31233
31234  STATIC_BUILD=false
31235  if test "x$enable_static_build" = "xyes"; then
31236    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31237$as_echo_n "checking if static build is enabled... " >&6; }
31238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31239$as_echo "yes" >&6; }
31240    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31241      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31242    fi
31243    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31244    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31245    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31246    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31247    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31248    STATIC_BUILD=true
31249  elif test "x$enable_static_build" = "xno"; then
31250    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31251$as_echo_n "checking if static build is enabled... " >&6; }
31252    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31253$as_echo "no" >&6; }
31254  elif test "x$enable_static_build" != "x"; then
31255    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31256  fi
31257
31258
31259
31260
31261# First determine the toolchain type (compiler family)
31262
31263
31264# Check whether --with-toolchain-type was given.
31265if test "${with_toolchain_type+set}" = set; then :
31266  withval=$with_toolchain_type;
31267fi
31268
31269
31270  # Use indirect variable referencing
31271  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31272  VALID_TOOLCHAINS=${!toolchain_var_name}
31273
31274  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31275    if test -n "$XCODEBUILD"; then
31276      # On Mac OS X, default toolchain to clang after Xcode 5
31277      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31278      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31279      if test $? -ne 0; then
31280        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31281      fi
31282      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31283          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31284          $CUT -f 1 -d .`
31285      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31286$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31287      if test $XCODE_MAJOR_VERSION -ge 5; then
31288          DEFAULT_TOOLCHAIN="clang"
31289      else
31290          DEFAULT_TOOLCHAIN="gcc"
31291      fi
31292    else
31293      # If Xcode is not installed, but the command line tools are
31294      # then we can't run xcodebuild. On these systems we should
31295      # default to clang
31296      DEFAULT_TOOLCHAIN="clang"
31297    fi
31298  else
31299    # First toolchain type in the list is the default
31300    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31301  fi
31302
31303  if test "x$with_toolchain_type" = xlist; then
31304    # List all toolchains
31305    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31306$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31307    for toolchain in $VALID_TOOLCHAINS; do
31308      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31309      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31310      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31311    done
31312
31313    exit 0
31314  elif test "x$with_toolchain_type" != x; then
31315    # User override; check that it is valid
31316    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31317      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31318$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31319      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31320$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31321      as_fn_error $? "Cannot continue." "$LINENO" 5
31322    fi
31323    TOOLCHAIN_TYPE=$with_toolchain_type
31324  else
31325    # No flag given, use default
31326    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31327  fi
31328
31329
31330  TOOLCHAIN_CC_BINARY_clang="clang"
31331  TOOLCHAIN_CC_BINARY_gcc="gcc"
31332  TOOLCHAIN_CC_BINARY_microsoft="cl"
31333  TOOLCHAIN_CC_BINARY_solstudio="cc"
31334  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31335
31336  TOOLCHAIN_CXX_BINARY_clang="clang++"
31337  TOOLCHAIN_CXX_BINARY_gcc="g++"
31338  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31339  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31340  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31341
31342  # Use indirect variable referencing
31343  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31344  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31345  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31346  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31347  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31348  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31349  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31350  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31351
31352
31353  # Define filename patterns
31354  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31355    LIBRARY_PREFIX=
31356    SHARED_LIBRARY_SUFFIX='.dll'
31357    STATIC_LIBRARY_SUFFIX='.lib'
31358    SHARED_LIBRARY='$1.dll'
31359    STATIC_LIBRARY='$1.lib'
31360    OBJ_SUFFIX='.obj'
31361    EXE_SUFFIX='.exe'
31362  else
31363    LIBRARY_PREFIX=lib
31364    SHARED_LIBRARY_SUFFIX='.so'
31365    STATIC_LIBRARY_SUFFIX='.a'
31366    SHARED_LIBRARY='lib$1.so'
31367    STATIC_LIBRARY='lib$1.a'
31368    OBJ_SUFFIX='.o'
31369    EXE_SUFFIX=''
31370    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31371      # For full static builds, we're overloading the SHARED_LIBRARY
31372      # variables in order to limit the amount of changes required.
31373      # It would be better to remove SHARED and just use LIBRARY and
31374      # LIBRARY_SUFFIX for libraries that can be built either
31375      # shared or static and use STATIC_* for libraries that are
31376      # always built statically.
31377      if test "x$STATIC_BUILD" = xtrue; then
31378        SHARED_LIBRARY='lib$1.a'
31379        SHARED_LIBRARY_SUFFIX='.a'
31380      else
31381        SHARED_LIBRARY='lib$1.dylib'
31382        SHARED_LIBRARY_SUFFIX='.dylib'
31383      fi
31384    fi
31385  fi
31386
31387
31388
31389
31390
31391
31392
31393
31394
31395
31396  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31397    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31398$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31399  else
31400    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31401$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31402  fi
31403
31404
31405# User supplied flags should be used when configure detects compilers
31406
31407  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31408    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31409$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31410  fi
31411
31412  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31413    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31414$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31415  fi
31416
31417  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31418    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31419$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31420  fi
31421
31422
31423# Check whether --with-extra-cflags was given.
31424if test "${with_extra_cflags+set}" = set; then :
31425  withval=$with_extra_cflags;
31426fi
31427
31428
31429
31430# Check whether --with-extra-cxxflags was given.
31431if test "${with_extra_cxxflags+set}" = set; then :
31432  withval=$with_extra_cxxflags;
31433fi
31434
31435
31436
31437# Check whether --with-extra-ldflags was given.
31438if test "${with_extra_ldflags+set}" = set; then :
31439  withval=$with_extra_ldflags;
31440fi
31441
31442
31443  EXTRA_CFLAGS="$with_extra_cflags"
31444  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31445  EXTRA_LDFLAGS="$with_extra_ldflags"
31446
31447  # Hotspot needs these set in their legacy form
31448  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31449  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31450  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31451
31452
31453
31454
31455
31456
31457
31458
31459
31460  # The global CFLAGS and LDLAGS variables are used by configure tests and
31461  # should include the extra parameters
31462  CFLAGS="$EXTRA_CFLAGS"
31463  CXXFLAGS="$EXTRA_CXXFLAGS"
31464  LDFLAGS="$EXTRA_LDFLAGS"
31465  CPPFLAGS=""
31466
31467# The sysroot cflags are needed for configure to be able to run the compilers
31468
31469  if test "x$SYSROOT" != "x"; then
31470    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31471      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31472        # Solaris Studio does not have a concept of sysroot. Instead we must
31473        # make sure the default include and lib dirs are appended to each
31474        # compile and link command line. Must also add -I-xbuiltin to enable
31475        # inlining of system functions and intrinsics.
31476        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31477        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31478            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31479      fi
31480    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31481      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31482      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31483    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31484      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31485      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31486    fi
31487    # Propagate the sysroot args to hotspot
31488    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31489    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31490    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31491    # The global CFLAGS and LDFLAGS variables need these for configure to function
31492    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31493    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31494    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31495    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31496  fi
31497
31498  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31499    # We also need -iframework<path>/System/Library/Frameworks
31500    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31501    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31502    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31503    # set this here so it doesn't have to be peppered throughout the forest
31504    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31505    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31506  fi
31507
31508
31509
31510
31511
31512# Then detect the actual binaries needed
31513
31514  # FIXME: Is this needed?
31515  ac_ext=cpp
31516ac_cpp='$CXXCPP $CPPFLAGS'
31517ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31518ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31519ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31520
31521
31522  # Store the CFLAGS etc passed to the configure script.
31523  ORG_CFLAGS="$CFLAGS"
31524  ORG_CXXFLAGS="$CXXFLAGS"
31525
31526  # autoconf magic only relies on PATH, so update it if tools dir is specified
31527  OLD_PATH="$PATH"
31528
31529  # On Windows, we need to detect the visual studio installation first.
31530  # This will change the PATH, but we need to keep that new PATH even
31531  # after toolchain detection is done, since the compiler (on x86) uses
31532  # it for DLL resolution in runtime.
31533  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31534      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31535
31536  # Store path to cygwin link.exe to help excluding it when searching for
31537  # VS linker. This must be done before changing the PATH when looking for VS.
31538  # Extract the first word of "link", so it can be a program name with args.
31539set dummy link; ac_word=$2
31540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31541$as_echo_n "checking for $ac_word... " >&6; }
31542if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31543  $as_echo_n "(cached) " >&6
31544else
31545  case $CYGWIN_LINK in
31546  [\\/]* | ?:[\\/]*)
31547  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31548  ;;
31549  *)
31550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31551for as_dir in $PATH
31552do
31553  IFS=$as_save_IFS
31554  test -z "$as_dir" && as_dir=.
31555    for ac_exec_ext in '' $ac_executable_extensions; do
31556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31557    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31559    break 2
31560  fi
31561done
31562  done
31563IFS=$as_save_IFS
31564
31565  ;;
31566esac
31567fi
31568CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31569if test -n "$CYGWIN_LINK"; then
31570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31571$as_echo "$CYGWIN_LINK" >&6; }
31572else
31573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31574$as_echo "no" >&6; }
31575fi
31576
31577
31578  if test "x$CYGWIN_LINK" != x; then
31579    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31580$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31581    "$CYGWIN_LINK" --version > /dev/null
31582    if test $? -eq 0 ; then
31583      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31584$as_echo "yes" >&6; }
31585    else
31586      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31587$as_echo "no" >&6; }
31588      # This might be the VS linker. Don't exclude it later on.
31589      CYGWIN_LINK=""
31590    fi
31591  fi
31592
31593  # First-hand choice is to locate and run the vsvars bat file.
31594
31595
31596# Check whether --with-toolchain-version was given.
31597if test "${with_toolchain_version+set}" = set; then :
31598  withval=$with_toolchain_version;
31599fi
31600
31601
31602  if test "x$with_toolchain_version" = xlist; then
31603    # List all toolchains
31604    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31605$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31606    for version in $VALID_VS_VERSIONS; do
31607      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31608      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31609    done
31610
31611    exit 0
31612  elif test "x$DEVKIT_VS_VERSION" != x; then
31613    VS_VERSION=$DEVKIT_VS_VERSION
31614    TOOLCHAIN_VERSION=$VS_VERSION
31615    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31616    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31617    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31618    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31619    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31620    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31621
31622    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31623    # can still be exported as INCLUDE for compiler invocations without
31624    # SYSROOT_CFLAGS
31625    OLDIFS="$IFS"
31626    IFS=";"
31627    for i in $DEVKIT_VS_INCLUDE; do
31628      ipath=$i
31629
31630  unix_path="$ipath"
31631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31632    windows_path=`$CYGPATH -m "$unix_path"`
31633    ipath="$windows_path"
31634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31635    windows_path=`cmd //c echo $unix_path`
31636    ipath="$windows_path"
31637  fi
31638
31639      VS_INCLUDE="$VS_INCLUDE;$ipath"
31640    done
31641    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31642    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31643    for i in $DEVKIT_VS_LIB; do
31644      libpath=$i
31645
31646  unix_path="$libpath"
31647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31648    windows_path=`$CYGPATH -m "$unix_path"`
31649    libpath="$windows_path"
31650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31651    windows_path=`cmd //c echo $unix_path`
31652    libpath="$windows_path"
31653  fi
31654
31655      VS_LIB="$VS_LIB;$libpath"
31656    done
31657    IFS="$OLDIFS"
31658
31659    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31660$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31661
31662  elif test "x$with_toolchain_version" != x; then
31663    # User override; check that it is valid
31664    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31665      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31666$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31667      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31668$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31669      as_fn_error $? "Cannot continue." "$LINENO" 5
31670    fi
31671    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31672  else
31673    # No flag given, use default
31674    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31675  fi
31676
31677  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31678
31679  VS_VERSION="$VS_VERSION"
31680  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31681  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31682  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31683  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31684
31685  # When using --with-tools-dir, assume it points to the correct and default
31686  # version of Visual Studio or that --with-toolchain-version was also set.
31687  if test "x$with_tools_dir" != x; then
31688
31689  if test "x$VS_ENV_CMD" = x; then
31690    VS_VERSION="${VS_VERSION}"
31691    VS_BASE="$with_tools_dir/../.."
31692    METHOD="--with-tools-dir"
31693
31694    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31695      VCVARSFILE="vc/bin/vcvars32.bat"
31696    else
31697      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31698    fi
31699
31700
31701  windows_path="$VS_BASE"
31702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31703    unix_path=`$CYGPATH -u "$windows_path"`
31704    VS_BASE="$unix_path"
31705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31707    VS_BASE="$unix_path"
31708  fi
31709
31710    if test -d "$VS_BASE"; then
31711      if test -f "$VS_BASE/$VCVARSFILE"; then
31712        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31713$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31714        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31715        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31716        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31717        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31718      else
31719        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31720$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31721        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31722$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31723      fi
31724    fi
31725  fi
31726
31727
31728  if test "x$VS_ENV_CMD" = x; then
31729    VS_VERSION="${VS_VERSION}"
31730    VS_BASE="$with_tools_dir/../../.."
31731    METHOD="--with-tools-dir"
31732
31733    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31734      VCVARSFILE="vc/bin/vcvars32.bat"
31735    else
31736      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31737    fi
31738
31739
31740  windows_path="$VS_BASE"
31741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31742    unix_path=`$CYGPATH -u "$windows_path"`
31743    VS_BASE="$unix_path"
31744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31746    VS_BASE="$unix_path"
31747  fi
31748
31749    if test -d "$VS_BASE"; then
31750      if test -f "$VS_BASE/$VCVARSFILE"; then
31751        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31752$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31753        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31754        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31755        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31756        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31757      else
31758        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31759$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31760        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31761$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31762      fi
31763    fi
31764  fi
31765
31766    if test "x$VS_ENV_CMD" = x; then
31767      # Having specified an argument which is incorrect will produce an instant failure;
31768      # we should not go on looking
31769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31770$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31771      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31772$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31773      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31774$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31775      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31776    fi
31777  fi
31778
31779  VS_ENV_CMD=""
31780  VS_ENV_ARGS=""
31781
31782  if test "x$VS_COMNTOOLS" != x; then
31783
31784  if test "x$VS_ENV_CMD" = x; then
31785    VS_VERSION="${VS_VERSION}"
31786    VS_BASE="$VS_COMNTOOLS/../.."
31787    METHOD="$VS_COMNTOOLS_VAR variable"
31788
31789    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31790      VCVARSFILE="vc/bin/vcvars32.bat"
31791    else
31792      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31793    fi
31794
31795
31796  windows_path="$VS_BASE"
31797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31798    unix_path=`$CYGPATH -u "$windows_path"`
31799    VS_BASE="$unix_path"
31800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31802    VS_BASE="$unix_path"
31803  fi
31804
31805    if test -d "$VS_BASE"; then
31806      if test -f "$VS_BASE/$VCVARSFILE"; then
31807        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31808$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31809        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31810        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31811        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31812        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31813      else
31814        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31815$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31816        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31817$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31818      fi
31819    fi
31820  fi
31821
31822  fi
31823  if test "x$PROGRAMFILES" != x; then
31824
31825  if test "x$VS_ENV_CMD" = x; then
31826    VS_VERSION="${VS_VERSION}"
31827    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31828    METHOD="well-known name"
31829
31830    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31831      VCVARSFILE="vc/bin/vcvars32.bat"
31832    else
31833      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31834    fi
31835
31836
31837  windows_path="$VS_BASE"
31838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31839    unix_path=`$CYGPATH -u "$windows_path"`
31840    VS_BASE="$unix_path"
31841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31843    VS_BASE="$unix_path"
31844  fi
31845
31846    if test -d "$VS_BASE"; then
31847      if test -f "$VS_BASE/$VCVARSFILE"; then
31848        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31849$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31850        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31851        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31852        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31853        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31854      else
31855        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31856$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31857        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31858$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31859      fi
31860    fi
31861  fi
31862
31863  fi
31864  # Work around the insanely named ProgramFiles(x86) env variable
31865  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31866  if test "x$PROGRAMFILES_X86" != x; then
31867
31868  if test "x$VS_ENV_CMD" = x; then
31869    VS_VERSION="${VS_VERSION}"
31870    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31871    METHOD="well-known name"
31872
31873    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31874      VCVARSFILE="vc/bin/vcvars32.bat"
31875    else
31876      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31877    fi
31878
31879
31880  windows_path="$VS_BASE"
31881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31882    unix_path=`$CYGPATH -u "$windows_path"`
31883    VS_BASE="$unix_path"
31884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31886    VS_BASE="$unix_path"
31887  fi
31888
31889    if test -d "$VS_BASE"; then
31890      if test -f "$VS_BASE/$VCVARSFILE"; then
31891        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31892$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31893        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31894        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31895        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31896        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31897      else
31898        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31899$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31900        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31901$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31902      fi
31903    fi
31904  fi
31905
31906  fi
31907
31908  if test "x$VS_ENV_CMD" = x; then
31909    VS_VERSION="${VS_VERSION}"
31910    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31911    METHOD="well-known name"
31912
31913    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31914      VCVARSFILE="vc/bin/vcvars32.bat"
31915    else
31916      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31917    fi
31918
31919
31920  windows_path="$VS_BASE"
31921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31922    unix_path=`$CYGPATH -u "$windows_path"`
31923    VS_BASE="$unix_path"
31924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31926    VS_BASE="$unix_path"
31927  fi
31928
31929    if test -d "$VS_BASE"; then
31930      if test -f "$VS_BASE/$VCVARSFILE"; then
31931        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31932$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31933        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31934        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31935        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31936        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31937      else
31938        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31939$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31940        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31941$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31942      fi
31943    fi
31944  fi
31945
31946
31947  if test "x$VS_ENV_CMD" = x; then
31948    VS_VERSION="${VS_VERSION}"
31949    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31950    METHOD="well-known name"
31951
31952    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31953      VCVARSFILE="vc/bin/vcvars32.bat"
31954    else
31955      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31956    fi
31957
31958
31959  windows_path="$VS_BASE"
31960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31961    unix_path=`$CYGPATH -u "$windows_path"`
31962    VS_BASE="$unix_path"
31963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31965    VS_BASE="$unix_path"
31966  fi
31967
31968    if test -d "$VS_BASE"; then
31969      if test -f "$VS_BASE/$VCVARSFILE"; then
31970        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31971$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31972        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31973        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31974        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31975        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31976      else
31977        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31978$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31979        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31980$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31981      fi
31982    fi
31983  fi
31984
31985
31986  if test "x$SDK_INSTALL_DIR" != x; then
31987    if test "x$ProgramW6432" != x; then
31988
31989  if test "x$VS_ENV_CMD" = x; then
31990    VS_VERSION="${VS_VERSION}"
31991    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31992    METHOD="well-known name"
31993
31994  windows_path="$WIN_SDK_BASE"
31995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31996    unix_path=`$CYGPATH -u "$windows_path"`
31997    WIN_SDK_BASE="$unix_path"
31998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32000    WIN_SDK_BASE="$unix_path"
32001  fi
32002
32003    if test -d "$WIN_SDK_BASE"; then
32004      # There have been cases of partial or broken SDK installations. A missing
32005      # lib dir is not going to work.
32006      if test ! -d "$WIN_SDK_BASE/lib"; then
32007        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32008$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32009        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32010$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32011      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32012        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32013$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32014        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32015        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32016          VS_ENV_ARGS="/x86"
32017        else
32018          VS_ENV_ARGS="/x64"
32019        fi
32020        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32021        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32022        # TODO: improve detection for other versions of SDK
32023        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32024      else
32025        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32026$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32027        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32028$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32029      fi
32030    fi
32031  fi
32032
32033    fi
32034    if test "x$PROGRAMW6432" != x; then
32035
32036  if test "x$VS_ENV_CMD" = x; then
32037    VS_VERSION="${VS_VERSION}"
32038    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32039    METHOD="well-known name"
32040
32041  windows_path="$WIN_SDK_BASE"
32042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32043    unix_path=`$CYGPATH -u "$windows_path"`
32044    WIN_SDK_BASE="$unix_path"
32045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32047    WIN_SDK_BASE="$unix_path"
32048  fi
32049
32050    if test -d "$WIN_SDK_BASE"; then
32051      # There have been cases of partial or broken SDK installations. A missing
32052      # lib dir is not going to work.
32053      if test ! -d "$WIN_SDK_BASE/lib"; then
32054        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32055$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32056        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32057$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32058      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32059        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32060$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32061        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32062        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32063          VS_ENV_ARGS="/x86"
32064        else
32065          VS_ENV_ARGS="/x64"
32066        fi
32067        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32068        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32069        # TODO: improve detection for other versions of SDK
32070        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32071      else
32072        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32073$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32074        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32075$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32076      fi
32077    fi
32078  fi
32079
32080    fi
32081    if test "x$PROGRAMFILES" != x; then
32082
32083  if test "x$VS_ENV_CMD" = x; then
32084    VS_VERSION="${VS_VERSION}"
32085    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32086    METHOD="well-known name"
32087
32088  windows_path="$WIN_SDK_BASE"
32089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32090    unix_path=`$CYGPATH -u "$windows_path"`
32091    WIN_SDK_BASE="$unix_path"
32092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32094    WIN_SDK_BASE="$unix_path"
32095  fi
32096
32097    if test -d "$WIN_SDK_BASE"; then
32098      # There have been cases of partial or broken SDK installations. A missing
32099      # lib dir is not going to work.
32100      if test ! -d "$WIN_SDK_BASE/lib"; then
32101        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32102$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32103        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32104$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32105      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32106        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32107$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32108        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32109        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32110          VS_ENV_ARGS="/x86"
32111        else
32112          VS_ENV_ARGS="/x64"
32113        fi
32114        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32115        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32116        # TODO: improve detection for other versions of SDK
32117        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32118      else
32119        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32120$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32121        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32122$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32123      fi
32124    fi
32125  fi
32126
32127    fi
32128
32129  if test "x$VS_ENV_CMD" = x; then
32130    VS_VERSION="${VS_VERSION}"
32131    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32132    METHOD="well-known name"
32133
32134  windows_path="$WIN_SDK_BASE"
32135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32136    unix_path=`$CYGPATH -u "$windows_path"`
32137    WIN_SDK_BASE="$unix_path"
32138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32140    WIN_SDK_BASE="$unix_path"
32141  fi
32142
32143    if test -d "$WIN_SDK_BASE"; then
32144      # There have been cases of partial or broken SDK installations. A missing
32145      # lib dir is not going to work.
32146      if test ! -d "$WIN_SDK_BASE/lib"; then
32147        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32148$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32149        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32150$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32151      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32152        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32153$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32154        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32155        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32156          VS_ENV_ARGS="/x86"
32157        else
32158          VS_ENV_ARGS="/x64"
32159        fi
32160        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32161        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32162        # TODO: improve detection for other versions of SDK
32163        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32164      else
32165        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32166$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32167        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32168$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32169      fi
32170    fi
32171  fi
32172
32173
32174  if test "x$VS_ENV_CMD" = x; then
32175    VS_VERSION="${VS_VERSION}"
32176    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32177    METHOD="well-known name"
32178
32179  windows_path="$WIN_SDK_BASE"
32180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32181    unix_path=`$CYGPATH -u "$windows_path"`
32182    WIN_SDK_BASE="$unix_path"
32183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32185    WIN_SDK_BASE="$unix_path"
32186  fi
32187
32188    if test -d "$WIN_SDK_BASE"; then
32189      # There have been cases of partial or broken SDK installations. A missing
32190      # lib dir is not going to work.
32191      if test ! -d "$WIN_SDK_BASE/lib"; then
32192        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32193$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32194        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32195$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32196      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32197        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32198$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32199        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32200        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32201          VS_ENV_ARGS="/x86"
32202        else
32203          VS_ENV_ARGS="/x64"
32204        fi
32205        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32206        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32207        # TODO: improve detection for other versions of SDK
32208        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32209      else
32210        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32211$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32212        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32213$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32214      fi
32215    fi
32216  fi
32217
32218  fi
32219
32220    if test "x$VS_ENV_CMD" != x; then
32221      TOOLCHAIN_VERSION=$VS_VERSION
32222      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32223      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32224      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32225      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32226      # The rest of the variables are already evaled while probing
32227      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32228$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32229      break
32230    fi
32231  done
32232
32233
32234  # If we have a devkit, skip all of the below.
32235  if test "x$DEVKIT_VS_VERSION" = x; then
32236    if test "x$VS_ENV_CMD" != x; then
32237      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32238
32239  # Only process if variable expands to non-empty
32240
32241  if test "x$VS_ENV_CMD" != x; then
32242    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32243
32244  # First separate the path from the arguments. This will split at the first
32245  # space.
32246  complete="$VS_ENV_CMD"
32247  path="${complete%% *}"
32248  tmp="$complete EOL"
32249  arguments="${tmp#* }"
32250
32251  # Input might be given as Windows format, start by converting to
32252  # unix format.
32253  new_path=`$CYGPATH -u "$path"`
32254
32255  # Now try to locate executable using which
32256  new_path=`$WHICH "$new_path" 2> /dev/null`
32257  # bat and cmd files are not always considered executable in cygwin causing which
32258  # to not find them
32259  if test "x$new_path" = x \
32260      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32261      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32262    new_path=`$CYGPATH -u "$path"`
32263  fi
32264  if test "x$new_path" = x; then
32265    # Oops. Which didn't find the executable.
32266    # The splitting of arguments from the executable at a space might have been incorrect,
32267    # since paths with space are more likely in Windows. Give it another try with the whole
32268    # argument.
32269    path="$complete"
32270    arguments="EOL"
32271    new_path=`$CYGPATH -u "$path"`
32272    new_path=`$WHICH "$new_path" 2> /dev/null`
32273    # bat and cmd files are not always considered executable in cygwin causing which
32274    # to not find them
32275    if test "x$new_path" = x \
32276        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32277        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32278      new_path=`$CYGPATH -u "$path"`
32279    fi
32280    if test "x$new_path" = x; then
32281      # It's still not found. Now this is an unrecoverable error.
32282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32283$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32284      has_space=`$ECHO "$complete" | $GREP " "`
32285      if test "x$has_space" != x; then
32286        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32287$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32288      fi
32289      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32290    fi
32291  fi
32292
32293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32296  # "foo.exe" is OK but "foo" is an error.
32297  #
32298  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32299  # It is also a way to make sure we got the proper file name for the real test later on.
32300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32301  if test "x$test_shortpath" = x; then
32302    # Short path failed, file does not exist as specified.
32303    # Try adding .exe or .cmd
32304    if test -f "${new_path}.exe"; then
32305      input_to_shortpath="${new_path}.exe"
32306    elif test -f "${new_path}.cmd"; then
32307      input_to_shortpath="${new_path}.cmd"
32308    else
32309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32310$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32311      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32312$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32313      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32314    fi
32315  else
32316    input_to_shortpath="$new_path"
32317  fi
32318
32319  # Call helper function which possibly converts this using DOS-style short mode.
32320  # If so, the updated path is stored in $new_path.
32321  new_path="$input_to_shortpath"
32322
32323  input_path="$input_to_shortpath"
32324  # Check if we need to convert this using DOS-style short mode. If the path
32325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32326  # take no chances and rewrite it.
32327  # Note: m4 eats our [], so we need to use [ and ] instead.
32328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32329  if test "x$has_forbidden_chars" != x; then
32330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32334      # Going to short mode and back again did indeed matter. Since short mode is
32335      # case insensitive, let's make it lowercase to improve readability.
32336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32337      # Now convert it back to Unix-style (cygpath)
32338      input_path=`$CYGPATH -u "$shortmode_path"`
32339      new_path="$input_path"
32340    fi
32341  fi
32342
32343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32344  if test "x$test_cygdrive_prefix" = x; then
32345    # As a simple fix, exclude /usr/bin since it's not a real path.
32346    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32348      # a path prefixed by /cygdrive for fixpath to work.
32349      new_path="$CYGWIN_ROOT_PATH$input_path"
32350    fi
32351  fi
32352
32353  # remove trailing .exe if any
32354  new_path="${new_path/%.exe/}"
32355
32356    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32357
32358  # First separate the path from the arguments. This will split at the first
32359  # space.
32360  complete="$VS_ENV_CMD"
32361  path="${complete%% *}"
32362  tmp="$complete EOL"
32363  arguments="${tmp#* }"
32364
32365  # Input might be given as Windows format, start by converting to
32366  # unix format.
32367  new_path="$path"
32368
32369  windows_path="$new_path"
32370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32371    unix_path=`$CYGPATH -u "$windows_path"`
32372    new_path="$unix_path"
32373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32375    new_path="$unix_path"
32376  fi
32377
32378
32379  # Now try to locate executable using which
32380  new_path=`$WHICH "$new_path" 2> /dev/null`
32381
32382  if test "x$new_path" = x; then
32383    # Oops. Which didn't find the executable.
32384    # The splitting of arguments from the executable at a space might have been incorrect,
32385    # since paths with space are more likely in Windows. Give it another try with the whole
32386    # argument.
32387    path="$complete"
32388    arguments="EOL"
32389    new_path="$path"
32390
32391  windows_path="$new_path"
32392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32393    unix_path=`$CYGPATH -u "$windows_path"`
32394    new_path="$unix_path"
32395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32397    new_path="$unix_path"
32398  fi
32399
32400
32401    new_path=`$WHICH "$new_path" 2> /dev/null`
32402    # bat and cmd files are not always considered executable in MSYS causing which
32403    # to not find them
32404    if test "x$new_path" = x \
32405        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32406        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32407      new_path="$path"
32408
32409  windows_path="$new_path"
32410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32411    unix_path=`$CYGPATH -u "$windows_path"`
32412    new_path="$unix_path"
32413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32415    new_path="$unix_path"
32416  fi
32417
32418    fi
32419
32420    if test "x$new_path" = x; then
32421      # It's still not found. Now this is an unrecoverable error.
32422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32423$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32424      has_space=`$ECHO "$complete" | $GREP " "`
32425      if test "x$has_space" != x; then
32426        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32427$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32428      fi
32429      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32430    fi
32431  fi
32432
32433  # Now new_path has a complete unix path to the binary
32434  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32435    # Keep paths in /bin as-is, but remove trailing .exe if any
32436    new_path="${new_path/%.exe/}"
32437    # Do not save /bin paths to all_fixpath_prefixes!
32438  else
32439    # Not in mixed or Windows style, start by that.
32440    new_path=`cmd //c echo $new_path`
32441
32442  input_path="$new_path"
32443  # Check if we need to convert this using DOS-style short mode. If the path
32444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32445  # take no chances and rewrite it.
32446  # Note: m4 eats our [], so we need to use [ and ] instead.
32447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32448  if test "x$has_forbidden_chars" != x; then
32449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32451  fi
32452
32453    # Output is in $new_path
32454
32455  windows_path="$new_path"
32456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32457    unix_path=`$CYGPATH -u "$windows_path"`
32458    new_path="$unix_path"
32459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32461    new_path="$unix_path"
32462  fi
32463
32464    # remove trailing .exe if any
32465    new_path="${new_path/%.exe/}"
32466
32467    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32468    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32469  fi
32470
32471    else
32472      # We're on a unix platform. Hooray! :)
32473      # First separate the path from the arguments. This will split at the first
32474      # space.
32475      complete="$VS_ENV_CMD"
32476      path="${complete%% *}"
32477      tmp="$complete EOL"
32478      arguments="${tmp#* }"
32479
32480      # Cannot rely on the command "which" here since it doesn't always work.
32481      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32482      if test -z "$is_absolute_path"; then
32483        # Path to executable is not absolute. Find it.
32484        IFS_save="$IFS"
32485        IFS=:
32486        for p in $PATH; do
32487          if test -f "$p/$path" && test -x "$p/$path"; then
32488            new_path="$p/$path"
32489            break
32490          fi
32491        done
32492        IFS="$IFS_save"
32493      else
32494        # This is an absolute path, we can use it without further modifications.
32495        new_path="$path"
32496      fi
32497
32498      if test "x$new_path" = x; then
32499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32500$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32501        has_space=`$ECHO "$complete" | $GREP " "`
32502        if test "x$has_space" != x; then
32503          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32504$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32505        fi
32506        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32507      fi
32508    fi
32509
32510    # Now join together the path and the arguments once again
32511    if test "x$arguments" != xEOL; then
32512      new_complete="$new_path ${arguments% *}"
32513    else
32514      new_complete="$new_path"
32515    fi
32516
32517    if test "x$complete" != "x$new_complete"; then
32518      VS_ENV_CMD="$new_complete"
32519      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32520$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32521    fi
32522  fi
32523
32524
32525      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32526      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32527$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32528
32529      # We need to create a couple of temporary files.
32530      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32531      $MKDIR -p $VS_ENV_TMP_DIR
32532
32533      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32534      # Instead create a shell script which will set the relevant variables when run.
32535      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32536
32537  unix_path="$WINPATH_VS_ENV_CMD"
32538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32539    windows_path=`$CYGPATH -m "$unix_path"`
32540    WINPATH_VS_ENV_CMD="$windows_path"
32541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32542    windows_path=`cmd //c echo $unix_path`
32543    WINPATH_VS_ENV_CMD="$windows_path"
32544  fi
32545
32546      WINPATH_BASH="$BASH"
32547
32548  unix_path="$WINPATH_BASH"
32549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32550    windows_path=`$CYGPATH -m "$unix_path"`
32551    WINPATH_BASH="$windows_path"
32552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32553    windows_path=`cmd //c echo $unix_path`
32554    WINPATH_BASH="$windows_path"
32555  fi
32556
32557
32558      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32559      # script (executable by bash) that will setup the important variables.
32560      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32561      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32562      # This will end up something like:
32563      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32564      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32565      # These will end up something like:
32566      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32567      # The trailing space for everyone except PATH is no typo, but is needed due
32568      # to trailing \ in the Windows paths. These will be stripped later.
32569      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32570          >> $EXTRACT_VC_ENV_BAT_FILE
32571      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32572          >> $EXTRACT_VC_ENV_BAT_FILE
32573      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32574          >> $EXTRACT_VC_ENV_BAT_FILE
32575      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32576          >> $EXTRACT_VC_ENV_BAT_FILE
32577      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32578          >> $EXTRACT_VC_ENV_BAT_FILE
32579      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32580          >> $EXTRACT_VC_ENV_BAT_FILE
32581
32582      # Now execute the newly created bat file.
32583      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32584      # Change directory so we don't need to mess with Windows paths in redirects.
32585      cd $VS_ENV_TMP_DIR
32586      cmd /c extract-vs-env.bat | $CAT
32587      cd $CURDIR
32588
32589      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32590        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32591$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32592        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32593$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32594        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32595$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32596        as_fn_error $? "Cannot continue" "$LINENO" 5
32597      fi
32598
32599      # Now set all paths and other env variables. This will allow the rest of
32600      # the configure script to find and run the compiler in the proper way.
32601      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32602$as_echo "$as_me: Setting extracted environment variables" >&6;}
32603      . $VS_ENV_TMP_DIR/set-vs-env.sh
32604      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32605      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32606    else
32607      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32608      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32609$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32610    fi
32611  fi
32612
32613  # At this point, we should have correct variables in the environment, or we can't continue.
32614  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32615$as_echo_n "checking for Visual Studio variables... " >&6; }
32616
32617  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32618      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32619    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32620      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32621$as_echo "present but broken" >&6; }
32622      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32623    else
32624      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32625$as_echo "ok" >&6; }
32626      # Remove any trailing "\" ";" and " " from the variables.
32627      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32628      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32629      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32630      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32631      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32632      # Remove any paths containing # (typically F#) as that messes up make. This
32633      # is needed if visual studio was installed with F# support.
32634      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32635
32636
32637
32638
32639
32640      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32641      OLDIFS="$IFS"
32642      IFS=";"
32643      for i in $VS_INCLUDE; do
32644        ipath=$i
32645        # Only process non-empty elements
32646        if test "x$ipath" != x; then
32647          IFS="$OLDIFS"
32648          # Check that directory exists before calling fixup_path
32649          testpath=$ipath
32650
32651  windows_path="$testpath"
32652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32653    unix_path=`$CYGPATH -u "$windows_path"`
32654    testpath="$unix_path"
32655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32657    testpath="$unix_path"
32658  fi
32659
32660          if test -d "$testpath"; then
32661
32662  # Only process if variable expands to non-empty
32663
32664  if test "x$ipath" != x; then
32665    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32666
32667  # Input might be given as Windows format, start by converting to
32668  # unix format.
32669  path="$ipath"
32670  new_path=`$CYGPATH -u "$path"`
32671
32672  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32673  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32674  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32675  # "foo.exe" is OK but "foo" is an error.
32676  #
32677  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32678  # It is also a way to make sure we got the proper file name for the real test later on.
32679  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32680  if test "x$test_shortpath" = x; then
32681    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32682$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32683    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32684  fi
32685
32686  # Call helper function which possibly converts this using DOS-style short mode.
32687  # If so, the updated path is stored in $new_path.
32688
32689  input_path="$new_path"
32690  # Check if we need to convert this using DOS-style short mode. If the path
32691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32692  # take no chances and rewrite it.
32693  # Note: m4 eats our [], so we need to use [ and ] instead.
32694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32695  if test "x$has_forbidden_chars" != x; then
32696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32700      # Going to short mode and back again did indeed matter. Since short mode is
32701      # case insensitive, let's make it lowercase to improve readability.
32702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32703      # Now convert it back to Unix-style (cygpath)
32704      input_path=`$CYGPATH -u "$shortmode_path"`
32705      new_path="$input_path"
32706    fi
32707  fi
32708
32709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32710  if test "x$test_cygdrive_prefix" = x; then
32711    # As a simple fix, exclude /usr/bin since it's not a real path.
32712    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32714      # a path prefixed by /cygdrive for fixpath to work.
32715      new_path="$CYGWIN_ROOT_PATH$input_path"
32716    fi
32717  fi
32718
32719
32720  if test "x$path" != "x$new_path"; then
32721    ipath="$new_path"
32722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32723$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32724  fi
32725
32726    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32727
32728  path="$ipath"
32729  has_colon=`$ECHO $path | $GREP ^.:`
32730  new_path="$path"
32731  if test "x$has_colon" = x; then
32732    # Not in mixed or Windows style, start by that.
32733    new_path=`cmd //c echo $path`
32734  fi
32735
32736
32737  input_path="$new_path"
32738  # Check if we need to convert this using DOS-style short mode. If the path
32739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32740  # take no chances and rewrite it.
32741  # Note: m4 eats our [], so we need to use [ and ] instead.
32742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32743  if test "x$has_forbidden_chars" != x; then
32744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32745    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32746  fi
32747
32748
32749  windows_path="$new_path"
32750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32751    unix_path=`$CYGPATH -u "$windows_path"`
32752    new_path="$unix_path"
32753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32755    new_path="$unix_path"
32756  fi
32757
32758  if test "x$path" != "x$new_path"; then
32759    ipath="$new_path"
32760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32761$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32762  fi
32763
32764  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32765  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32766
32767    else
32768      # We're on a unix platform. Hooray! :)
32769      path="$ipath"
32770      has_space=`$ECHO "$path" | $GREP " "`
32771      if test "x$has_space" != x; then
32772        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32773$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32774        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32775      fi
32776
32777      # Use eval to expand a potential ~
32778      eval path="$path"
32779      if test ! -f "$path" && test ! -d "$path"; then
32780        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32781      fi
32782
32783      if test -d "$path"; then
32784        ipath="`cd "$path"; $THEPWDCMD -L`"
32785      else
32786        dir="`$DIRNAME "$path"`"
32787        base="`$BASENAME "$path"`"
32788        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32789      fi
32790    fi
32791  fi
32792
32793            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32794          fi
32795          IFS=";"
32796        fi
32797      done
32798      # Convert VS_LIB into SYSROOT_LDFLAGS
32799      for i in $VS_LIB; do
32800        libpath=$i
32801        # Only process non-empty elements
32802        if test "x$libpath" != x; then
32803          IFS="$OLDIFS"
32804          # Check that directory exists before calling fixup_path
32805          testpath=$libpath
32806
32807  windows_path="$testpath"
32808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32809    unix_path=`$CYGPATH -u "$windows_path"`
32810    testpath="$unix_path"
32811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32813    testpath="$unix_path"
32814  fi
32815
32816          if test -d "$testpath"; then
32817
32818  # Only process if variable expands to non-empty
32819
32820  if test "x$libpath" != x; then
32821    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32822
32823  # Input might be given as Windows format, start by converting to
32824  # unix format.
32825  path="$libpath"
32826  new_path=`$CYGPATH -u "$path"`
32827
32828  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32829  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32830  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32831  # "foo.exe" is OK but "foo" is an error.
32832  #
32833  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32834  # It is also a way to make sure we got the proper file name for the real test later on.
32835  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32836  if test "x$test_shortpath" = x; then
32837    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32838$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32839    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32840  fi
32841
32842  # Call helper function which possibly converts this using DOS-style short mode.
32843  # If so, the updated path is stored in $new_path.
32844
32845  input_path="$new_path"
32846  # Check if we need to convert this using DOS-style short mode. If the path
32847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32848  # take no chances and rewrite it.
32849  # Note: m4 eats our [], so we need to use [ and ] instead.
32850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32851  if test "x$has_forbidden_chars" != x; then
32852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32853    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32854    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32855    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32856      # Going to short mode and back again did indeed matter. Since short mode is
32857      # case insensitive, let's make it lowercase to improve readability.
32858      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32859      # Now convert it back to Unix-style (cygpath)
32860      input_path=`$CYGPATH -u "$shortmode_path"`
32861      new_path="$input_path"
32862    fi
32863  fi
32864
32865  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32866  if test "x$test_cygdrive_prefix" = x; then
32867    # As a simple fix, exclude /usr/bin since it's not a real path.
32868    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32869      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32870      # a path prefixed by /cygdrive for fixpath to work.
32871      new_path="$CYGWIN_ROOT_PATH$input_path"
32872    fi
32873  fi
32874
32875
32876  if test "x$path" != "x$new_path"; then
32877    libpath="$new_path"
32878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32879$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32880  fi
32881
32882    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32883
32884  path="$libpath"
32885  has_colon=`$ECHO $path | $GREP ^.:`
32886  new_path="$path"
32887  if test "x$has_colon" = x; then
32888    # Not in mixed or Windows style, start by that.
32889    new_path=`cmd //c echo $path`
32890  fi
32891
32892
32893  input_path="$new_path"
32894  # Check if we need to convert this using DOS-style short mode. If the path
32895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32896  # take no chances and rewrite it.
32897  # Note: m4 eats our [], so we need to use [ and ] instead.
32898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32899  if test "x$has_forbidden_chars" != x; then
32900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32901    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32902  fi
32903
32904
32905  windows_path="$new_path"
32906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32907    unix_path=`$CYGPATH -u "$windows_path"`
32908    new_path="$unix_path"
32909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32911    new_path="$unix_path"
32912  fi
32913
32914  if test "x$path" != "x$new_path"; then
32915    libpath="$new_path"
32916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32917$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32918  fi
32919
32920  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32921  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32922
32923    else
32924      # We're on a unix platform. Hooray! :)
32925      path="$libpath"
32926      has_space=`$ECHO "$path" | $GREP " "`
32927      if test "x$has_space" != x; then
32928        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32929$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32930        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32931      fi
32932
32933      # Use eval to expand a potential ~
32934      eval path="$path"
32935      if test ! -f "$path" && test ! -d "$path"; then
32936        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32937      fi
32938
32939      if test -d "$path"; then
32940        libpath="`cd "$path"; $THEPWDCMD -L`"
32941      else
32942        dir="`$DIRNAME "$path"`"
32943        base="`$BASENAME "$path"`"
32944        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32945      fi
32946    fi
32947  fi
32948
32949            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32950          fi
32951          IFS=";"
32952        fi
32953      done
32954      IFS="$OLDIFS"
32955    fi
32956  else
32957    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32958$as_echo "not found" >&6; }
32959
32960    if test "x$VS_ENV_CMD" = x; then
32961      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32962$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32963      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32964$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32965    else
32966      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32967$as_echo "$as_me: Running the extraction script failed." >&6;}
32968    fi
32969    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32970$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32971    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32972$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32973    as_fn_error $? "Cannot continue" "$LINENO" 5
32974  fi
32975
32976    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32977    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32978    PATH="$VS_PATH"
32979    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32980    export INCLUDE="$VS_INCLUDE"
32981    export LIB="$VS_LIB"
32982  else
32983    if test "x$XCODE_VERSION_OUTPUT" != x; then
32984      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32985      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32986      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32987    else
32988      # Currently we do not define this for other toolchains. This might change as the need arise.
32989      TOOLCHAIN_VERSION=
32990    fi
32991  fi
32992
32993
32994  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32995  # override all other locations.
32996  if test "x$TOOLCHAIN_PATH" != x; then
32997    PATH=$TOOLCHAIN_PATH:$PATH
32998  fi
32999
33000
33001  #
33002  # Setup the compilers (CC and CXX)
33003  #
33004
33005  COMPILER_NAME=C
33006  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33007
33008  if test "x$CC" != x; then
33009    # User has supplied compiler name already, always let that override.
33010    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33011$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33012    if test "x`basename $CC`" = "x$CC"; then
33013      # A command without a complete path is provided, search $PATH.
33014
33015      for ac_prog in $CC
33016do
33017  # Extract the first word of "$ac_prog", so it can be a program name with args.
33018set dummy $ac_prog; ac_word=$2
33019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33020$as_echo_n "checking for $ac_word... " >&6; }
33021if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33022  $as_echo_n "(cached) " >&6
33023else
33024  case $POTENTIAL_CC in
33025  [\\/]* | ?:[\\/]*)
33026  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33027  ;;
33028  *)
33029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33030for as_dir in $PATH
33031do
33032  IFS=$as_save_IFS
33033  test -z "$as_dir" && as_dir=.
33034    for ac_exec_ext in '' $ac_executable_extensions; do
33035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33036    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33038    break 2
33039  fi
33040done
33041  done
33042IFS=$as_save_IFS
33043
33044  ;;
33045esac
33046fi
33047POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33048if test -n "$POTENTIAL_CC"; then
33049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33050$as_echo "$POTENTIAL_CC" >&6; }
33051else
33052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33053$as_echo "no" >&6; }
33054fi
33055
33056
33057  test -n "$POTENTIAL_CC" && break
33058done
33059
33060      if test "x$POTENTIAL_CC" != x; then
33061        CC=$POTENTIAL_CC
33062      else
33063        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33064      fi
33065    else
33066      # Otherwise it might already be a complete path
33067      if test ! -x "$CC"; then
33068        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33069      fi
33070    fi
33071  else
33072    # No user supplied value. Locate compiler ourselves.
33073
33074    # If we are cross compiling, assume cross compilation tools follows the
33075    # cross compilation standard where they are prefixed with the autoconf
33076    # standard name for the target. For example the binary
33077    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33078    # If we are not cross compiling, then the default compiler name will be
33079    # used.
33080
33081    CC=
33082    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33083    # before checking the rest of the PATH.
33084    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33085    # step, this should not be necessary.
33086    if test -n "$TOOLCHAIN_PATH"; then
33087      PATH_save="$PATH"
33088      PATH="$TOOLCHAIN_PATH"
33089      for ac_prog in $SEARCH_LIST
33090do
33091  # Extract the first word of "$ac_prog", so it can be a program name with args.
33092set dummy $ac_prog; ac_word=$2
33093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33094$as_echo_n "checking for $ac_word... " >&6; }
33095if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33096  $as_echo_n "(cached) " >&6
33097else
33098  case $TOOLCHAIN_PATH_CC in
33099  [\\/]* | ?:[\\/]*)
33100  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33101  ;;
33102  *)
33103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33104for as_dir in $PATH
33105do
33106  IFS=$as_save_IFS
33107  test -z "$as_dir" && as_dir=.
33108    for ac_exec_ext in '' $ac_executable_extensions; do
33109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33110    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33112    break 2
33113  fi
33114done
33115  done
33116IFS=$as_save_IFS
33117
33118  ;;
33119esac
33120fi
33121TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33122if test -n "$TOOLCHAIN_PATH_CC"; then
33123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33124$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33125else
33126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33127$as_echo "no" >&6; }
33128fi
33129
33130
33131  test -n "$TOOLCHAIN_PATH_CC" && break
33132done
33133
33134      CC=$TOOLCHAIN_PATH_CC
33135      PATH="$PATH_save"
33136    fi
33137
33138    # AC_PATH_PROGS can't be run multiple times with the same variable,
33139    # so create a new name for this run.
33140    if test "x$CC" = x; then
33141      for ac_prog in $SEARCH_LIST
33142do
33143  # Extract the first word of "$ac_prog", so it can be a program name with args.
33144set dummy $ac_prog; ac_word=$2
33145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33146$as_echo_n "checking for $ac_word... " >&6; }
33147if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33148  $as_echo_n "(cached) " >&6
33149else
33150  case $POTENTIAL_CC in
33151  [\\/]* | ?:[\\/]*)
33152  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33153  ;;
33154  *)
33155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33156for as_dir in $PATH
33157do
33158  IFS=$as_save_IFS
33159  test -z "$as_dir" && as_dir=.
33160    for ac_exec_ext in '' $ac_executable_extensions; do
33161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33162    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33164    break 2
33165  fi
33166done
33167  done
33168IFS=$as_save_IFS
33169
33170  ;;
33171esac
33172fi
33173POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33174if test -n "$POTENTIAL_CC"; then
33175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33176$as_echo "$POTENTIAL_CC" >&6; }
33177else
33178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33179$as_echo "no" >&6; }
33180fi
33181
33182
33183  test -n "$POTENTIAL_CC" && break
33184done
33185
33186      CC=$POTENTIAL_CC
33187    fi
33188
33189    if test "x$CC" = x; then
33190
33191  # Print a helpful message on how to acquire the necessary build dependency.
33192  # devkit is the help tag: freetype, cups, alsa etc
33193  MISSING_DEPENDENCY=devkit
33194
33195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33196    cygwin_help $MISSING_DEPENDENCY
33197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33198    msys_help $MISSING_DEPENDENCY
33199  else
33200    PKGHANDLER_COMMAND=
33201
33202    case $PKGHANDLER in
33203      apt-get)
33204        apt_help     $MISSING_DEPENDENCY ;;
33205      yum)
33206        yum_help     $MISSING_DEPENDENCY ;;
33207      port)
33208        port_help    $MISSING_DEPENDENCY ;;
33209      pkgutil)
33210        pkgutil_help $MISSING_DEPENDENCY ;;
33211      pkgadd)
33212        pkgadd_help  $MISSING_DEPENDENCY ;;
33213    esac
33214
33215    if test "x$PKGHANDLER_COMMAND" != x; then
33216      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33217    fi
33218  fi
33219
33220      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33221    fi
33222  fi
33223
33224  # Now we have a compiler binary in CC. Make sure it's okay.
33225
33226  # Only process if variable expands to non-empty
33227
33228  if test "x$CC" != x; then
33229    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33230
33231  # First separate the path from the arguments. This will split at the first
33232  # space.
33233  complete="$CC"
33234  path="${complete%% *}"
33235  tmp="$complete EOL"
33236  arguments="${tmp#* }"
33237
33238  # Input might be given as Windows format, start by converting to
33239  # unix format.
33240  new_path=`$CYGPATH -u "$path"`
33241
33242  # Now try to locate executable using which
33243  new_path=`$WHICH "$new_path" 2> /dev/null`
33244  # bat and cmd files are not always considered executable in cygwin causing which
33245  # to not find them
33246  if test "x$new_path" = x \
33247      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33248      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33249    new_path=`$CYGPATH -u "$path"`
33250  fi
33251  if test "x$new_path" = x; then
33252    # Oops. Which didn't find the executable.
33253    # The splitting of arguments from the executable at a space might have been incorrect,
33254    # since paths with space are more likely in Windows. Give it another try with the whole
33255    # argument.
33256    path="$complete"
33257    arguments="EOL"
33258    new_path=`$CYGPATH -u "$path"`
33259    new_path=`$WHICH "$new_path" 2> /dev/null`
33260    # bat and cmd files are not always considered executable in cygwin causing which
33261    # to not find them
33262    if test "x$new_path" = x \
33263        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33264        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33265      new_path=`$CYGPATH -u "$path"`
33266    fi
33267    if test "x$new_path" = x; then
33268      # It's still not found. Now this is an unrecoverable error.
33269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33270$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33271      has_space=`$ECHO "$complete" | $GREP " "`
33272      if test "x$has_space" != x; then
33273        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33274$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33275      fi
33276      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33277    fi
33278  fi
33279
33280  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33281  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33282  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33283  # "foo.exe" is OK but "foo" is an error.
33284  #
33285  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33286  # It is also a way to make sure we got the proper file name for the real test later on.
33287  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33288  if test "x$test_shortpath" = x; then
33289    # Short path failed, file does not exist as specified.
33290    # Try adding .exe or .cmd
33291    if test -f "${new_path}.exe"; then
33292      input_to_shortpath="${new_path}.exe"
33293    elif test -f "${new_path}.cmd"; then
33294      input_to_shortpath="${new_path}.cmd"
33295    else
33296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33297$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33298      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33299$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33300      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33301    fi
33302  else
33303    input_to_shortpath="$new_path"
33304  fi
33305
33306  # Call helper function which possibly converts this using DOS-style short mode.
33307  # If so, the updated path is stored in $new_path.
33308  new_path="$input_to_shortpath"
33309
33310  input_path="$input_to_shortpath"
33311  # Check if we need to convert this using DOS-style short mode. If the path
33312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33313  # take no chances and rewrite it.
33314  # Note: m4 eats our [], so we need to use [ and ] instead.
33315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33316  if test "x$has_forbidden_chars" != x; then
33317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33318    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33319    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33320    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33321      # Going to short mode and back again did indeed matter. Since short mode is
33322      # case insensitive, let's make it lowercase to improve readability.
33323      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33324      # Now convert it back to Unix-style (cygpath)
33325      input_path=`$CYGPATH -u "$shortmode_path"`
33326      new_path="$input_path"
33327    fi
33328  fi
33329
33330  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33331  if test "x$test_cygdrive_prefix" = x; then
33332    # As a simple fix, exclude /usr/bin since it's not a real path.
33333    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33334      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33335      # a path prefixed by /cygdrive for fixpath to work.
33336      new_path="$CYGWIN_ROOT_PATH$input_path"
33337    fi
33338  fi
33339
33340  # remove trailing .exe if any
33341  new_path="${new_path/%.exe/}"
33342
33343    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33344
33345  # First separate the path from the arguments. This will split at the first
33346  # space.
33347  complete="$CC"
33348  path="${complete%% *}"
33349  tmp="$complete EOL"
33350  arguments="${tmp#* }"
33351
33352  # Input might be given as Windows format, start by converting to
33353  # unix format.
33354  new_path="$path"
33355
33356  windows_path="$new_path"
33357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33358    unix_path=`$CYGPATH -u "$windows_path"`
33359    new_path="$unix_path"
33360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33362    new_path="$unix_path"
33363  fi
33364
33365
33366  # Now try to locate executable using which
33367  new_path=`$WHICH "$new_path" 2> /dev/null`
33368
33369  if test "x$new_path" = x; then
33370    # Oops. Which didn't find the executable.
33371    # The splitting of arguments from the executable at a space might have been incorrect,
33372    # since paths with space are more likely in Windows. Give it another try with the whole
33373    # argument.
33374    path="$complete"
33375    arguments="EOL"
33376    new_path="$path"
33377
33378  windows_path="$new_path"
33379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33380    unix_path=`$CYGPATH -u "$windows_path"`
33381    new_path="$unix_path"
33382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33384    new_path="$unix_path"
33385  fi
33386
33387
33388    new_path=`$WHICH "$new_path" 2> /dev/null`
33389    # bat and cmd files are not always considered executable in MSYS causing which
33390    # to not find them
33391    if test "x$new_path" = x \
33392        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33393        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33394      new_path="$path"
33395
33396  windows_path="$new_path"
33397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33398    unix_path=`$CYGPATH -u "$windows_path"`
33399    new_path="$unix_path"
33400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33402    new_path="$unix_path"
33403  fi
33404
33405    fi
33406
33407    if test "x$new_path" = x; then
33408      # It's still not found. Now this is an unrecoverable error.
33409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33410$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33411      has_space=`$ECHO "$complete" | $GREP " "`
33412      if test "x$has_space" != x; then
33413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33415      fi
33416      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33417    fi
33418  fi
33419
33420  # Now new_path has a complete unix path to the binary
33421  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33422    # Keep paths in /bin as-is, but remove trailing .exe if any
33423    new_path="${new_path/%.exe/}"
33424    # Do not save /bin paths to all_fixpath_prefixes!
33425  else
33426    # Not in mixed or Windows style, start by that.
33427    new_path=`cmd //c echo $new_path`
33428
33429  input_path="$new_path"
33430  # Check if we need to convert this using DOS-style short mode. If the path
33431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33432  # take no chances and rewrite it.
33433  # Note: m4 eats our [], so we need to use [ and ] instead.
33434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33435  if test "x$has_forbidden_chars" != x; then
33436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33438  fi
33439
33440    # Output is in $new_path
33441
33442  windows_path="$new_path"
33443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33444    unix_path=`$CYGPATH -u "$windows_path"`
33445    new_path="$unix_path"
33446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33448    new_path="$unix_path"
33449  fi
33450
33451    # remove trailing .exe if any
33452    new_path="${new_path/%.exe/}"
33453
33454    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33455    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33456  fi
33457
33458    else
33459      # We're on a unix platform. Hooray! :)
33460      # First separate the path from the arguments. This will split at the first
33461      # space.
33462      complete="$CC"
33463      path="${complete%% *}"
33464      tmp="$complete EOL"
33465      arguments="${tmp#* }"
33466
33467      # Cannot rely on the command "which" here since it doesn't always work.
33468      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33469      if test -z "$is_absolute_path"; then
33470        # Path to executable is not absolute. Find it.
33471        IFS_save="$IFS"
33472        IFS=:
33473        for p in $PATH; do
33474          if test -f "$p/$path" && test -x "$p/$path"; then
33475            new_path="$p/$path"
33476            break
33477          fi
33478        done
33479        IFS="$IFS_save"
33480      else
33481        # This is an absolute path, we can use it without further modifications.
33482        new_path="$path"
33483      fi
33484
33485      if test "x$new_path" = x; then
33486        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33487$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33488        has_space=`$ECHO "$complete" | $GREP " "`
33489        if test "x$has_space" != x; then
33490          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33491$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33492        fi
33493        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33494      fi
33495    fi
33496
33497    # Now join together the path and the arguments once again
33498    if test "x$arguments" != xEOL; then
33499      new_complete="$new_path ${arguments% *}"
33500    else
33501      new_complete="$new_path"
33502    fi
33503
33504    if test "x$complete" != "x$new_complete"; then
33505      CC="$new_complete"
33506      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33507$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33508    fi
33509  fi
33510
33511  TEST_COMPILER="$CC"
33512
33513  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33514$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33515  SYMLINK_ORIGINAL="$TEST_COMPILER"
33516
33517  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33518    # Follow a chain of symbolic links. Use readlink
33519    # where it exists, else fall back to horribly
33520    # complicated shell code.
33521    if test "x$READLINK_TESTED" != yes; then
33522      # On MacOSX there is a readlink tool with a different
33523      # purpose than the GNU readlink tool. Check the found readlink.
33524      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33525      if test "x$ISGNU" = x; then
33526        # A readlink that we do not know how to use.
33527        # Are there other non-GNU readlinks out there?
33528        READLINK_TESTED=yes
33529        READLINK=
33530      fi
33531    fi
33532
33533    if test "x$READLINK" != x; then
33534      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33535    else
33536      # Save the current directory for restoring afterwards
33537      STARTDIR=$PWD
33538      COUNTER=0
33539      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33540      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33541      cd $sym_link_dir
33542      # Use -P flag to resolve symlinks in directories.
33543      cd `$THEPWDCMD -P`
33544      sym_link_dir=`$THEPWDCMD -P`
33545      # Resolve file symlinks
33546      while test $COUNTER -lt 20; do
33547        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33548        if test "x$ISLINK" == x; then
33549          # This is not a symbolic link! We are done!
33550          break
33551        fi
33552        # Again resolve directory symlinks since the target of the just found
33553        # link could be in a different directory
33554        cd `$DIRNAME $ISLINK`
33555        sym_link_dir=`$THEPWDCMD -P`
33556        sym_link_file=`$BASENAME $ISLINK`
33557        let COUNTER=COUNTER+1
33558      done
33559      cd $STARTDIR
33560      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33561    fi
33562  fi
33563
33564  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33565    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33566$as_echo "no symlink" >&6; }
33567  else
33568    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33569$as_echo "$SYMLINK_ORIGINAL" >&6; }
33570
33571    # We can't handle ccache by gcc wrappers, since we need to know if we're
33572    # using ccache. Instead ccache usage must be controlled by a configure option.
33573    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33574    if test "x$COMPILER_BASENAME" = "xccache"; then
33575      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33576$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33577      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33578    fi
33579  fi
33580
33581
33582  COMPILER=$CC
33583  COMPILER_NAME=$COMPILER_NAME
33584
33585  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33586    # cc -V output typically looks like
33587    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33588    # or
33589    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
33590    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33591    # Check that this is likely to be the Solaris Studio cc.
33592    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
33593    if test $? -ne 0; then
33594      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33595      { $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
33596$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33597      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33598$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33599      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33600$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33601      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33602    fi
33603    # Remove usage instructions (if present), and
33604    # collapse compiler output into a single line
33605    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33606        $SED -e 's/ *[Uu]sage:.*//'`
33607    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33608        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33609  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33610    # xlc -qversion output typically looks like
33611    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33612    #     Version: 11.01.0000.0015
33613    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33614    # Check that this is likely to be the IBM XL C compiler.
33615    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33616    if test $? -ne 0; then
33617      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33618      { $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
33619$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33620      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33621$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33622      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33623$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33624      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33625    fi
33626    # Collapse compiler output into a single line
33627    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33628    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33629        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33630  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33631    # There is no specific version flag, but all output starts with a version string.
33632    # First line typically looks something like:
33633    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33634    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33635    # Check that this is likely to be Microsoft CL.EXE.
33636    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33637    if test $? -ne 0; then
33638      { $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
33639$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33640      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33641$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33642      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33643    fi
33644    # Collapse compiler output into a single line
33645    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33646    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33647        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33648  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33649    # gcc --version output typically looks like
33650    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33651    #     Copyright (C) 2013 Free Software Foundation, Inc.
33652    #     This is free software; see the source for copying conditions.  There is NO
33653    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33654    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33655    # Check that this is likely to be GCC.
33656    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33657    if test $? -ne 0; then
33658      { $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
33659$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33660      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33661$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33662      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33663    fi
33664    # Remove Copyright and legalese from version string, and
33665    # collapse into a single line
33666    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33667        $SED -e 's/ *Copyright .*//'`
33668    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33669        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33670  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33671    # clang --version output typically looks like
33672    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33673    #    clang version 3.3 (tags/RELEASE_33/final)
33674    # or
33675    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33676    #    Target: x86_64-pc-linux-gnu
33677    #    Thread model: posix
33678    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33679    # Check that this is likely to be clang
33680    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33681    if test $? -ne 0; then
33682      { $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
33683$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33684      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33685$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33686      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33687    fi
33688    # Collapse compiler output into a single line
33689    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33690    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33691        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33692  else
33693      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33694  fi
33695  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33696  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33697  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33698  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33699
33700  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33701$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33702
33703
33704  # Now that we have resolved CC ourself, let autoconf have its go at it
33705  ac_ext=c
33706ac_cpp='$CPP $CPPFLAGS'
33707ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33708ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33709ac_compiler_gnu=$ac_cv_c_compiler_gnu
33710if test -n "$ac_tool_prefix"; then
33711  for ac_prog in $CC
33712  do
33713    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33714set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33716$as_echo_n "checking for $ac_word... " >&6; }
33717if ${ac_cv_prog_CC+:} false; then :
33718  $as_echo_n "(cached) " >&6
33719else
33720  if test -n "$CC"; then
33721  ac_cv_prog_CC="$CC" # Let the user override the test.
33722else
33723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33724for as_dir in $PATH
33725do
33726  IFS=$as_save_IFS
33727  test -z "$as_dir" && as_dir=.
33728    for ac_exec_ext in '' $ac_executable_extensions; do
33729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33730    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33732    break 2
33733  fi
33734done
33735  done
33736IFS=$as_save_IFS
33737
33738fi
33739fi
33740CC=$ac_cv_prog_CC
33741if test -n "$CC"; then
33742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33743$as_echo "$CC" >&6; }
33744else
33745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33746$as_echo "no" >&6; }
33747fi
33748
33749
33750    test -n "$CC" && break
33751  done
33752fi
33753if test -z "$CC"; then
33754  ac_ct_CC=$CC
33755  for ac_prog in $CC
33756do
33757  # Extract the first word of "$ac_prog", so it can be a program name with args.
33758set dummy $ac_prog; ac_word=$2
33759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33760$as_echo_n "checking for $ac_word... " >&6; }
33761if ${ac_cv_prog_ac_ct_CC+:} false; then :
33762  $as_echo_n "(cached) " >&6
33763else
33764  if test -n "$ac_ct_CC"; then
33765  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33766else
33767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33768for as_dir in $PATH
33769do
33770  IFS=$as_save_IFS
33771  test -z "$as_dir" && as_dir=.
33772    for ac_exec_ext in '' $ac_executable_extensions; do
33773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33774    ac_cv_prog_ac_ct_CC="$ac_prog"
33775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33776    break 2
33777  fi
33778done
33779  done
33780IFS=$as_save_IFS
33781
33782fi
33783fi
33784ac_ct_CC=$ac_cv_prog_ac_ct_CC
33785if test -n "$ac_ct_CC"; then
33786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33787$as_echo "$ac_ct_CC" >&6; }
33788else
33789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33790$as_echo "no" >&6; }
33791fi
33792
33793
33794  test -n "$ac_ct_CC" && break
33795done
33796
33797  if test "x$ac_ct_CC" = x; then
33798    CC=""
33799  else
33800    case $cross_compiling:$ac_tool_warned in
33801yes:)
33802{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33803$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33804ac_tool_warned=yes ;;
33805esac
33806    CC=$ac_ct_CC
33807  fi
33808fi
33809
33810
33811test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33812$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33813as_fn_error $? "no acceptable C compiler found in \$PATH
33814See \`config.log' for more details" "$LINENO" 5; }
33815
33816# Provide some information about the compiler.
33817$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33818set X $ac_compile
33819ac_compiler=$2
33820for ac_option in --version -v -V -qversion; do
33821  { { ac_try="$ac_compiler $ac_option >&5"
33822case "(($ac_try" in
33823  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33824  *) ac_try_echo=$ac_try;;
33825esac
33826eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33827$as_echo "$ac_try_echo"; } >&5
33828  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33829  ac_status=$?
33830  if test -s conftest.err; then
33831    sed '10a\
33832... rest of stderr output deleted ...
33833         10q' conftest.err >conftest.er1
33834    cat conftest.er1 >&5
33835  fi
33836  rm -f conftest.er1 conftest.err
33837  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33838  test $ac_status = 0; }
33839done
33840
33841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33842/* end confdefs.h.  */
33843
33844int
33845main ()
33846{
33847
33848  ;
33849  return 0;
33850}
33851_ACEOF
33852ac_clean_files_save=$ac_clean_files
33853ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33854# Try to create an executable without -o first, disregard a.out.
33855# It will help us diagnose broken compilers, and finding out an intuition
33856# of exeext.
33857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33858$as_echo_n "checking whether the C compiler works... " >&6; }
33859ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33860
33861# The possible output files:
33862ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33863
33864ac_rmfiles=
33865for ac_file in $ac_files
33866do
33867  case $ac_file in
33868    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33869    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33870  esac
33871done
33872rm -f $ac_rmfiles
33873
33874if { { ac_try="$ac_link_default"
33875case "(($ac_try" in
33876  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33877  *) ac_try_echo=$ac_try;;
33878esac
33879eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33880$as_echo "$ac_try_echo"; } >&5
33881  (eval "$ac_link_default") 2>&5
33882  ac_status=$?
33883  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33884  test $ac_status = 0; }; then :
33885  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33886# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33887# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33888# so that the user can short-circuit this test for compilers unknown to
33889# Autoconf.
33890for ac_file in $ac_files ''
33891do
33892  test -f "$ac_file" || continue
33893  case $ac_file in
33894    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33895	;;
33896    [ab].out )
33897	# We found the default executable, but exeext='' is most
33898	# certainly right.
33899	break;;
33900    *.* )
33901	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33902	then :; else
33903	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33904	fi
33905	# We set ac_cv_exeext here because the later test for it is not
33906	# safe: cross compilers may not add the suffix if given an `-o'
33907	# argument, so we may need to know it at that point already.
33908	# Even if this section looks crufty: it has the advantage of
33909	# actually working.
33910	break;;
33911    * )
33912	break;;
33913  esac
33914done
33915test "$ac_cv_exeext" = no && ac_cv_exeext=
33916
33917else
33918  ac_file=''
33919fi
33920if test -z "$ac_file"; then :
33921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33922$as_echo "no" >&6; }
33923$as_echo "$as_me: failed program was:" >&5
33924sed 's/^/| /' conftest.$ac_ext >&5
33925
33926{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33927$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33928as_fn_error 77 "C compiler cannot create executables
33929See \`config.log' for more details" "$LINENO" 5; }
33930else
33931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33932$as_echo "yes" >&6; }
33933fi
33934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33935$as_echo_n "checking for C compiler default output file name... " >&6; }
33936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33937$as_echo "$ac_file" >&6; }
33938ac_exeext=$ac_cv_exeext
33939
33940rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33941ac_clean_files=$ac_clean_files_save
33942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33943$as_echo_n "checking for suffix of executables... " >&6; }
33944if { { ac_try="$ac_link"
33945case "(($ac_try" in
33946  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33947  *) ac_try_echo=$ac_try;;
33948esac
33949eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33950$as_echo "$ac_try_echo"; } >&5
33951  (eval "$ac_link") 2>&5
33952  ac_status=$?
33953  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33954  test $ac_status = 0; }; then :
33955  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33956# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33957# work properly (i.e., refer to `conftest.exe'), while it won't with
33958# `rm'.
33959for ac_file in conftest.exe conftest conftest.*; do
33960  test -f "$ac_file" || continue
33961  case $ac_file in
33962    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33963    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33964	  break;;
33965    * ) break;;
33966  esac
33967done
33968else
33969  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33970$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33971as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33972See \`config.log' for more details" "$LINENO" 5; }
33973fi
33974rm -f conftest conftest$ac_cv_exeext
33975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33976$as_echo "$ac_cv_exeext" >&6; }
33977
33978rm -f conftest.$ac_ext
33979EXEEXT=$ac_cv_exeext
33980ac_exeext=$EXEEXT
33981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33982/* end confdefs.h.  */
33983#include <stdio.h>
33984int
33985main ()
33986{
33987FILE *f = fopen ("conftest.out", "w");
33988 return ferror (f) || fclose (f) != 0;
33989
33990  ;
33991  return 0;
33992}
33993_ACEOF
33994ac_clean_files="$ac_clean_files conftest.out"
33995# Check that the compiler produces executables we can run.  If not, either
33996# the compiler is broken, or we cross compile.
33997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33998$as_echo_n "checking whether we are cross compiling... " >&6; }
33999if test "$cross_compiling" != yes; then
34000  { { ac_try="$ac_link"
34001case "(($ac_try" in
34002  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34003  *) ac_try_echo=$ac_try;;
34004esac
34005eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34006$as_echo "$ac_try_echo"; } >&5
34007  (eval "$ac_link") 2>&5
34008  ac_status=$?
34009  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34010  test $ac_status = 0; }
34011  if { ac_try='./conftest$ac_cv_exeext'
34012  { { case "(($ac_try" in
34013  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34014  *) ac_try_echo=$ac_try;;
34015esac
34016eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34017$as_echo "$ac_try_echo"; } >&5
34018  (eval "$ac_try") 2>&5
34019  ac_status=$?
34020  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34021  test $ac_status = 0; }; }; then
34022    cross_compiling=no
34023  else
34024    if test "$cross_compiling" = maybe; then
34025	cross_compiling=yes
34026    else
34027	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34028$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34029as_fn_error $? "cannot run C compiled programs.
34030If you meant to cross compile, use \`--host'.
34031See \`config.log' for more details" "$LINENO" 5; }
34032    fi
34033  fi
34034fi
34035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34036$as_echo "$cross_compiling" >&6; }
34037
34038rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34039ac_clean_files=$ac_clean_files_save
34040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34041$as_echo_n "checking for suffix of object files... " >&6; }
34042if ${ac_cv_objext+:} false; then :
34043  $as_echo_n "(cached) " >&6
34044else
34045  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34046/* end confdefs.h.  */
34047
34048int
34049main ()
34050{
34051
34052  ;
34053  return 0;
34054}
34055_ACEOF
34056rm -f conftest.o conftest.obj
34057if { { ac_try="$ac_compile"
34058case "(($ac_try" in
34059  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34060  *) ac_try_echo=$ac_try;;
34061esac
34062eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34063$as_echo "$ac_try_echo"; } >&5
34064  (eval "$ac_compile") 2>&5
34065  ac_status=$?
34066  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34067  test $ac_status = 0; }; then :
34068  for ac_file in conftest.o conftest.obj conftest.*; do
34069  test -f "$ac_file" || continue;
34070  case $ac_file in
34071    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34072    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34073       break;;
34074  esac
34075done
34076else
34077  $as_echo "$as_me: failed program was:" >&5
34078sed 's/^/| /' conftest.$ac_ext >&5
34079
34080{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34081$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34082as_fn_error $? "cannot compute suffix of object files: cannot compile
34083See \`config.log' for more details" "$LINENO" 5; }
34084fi
34085rm -f conftest.$ac_cv_objext conftest.$ac_ext
34086fi
34087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34088$as_echo "$ac_cv_objext" >&6; }
34089OBJEXT=$ac_cv_objext
34090ac_objext=$OBJEXT
34091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34092$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34093if ${ac_cv_c_compiler_gnu+:} false; then :
34094  $as_echo_n "(cached) " >&6
34095else
34096  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34097/* end confdefs.h.  */
34098
34099int
34100main ()
34101{
34102#ifndef __GNUC__
34103       choke me
34104#endif
34105
34106  ;
34107  return 0;
34108}
34109_ACEOF
34110if ac_fn_c_try_compile "$LINENO"; then :
34111  ac_compiler_gnu=yes
34112else
34113  ac_compiler_gnu=no
34114fi
34115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34116ac_cv_c_compiler_gnu=$ac_compiler_gnu
34117
34118fi
34119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34120$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34121if test $ac_compiler_gnu = yes; then
34122  GCC=yes
34123else
34124  GCC=
34125fi
34126ac_test_CFLAGS=${CFLAGS+set}
34127ac_save_CFLAGS=$CFLAGS
34128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34129$as_echo_n "checking whether $CC accepts -g... " >&6; }
34130if ${ac_cv_prog_cc_g+:} false; then :
34131  $as_echo_n "(cached) " >&6
34132else
34133  ac_save_c_werror_flag=$ac_c_werror_flag
34134   ac_c_werror_flag=yes
34135   ac_cv_prog_cc_g=no
34136   CFLAGS="-g"
34137   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34138/* end confdefs.h.  */
34139
34140int
34141main ()
34142{
34143
34144  ;
34145  return 0;
34146}
34147_ACEOF
34148if ac_fn_c_try_compile "$LINENO"; then :
34149  ac_cv_prog_cc_g=yes
34150else
34151  CFLAGS=""
34152      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34153/* end confdefs.h.  */
34154
34155int
34156main ()
34157{
34158
34159  ;
34160  return 0;
34161}
34162_ACEOF
34163if ac_fn_c_try_compile "$LINENO"; then :
34164
34165else
34166  ac_c_werror_flag=$ac_save_c_werror_flag
34167	 CFLAGS="-g"
34168	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34169/* end confdefs.h.  */
34170
34171int
34172main ()
34173{
34174
34175  ;
34176  return 0;
34177}
34178_ACEOF
34179if ac_fn_c_try_compile "$LINENO"; then :
34180  ac_cv_prog_cc_g=yes
34181fi
34182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34183fi
34184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34185fi
34186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34187   ac_c_werror_flag=$ac_save_c_werror_flag
34188fi
34189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34190$as_echo "$ac_cv_prog_cc_g" >&6; }
34191if test "$ac_test_CFLAGS" = set; then
34192  CFLAGS=$ac_save_CFLAGS
34193elif test $ac_cv_prog_cc_g = yes; then
34194  if test "$GCC" = yes; then
34195    CFLAGS="-g -O2"
34196  else
34197    CFLAGS="-g"
34198  fi
34199else
34200  if test "$GCC" = yes; then
34201    CFLAGS="-O2"
34202  else
34203    CFLAGS=
34204  fi
34205fi
34206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34207$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34208if ${ac_cv_prog_cc_c89+:} false; then :
34209  $as_echo_n "(cached) " >&6
34210else
34211  ac_cv_prog_cc_c89=no
34212ac_save_CC=$CC
34213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34214/* end confdefs.h.  */
34215#include <stdarg.h>
34216#include <stdio.h>
34217struct stat;
34218/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34219struct buf { int x; };
34220FILE * (*rcsopen) (struct buf *, struct stat *, int);
34221static char *e (p, i)
34222     char **p;
34223     int i;
34224{
34225  return p[i];
34226}
34227static char *f (char * (*g) (char **, int), char **p, ...)
34228{
34229  char *s;
34230  va_list v;
34231  va_start (v,p);
34232  s = g (p, va_arg (v,int));
34233  va_end (v);
34234  return s;
34235}
34236
34237/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34238   function prototypes and stuff, but not '\xHH' hex character constants.
34239   These don't provoke an error unfortunately, instead are silently treated
34240   as 'x'.  The following induces an error, until -std is added to get
34241   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34242   array size at least.  It's necessary to write '\x00'==0 to get something
34243   that's true only with -std.  */
34244int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34245
34246/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34247   inside strings and character constants.  */
34248#define FOO(x) 'x'
34249int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34250
34251int test (int i, double x);
34252struct s1 {int (*f) (int a);};
34253struct s2 {int (*f) (double a);};
34254int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34255int argc;
34256char **argv;
34257int
34258main ()
34259{
34260return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34261  ;
34262  return 0;
34263}
34264_ACEOF
34265for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34266	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34267do
34268  CC="$ac_save_CC $ac_arg"
34269  if ac_fn_c_try_compile "$LINENO"; then :
34270  ac_cv_prog_cc_c89=$ac_arg
34271fi
34272rm -f core conftest.err conftest.$ac_objext
34273  test "x$ac_cv_prog_cc_c89" != "xno" && break
34274done
34275rm -f conftest.$ac_ext
34276CC=$ac_save_CC
34277
34278fi
34279# AC_CACHE_VAL
34280case "x$ac_cv_prog_cc_c89" in
34281  x)
34282    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34283$as_echo "none needed" >&6; } ;;
34284  xno)
34285    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34286$as_echo "unsupported" >&6; } ;;
34287  *)
34288    CC="$CC $ac_cv_prog_cc_c89"
34289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34290$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34291esac
34292if test "x$ac_cv_prog_cc_c89" != xno; then :
34293
34294fi
34295
34296ac_ext=cpp
34297ac_cpp='$CXXCPP $CPPFLAGS'
34298ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34299ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34300ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34301
34302
34303
34304  COMPILER_NAME=C++
34305  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34306
34307  if test "x$CXX" != x; then
34308    # User has supplied compiler name already, always let that override.
34309    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34310$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34311    if test "x`basename $CXX`" = "x$CXX"; then
34312      # A command without a complete path is provided, search $PATH.
34313
34314      for ac_prog in $CXX
34315do
34316  # Extract the first word of "$ac_prog", so it can be a program name with args.
34317set dummy $ac_prog; ac_word=$2
34318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34319$as_echo_n "checking for $ac_word... " >&6; }
34320if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34321  $as_echo_n "(cached) " >&6
34322else
34323  case $POTENTIAL_CXX in
34324  [\\/]* | ?:[\\/]*)
34325  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34326  ;;
34327  *)
34328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34329for as_dir in $PATH
34330do
34331  IFS=$as_save_IFS
34332  test -z "$as_dir" && as_dir=.
34333    for ac_exec_ext in '' $ac_executable_extensions; do
34334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34335    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34337    break 2
34338  fi
34339done
34340  done
34341IFS=$as_save_IFS
34342
34343  ;;
34344esac
34345fi
34346POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34347if test -n "$POTENTIAL_CXX"; then
34348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34349$as_echo "$POTENTIAL_CXX" >&6; }
34350else
34351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34352$as_echo "no" >&6; }
34353fi
34354
34355
34356  test -n "$POTENTIAL_CXX" && break
34357done
34358
34359      if test "x$POTENTIAL_CXX" != x; then
34360        CXX=$POTENTIAL_CXX
34361      else
34362        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34363      fi
34364    else
34365      # Otherwise it might already be a complete path
34366      if test ! -x "$CXX"; then
34367        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34368      fi
34369    fi
34370  else
34371    # No user supplied value. Locate compiler ourselves.
34372
34373    # If we are cross compiling, assume cross compilation tools follows the
34374    # cross compilation standard where they are prefixed with the autoconf
34375    # standard name for the target. For example the binary
34376    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34377    # If we are not cross compiling, then the default compiler name will be
34378    # used.
34379
34380    CXX=
34381    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34382    # before checking the rest of the PATH.
34383    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34384    # step, this should not be necessary.
34385    if test -n "$TOOLCHAIN_PATH"; then
34386      PATH_save="$PATH"
34387      PATH="$TOOLCHAIN_PATH"
34388      for ac_prog in $SEARCH_LIST
34389do
34390  # Extract the first word of "$ac_prog", so it can be a program name with args.
34391set dummy $ac_prog; ac_word=$2
34392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34393$as_echo_n "checking for $ac_word... " >&6; }
34394if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34395  $as_echo_n "(cached) " >&6
34396else
34397  case $TOOLCHAIN_PATH_CXX in
34398  [\\/]* | ?:[\\/]*)
34399  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34400  ;;
34401  *)
34402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34403for as_dir in $PATH
34404do
34405  IFS=$as_save_IFS
34406  test -z "$as_dir" && as_dir=.
34407    for ac_exec_ext in '' $ac_executable_extensions; do
34408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34409    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34411    break 2
34412  fi
34413done
34414  done
34415IFS=$as_save_IFS
34416
34417  ;;
34418esac
34419fi
34420TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34421if test -n "$TOOLCHAIN_PATH_CXX"; then
34422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34423$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34424else
34425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34426$as_echo "no" >&6; }
34427fi
34428
34429
34430  test -n "$TOOLCHAIN_PATH_CXX" && break
34431done
34432
34433      CXX=$TOOLCHAIN_PATH_CXX
34434      PATH="$PATH_save"
34435    fi
34436
34437    # AC_PATH_PROGS can't be run multiple times with the same variable,
34438    # so create a new name for this run.
34439    if test "x$CXX" = x; then
34440      for ac_prog in $SEARCH_LIST
34441do
34442  # Extract the first word of "$ac_prog", so it can be a program name with args.
34443set dummy $ac_prog; ac_word=$2
34444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34445$as_echo_n "checking for $ac_word... " >&6; }
34446if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34447  $as_echo_n "(cached) " >&6
34448else
34449  case $POTENTIAL_CXX in
34450  [\\/]* | ?:[\\/]*)
34451  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34452  ;;
34453  *)
34454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34455for as_dir in $PATH
34456do
34457  IFS=$as_save_IFS
34458  test -z "$as_dir" && as_dir=.
34459    for ac_exec_ext in '' $ac_executable_extensions; do
34460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34461    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34463    break 2
34464  fi
34465done
34466  done
34467IFS=$as_save_IFS
34468
34469  ;;
34470esac
34471fi
34472POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34473if test -n "$POTENTIAL_CXX"; then
34474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34475$as_echo "$POTENTIAL_CXX" >&6; }
34476else
34477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34478$as_echo "no" >&6; }
34479fi
34480
34481
34482  test -n "$POTENTIAL_CXX" && break
34483done
34484
34485      CXX=$POTENTIAL_CXX
34486    fi
34487
34488    if test "x$CXX" = x; then
34489
34490  # Print a helpful message on how to acquire the necessary build dependency.
34491  # devkit is the help tag: freetype, cups, alsa etc
34492  MISSING_DEPENDENCY=devkit
34493
34494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34495    cygwin_help $MISSING_DEPENDENCY
34496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34497    msys_help $MISSING_DEPENDENCY
34498  else
34499    PKGHANDLER_COMMAND=
34500
34501    case $PKGHANDLER in
34502      apt-get)
34503        apt_help     $MISSING_DEPENDENCY ;;
34504      yum)
34505        yum_help     $MISSING_DEPENDENCY ;;
34506      port)
34507        port_help    $MISSING_DEPENDENCY ;;
34508      pkgutil)
34509        pkgutil_help $MISSING_DEPENDENCY ;;
34510      pkgadd)
34511        pkgadd_help  $MISSING_DEPENDENCY ;;
34512    esac
34513
34514    if test "x$PKGHANDLER_COMMAND" != x; then
34515      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34516    fi
34517  fi
34518
34519      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34520    fi
34521  fi
34522
34523  # Now we have a compiler binary in CXX. Make sure it's okay.
34524
34525  # Only process if variable expands to non-empty
34526
34527  if test "x$CXX" != x; then
34528    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34529
34530  # First separate the path from the arguments. This will split at the first
34531  # space.
34532  complete="$CXX"
34533  path="${complete%% *}"
34534  tmp="$complete EOL"
34535  arguments="${tmp#* }"
34536
34537  # Input might be given as Windows format, start by converting to
34538  # unix format.
34539  new_path=`$CYGPATH -u "$path"`
34540
34541  # Now try to locate executable using which
34542  new_path=`$WHICH "$new_path" 2> /dev/null`
34543  # bat and cmd files are not always considered executable in cygwin causing which
34544  # to not find them
34545  if test "x$new_path" = x \
34546      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34547      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34548    new_path=`$CYGPATH -u "$path"`
34549  fi
34550  if test "x$new_path" = x; then
34551    # Oops. Which didn't find the executable.
34552    # The splitting of arguments from the executable at a space might have been incorrect,
34553    # since paths with space are more likely in Windows. Give it another try with the whole
34554    # argument.
34555    path="$complete"
34556    arguments="EOL"
34557    new_path=`$CYGPATH -u "$path"`
34558    new_path=`$WHICH "$new_path" 2> /dev/null`
34559    # bat and cmd files are not always considered executable in cygwin causing which
34560    # to not find them
34561    if test "x$new_path" = x \
34562        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34563        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34564      new_path=`$CYGPATH -u "$path"`
34565    fi
34566    if test "x$new_path" = x; then
34567      # It's still not found. Now this is an unrecoverable error.
34568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34569$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34570      has_space=`$ECHO "$complete" | $GREP " "`
34571      if test "x$has_space" != x; then
34572        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34573$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34574      fi
34575      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34576    fi
34577  fi
34578
34579  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34580  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34581  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34582  # "foo.exe" is OK but "foo" is an error.
34583  #
34584  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34585  # It is also a way to make sure we got the proper file name for the real test later on.
34586  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34587  if test "x$test_shortpath" = x; then
34588    # Short path failed, file does not exist as specified.
34589    # Try adding .exe or .cmd
34590    if test -f "${new_path}.exe"; then
34591      input_to_shortpath="${new_path}.exe"
34592    elif test -f "${new_path}.cmd"; then
34593      input_to_shortpath="${new_path}.cmd"
34594    else
34595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34596$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34597      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34598$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34599      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34600    fi
34601  else
34602    input_to_shortpath="$new_path"
34603  fi
34604
34605  # Call helper function which possibly converts this using DOS-style short mode.
34606  # If so, the updated path is stored in $new_path.
34607  new_path="$input_to_shortpath"
34608
34609  input_path="$input_to_shortpath"
34610  # Check if we need to convert this using DOS-style short mode. If the path
34611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34612  # take no chances and rewrite it.
34613  # Note: m4 eats our [], so we need to use [ and ] instead.
34614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34615  if test "x$has_forbidden_chars" != x; then
34616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34617    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34618    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34619    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34620      # Going to short mode and back again did indeed matter. Since short mode is
34621      # case insensitive, let's make it lowercase to improve readability.
34622      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34623      # Now convert it back to Unix-style (cygpath)
34624      input_path=`$CYGPATH -u "$shortmode_path"`
34625      new_path="$input_path"
34626    fi
34627  fi
34628
34629  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34630  if test "x$test_cygdrive_prefix" = x; then
34631    # As a simple fix, exclude /usr/bin since it's not a real path.
34632    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34633      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34634      # a path prefixed by /cygdrive for fixpath to work.
34635      new_path="$CYGWIN_ROOT_PATH$input_path"
34636    fi
34637  fi
34638
34639  # remove trailing .exe if any
34640  new_path="${new_path/%.exe/}"
34641
34642    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34643
34644  # First separate the path from the arguments. This will split at the first
34645  # space.
34646  complete="$CXX"
34647  path="${complete%% *}"
34648  tmp="$complete EOL"
34649  arguments="${tmp#* }"
34650
34651  # Input might be given as Windows format, start by converting to
34652  # unix format.
34653  new_path="$path"
34654
34655  windows_path="$new_path"
34656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34657    unix_path=`$CYGPATH -u "$windows_path"`
34658    new_path="$unix_path"
34659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34661    new_path="$unix_path"
34662  fi
34663
34664
34665  # Now try to locate executable using which
34666  new_path=`$WHICH "$new_path" 2> /dev/null`
34667
34668  if test "x$new_path" = x; then
34669    # Oops. Which didn't find the executable.
34670    # The splitting of arguments from the executable at a space might have been incorrect,
34671    # since paths with space are more likely in Windows. Give it another try with the whole
34672    # argument.
34673    path="$complete"
34674    arguments="EOL"
34675    new_path="$path"
34676
34677  windows_path="$new_path"
34678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34679    unix_path=`$CYGPATH -u "$windows_path"`
34680    new_path="$unix_path"
34681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34683    new_path="$unix_path"
34684  fi
34685
34686
34687    new_path=`$WHICH "$new_path" 2> /dev/null`
34688    # bat and cmd files are not always considered executable in MSYS causing which
34689    # to not find them
34690    if test "x$new_path" = x \
34691        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34692        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34693      new_path="$path"
34694
34695  windows_path="$new_path"
34696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34697    unix_path=`$CYGPATH -u "$windows_path"`
34698    new_path="$unix_path"
34699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34701    new_path="$unix_path"
34702  fi
34703
34704    fi
34705
34706    if test "x$new_path" = x; then
34707      # It's still not found. Now this is an unrecoverable error.
34708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34709$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34710      has_space=`$ECHO "$complete" | $GREP " "`
34711      if test "x$has_space" != x; then
34712        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34713$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34714      fi
34715      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34716    fi
34717  fi
34718
34719  # Now new_path has a complete unix path to the binary
34720  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34721    # Keep paths in /bin as-is, but remove trailing .exe if any
34722    new_path="${new_path/%.exe/}"
34723    # Do not save /bin paths to all_fixpath_prefixes!
34724  else
34725    # Not in mixed or Windows style, start by that.
34726    new_path=`cmd //c echo $new_path`
34727
34728  input_path="$new_path"
34729  # Check if we need to convert this using DOS-style short mode. If the path
34730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34731  # take no chances and rewrite it.
34732  # Note: m4 eats our [], so we need to use [ and ] instead.
34733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34734  if test "x$has_forbidden_chars" != x; then
34735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34737  fi
34738
34739    # Output is in $new_path
34740
34741  windows_path="$new_path"
34742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34743    unix_path=`$CYGPATH -u "$windows_path"`
34744    new_path="$unix_path"
34745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34747    new_path="$unix_path"
34748  fi
34749
34750    # remove trailing .exe if any
34751    new_path="${new_path/%.exe/}"
34752
34753    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34754    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34755  fi
34756
34757    else
34758      # We're on a unix platform. Hooray! :)
34759      # First separate the path from the arguments. This will split at the first
34760      # space.
34761      complete="$CXX"
34762      path="${complete%% *}"
34763      tmp="$complete EOL"
34764      arguments="${tmp#* }"
34765
34766      # Cannot rely on the command "which" here since it doesn't always work.
34767      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34768      if test -z "$is_absolute_path"; then
34769        # Path to executable is not absolute. Find it.
34770        IFS_save="$IFS"
34771        IFS=:
34772        for p in $PATH; do
34773          if test -f "$p/$path" && test -x "$p/$path"; then
34774            new_path="$p/$path"
34775            break
34776          fi
34777        done
34778        IFS="$IFS_save"
34779      else
34780        # This is an absolute path, we can use it without further modifications.
34781        new_path="$path"
34782      fi
34783
34784      if test "x$new_path" = x; then
34785        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34786$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34787        has_space=`$ECHO "$complete" | $GREP " "`
34788        if test "x$has_space" != x; then
34789          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34790$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34791        fi
34792        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34793      fi
34794    fi
34795
34796    # Now join together the path and the arguments once again
34797    if test "x$arguments" != xEOL; then
34798      new_complete="$new_path ${arguments% *}"
34799    else
34800      new_complete="$new_path"
34801    fi
34802
34803    if test "x$complete" != "x$new_complete"; then
34804      CXX="$new_complete"
34805      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34806$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34807    fi
34808  fi
34809
34810  TEST_COMPILER="$CXX"
34811
34812  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34813$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34814  SYMLINK_ORIGINAL="$TEST_COMPILER"
34815
34816  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34817    # Follow a chain of symbolic links. Use readlink
34818    # where it exists, else fall back to horribly
34819    # complicated shell code.
34820    if test "x$READLINK_TESTED" != yes; then
34821      # On MacOSX there is a readlink tool with a different
34822      # purpose than the GNU readlink tool. Check the found readlink.
34823      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34824      if test "x$ISGNU" = x; then
34825        # A readlink that we do not know how to use.
34826        # Are there other non-GNU readlinks out there?
34827        READLINK_TESTED=yes
34828        READLINK=
34829      fi
34830    fi
34831
34832    if test "x$READLINK" != x; then
34833      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34834    else
34835      # Save the current directory for restoring afterwards
34836      STARTDIR=$PWD
34837      COUNTER=0
34838      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34839      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34840      cd $sym_link_dir
34841      # Use -P flag to resolve symlinks in directories.
34842      cd `$THEPWDCMD -P`
34843      sym_link_dir=`$THEPWDCMD -P`
34844      # Resolve file symlinks
34845      while test $COUNTER -lt 20; do
34846        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34847        if test "x$ISLINK" == x; then
34848          # This is not a symbolic link! We are done!
34849          break
34850        fi
34851        # Again resolve directory symlinks since the target of the just found
34852        # link could be in a different directory
34853        cd `$DIRNAME $ISLINK`
34854        sym_link_dir=`$THEPWDCMD -P`
34855        sym_link_file=`$BASENAME $ISLINK`
34856        let COUNTER=COUNTER+1
34857      done
34858      cd $STARTDIR
34859      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34860    fi
34861  fi
34862
34863  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34864    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34865$as_echo "no symlink" >&6; }
34866  else
34867    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34868$as_echo "$SYMLINK_ORIGINAL" >&6; }
34869
34870    # We can't handle ccache by gcc wrappers, since we need to know if we're
34871    # using ccache. Instead ccache usage must be controlled by a configure option.
34872    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34873    if test "x$COMPILER_BASENAME" = "xccache"; then
34874      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34875$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34876      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34877    fi
34878  fi
34879
34880
34881  COMPILER=$CXX
34882  COMPILER_NAME=$COMPILER_NAME
34883
34884  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34885    # cc -V output typically looks like
34886    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34887    # or
34888    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34889    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34890    # Check that this is likely to be the Solaris Studio cc.
34891    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34892    if test $? -ne 0; then
34893      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34894      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
34895$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34896      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34897$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34898      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34899$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34900      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34901    fi
34902    # Remove usage instructions (if present), and
34903    # collapse compiler output into a single line
34904    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34905        $SED -e 's/ *[Uu]sage:.*//'`
34906    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34907        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34908  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34909    # xlc -qversion output typically looks like
34910    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34911    #     Version: 11.01.0000.0015
34912    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34913    # Check that this is likely to be the IBM XL C compiler.
34914    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34915    if test $? -ne 0; then
34916      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34917      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
34918$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34919      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34920$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34921      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34922$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34923      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34924    fi
34925    # Collapse compiler output into a single line
34926    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34927    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34928        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34929  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34930    # There is no specific version flag, but all output starts with a version string.
34931    # First line typically looks something like:
34932    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34933    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34934    # Check that this is likely to be Microsoft CL.EXE.
34935    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34936    if test $? -ne 0; then
34937      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
34938$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34939      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34940$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34941      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34942    fi
34943    # Collapse compiler output into a single line
34944    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34945    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34946        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34947  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34948    # gcc --version output typically looks like
34949    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34950    #     Copyright (C) 2013 Free Software Foundation, Inc.
34951    #     This is free software; see the source for copying conditions.  There is NO
34952    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34953    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34954    # Check that this is likely to be GCC.
34955    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34956    if test $? -ne 0; then
34957      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
34958$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34959      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34960$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34961      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34962    fi
34963    # Remove Copyright and legalese from version string, and
34964    # collapse into a single line
34965    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34966        $SED -e 's/ *Copyright .*//'`
34967    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34968        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34969  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34970    # clang --version output typically looks like
34971    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34972    #    clang version 3.3 (tags/RELEASE_33/final)
34973    # or
34974    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34975    #    Target: x86_64-pc-linux-gnu
34976    #    Thread model: posix
34977    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34978    # Check that this is likely to be clang
34979    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34980    if test $? -ne 0; then
34981      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
34982$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34983      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34984$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34985      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34986    fi
34987    # Collapse compiler output into a single line
34988    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34989    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34990        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34991  else
34992      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34993  fi
34994  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34995  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34996  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34997  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34998
34999  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35000$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35001
35002
35003  # Now that we have resolved CXX ourself, let autoconf have its go at it
35004  ac_ext=cpp
35005ac_cpp='$CXXCPP $CPPFLAGS'
35006ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35007ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35008ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35009if test -z "$CXX"; then
35010  if test -n "$CCC"; then
35011    CXX=$CCC
35012  else
35013    if test -n "$ac_tool_prefix"; then
35014  for ac_prog in $CXX
35015  do
35016    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35017set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35019$as_echo_n "checking for $ac_word... " >&6; }
35020if ${ac_cv_prog_CXX+:} false; then :
35021  $as_echo_n "(cached) " >&6
35022else
35023  if test -n "$CXX"; then
35024  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35025else
35026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35027for as_dir in $PATH
35028do
35029  IFS=$as_save_IFS
35030  test -z "$as_dir" && as_dir=.
35031    for ac_exec_ext in '' $ac_executable_extensions; do
35032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35033    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35035    break 2
35036  fi
35037done
35038  done
35039IFS=$as_save_IFS
35040
35041fi
35042fi
35043CXX=$ac_cv_prog_CXX
35044if test -n "$CXX"; then
35045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35046$as_echo "$CXX" >&6; }
35047else
35048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35049$as_echo "no" >&6; }
35050fi
35051
35052
35053    test -n "$CXX" && break
35054  done
35055fi
35056if test -z "$CXX"; then
35057  ac_ct_CXX=$CXX
35058  for ac_prog in $CXX
35059do
35060  # Extract the first word of "$ac_prog", so it can be a program name with args.
35061set dummy $ac_prog; ac_word=$2
35062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35063$as_echo_n "checking for $ac_word... " >&6; }
35064if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35065  $as_echo_n "(cached) " >&6
35066else
35067  if test -n "$ac_ct_CXX"; then
35068  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35069else
35070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35071for as_dir in $PATH
35072do
35073  IFS=$as_save_IFS
35074  test -z "$as_dir" && as_dir=.
35075    for ac_exec_ext in '' $ac_executable_extensions; do
35076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35077    ac_cv_prog_ac_ct_CXX="$ac_prog"
35078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35079    break 2
35080  fi
35081done
35082  done
35083IFS=$as_save_IFS
35084
35085fi
35086fi
35087ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35088if test -n "$ac_ct_CXX"; then
35089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35090$as_echo "$ac_ct_CXX" >&6; }
35091else
35092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35093$as_echo "no" >&6; }
35094fi
35095
35096
35097  test -n "$ac_ct_CXX" && break
35098done
35099
35100  if test "x$ac_ct_CXX" = x; then
35101    CXX="g++"
35102  else
35103    case $cross_compiling:$ac_tool_warned in
35104yes:)
35105{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35106$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35107ac_tool_warned=yes ;;
35108esac
35109    CXX=$ac_ct_CXX
35110  fi
35111fi
35112
35113  fi
35114fi
35115# Provide some information about the compiler.
35116$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35117set X $ac_compile
35118ac_compiler=$2
35119for ac_option in --version -v -V -qversion; do
35120  { { ac_try="$ac_compiler $ac_option >&5"
35121case "(($ac_try" in
35122  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35123  *) ac_try_echo=$ac_try;;
35124esac
35125eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35126$as_echo "$ac_try_echo"; } >&5
35127  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35128  ac_status=$?
35129  if test -s conftest.err; then
35130    sed '10a\
35131... rest of stderr output deleted ...
35132         10q' conftest.err >conftest.er1
35133    cat conftest.er1 >&5
35134  fi
35135  rm -f conftest.er1 conftest.err
35136  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35137  test $ac_status = 0; }
35138done
35139
35140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35141$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35142if ${ac_cv_cxx_compiler_gnu+:} false; then :
35143  $as_echo_n "(cached) " >&6
35144else
35145  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35146/* end confdefs.h.  */
35147
35148int
35149main ()
35150{
35151#ifndef __GNUC__
35152       choke me
35153#endif
35154
35155  ;
35156  return 0;
35157}
35158_ACEOF
35159if ac_fn_cxx_try_compile "$LINENO"; then :
35160  ac_compiler_gnu=yes
35161else
35162  ac_compiler_gnu=no
35163fi
35164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35165ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35166
35167fi
35168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35169$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35170if test $ac_compiler_gnu = yes; then
35171  GXX=yes
35172else
35173  GXX=
35174fi
35175ac_test_CXXFLAGS=${CXXFLAGS+set}
35176ac_save_CXXFLAGS=$CXXFLAGS
35177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35178$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35179if ${ac_cv_prog_cxx_g+:} false; then :
35180  $as_echo_n "(cached) " >&6
35181else
35182  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35183   ac_cxx_werror_flag=yes
35184   ac_cv_prog_cxx_g=no
35185   CXXFLAGS="-g"
35186   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35187/* end confdefs.h.  */
35188
35189int
35190main ()
35191{
35192
35193  ;
35194  return 0;
35195}
35196_ACEOF
35197if ac_fn_cxx_try_compile "$LINENO"; then :
35198  ac_cv_prog_cxx_g=yes
35199else
35200  CXXFLAGS=""
35201      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35202/* end confdefs.h.  */
35203
35204int
35205main ()
35206{
35207
35208  ;
35209  return 0;
35210}
35211_ACEOF
35212if ac_fn_cxx_try_compile "$LINENO"; then :
35213
35214else
35215  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35216	 CXXFLAGS="-g"
35217	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35218/* end confdefs.h.  */
35219
35220int
35221main ()
35222{
35223
35224  ;
35225  return 0;
35226}
35227_ACEOF
35228if ac_fn_cxx_try_compile "$LINENO"; then :
35229  ac_cv_prog_cxx_g=yes
35230fi
35231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35232fi
35233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35234fi
35235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35236   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35237fi
35238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35239$as_echo "$ac_cv_prog_cxx_g" >&6; }
35240if test "$ac_test_CXXFLAGS" = set; then
35241  CXXFLAGS=$ac_save_CXXFLAGS
35242elif test $ac_cv_prog_cxx_g = yes; then
35243  if test "$GXX" = yes; then
35244    CXXFLAGS="-g -O2"
35245  else
35246    CXXFLAGS="-g"
35247  fi
35248else
35249  if test "$GXX" = yes; then
35250    CXXFLAGS="-O2"
35251  else
35252    CXXFLAGS=
35253  fi
35254fi
35255ac_ext=cpp
35256ac_cpp='$CXXCPP $CPPFLAGS'
35257ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35258ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35259ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35260
35261
35262  # This is the compiler version number on the form X.Y[.Z]
35263
35264
35265
35266
35267  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35268    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35269$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35270    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35271$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35272  fi
35273
35274  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35275  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
35276    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35277$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35278  fi
35279
35280  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35281    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35282$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35283  fi
35284
35285  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
35286
35287
35288  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35289
35290
35291
35292
35293
35294
35295
35296
35297
35298
35299
35300
35301
35302
35303
35304
35305
35306
35307
35308
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325
35326
35327
35328
35329
35330
35331
35332
35333
35334
35335
35336
35337
35338    # Execute function body
35339
35340  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35341  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35342
35343  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
35344    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
35345  fi
35346
35347  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35348    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35349  fi
35350
35351  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35352  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
35353
35354  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35355    :
35356
35357  else
35358    :
35359
35360          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&5
35361$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35362
35363
35364  fi
35365
35366
35367
35368
35369
35370
35371
35372
35373
35374
35375
35376
35377
35378
35379  fi
35380
35381  #
35382  # Setup the preprocessor (CPP and CXXCPP)
35383  #
35384  ac_ext=c
35385ac_cpp='$CPP $CPPFLAGS'
35386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35388ac_compiler_gnu=$ac_cv_c_compiler_gnu
35389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35390$as_echo_n "checking how to run the C preprocessor... " >&6; }
35391# On Suns, sometimes $CPP names a directory.
35392if test -n "$CPP" && test -d "$CPP"; then
35393  CPP=
35394fi
35395if test -z "$CPP"; then
35396  if ${ac_cv_prog_CPP+:} false; then :
35397  $as_echo_n "(cached) " >&6
35398else
35399      # Double quotes because CPP needs to be expanded
35400    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35401    do
35402      ac_preproc_ok=false
35403for ac_c_preproc_warn_flag in '' yes
35404do
35405  # Use a header file that comes with gcc, so configuring glibc
35406  # with a fresh cross-compiler works.
35407  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35408  # <limits.h> exists even on freestanding compilers.
35409  # On the NeXT, cc -E runs the code through the compiler's parser,
35410  # not just through cpp. "Syntax error" is here to catch this case.
35411  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35412/* end confdefs.h.  */
35413#ifdef __STDC__
35414# include <limits.h>
35415#else
35416# include <assert.h>
35417#endif
35418		     Syntax error
35419_ACEOF
35420if ac_fn_c_try_cpp "$LINENO"; then :
35421
35422else
35423  # Broken: fails on valid input.
35424continue
35425fi
35426rm -f conftest.err conftest.i conftest.$ac_ext
35427
35428  # OK, works on sane cases.  Now check whether nonexistent headers
35429  # can be detected and how.
35430  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35431/* end confdefs.h.  */
35432#include <ac_nonexistent.h>
35433_ACEOF
35434if ac_fn_c_try_cpp "$LINENO"; then :
35435  # Broken: success on invalid input.
35436continue
35437else
35438  # Passes both tests.
35439ac_preproc_ok=:
35440break
35441fi
35442rm -f conftest.err conftest.i conftest.$ac_ext
35443
35444done
35445# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35446rm -f conftest.i conftest.err conftest.$ac_ext
35447if $ac_preproc_ok; then :
35448  break
35449fi
35450
35451    done
35452    ac_cv_prog_CPP=$CPP
35453
35454fi
35455  CPP=$ac_cv_prog_CPP
35456else
35457  ac_cv_prog_CPP=$CPP
35458fi
35459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35460$as_echo "$CPP" >&6; }
35461ac_preproc_ok=false
35462for ac_c_preproc_warn_flag in '' yes
35463do
35464  # Use a header file that comes with gcc, so configuring glibc
35465  # with a fresh cross-compiler works.
35466  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35467  # <limits.h> exists even on freestanding compilers.
35468  # On the NeXT, cc -E runs the code through the compiler's parser,
35469  # not just through cpp. "Syntax error" is here to catch this case.
35470  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35471/* end confdefs.h.  */
35472#ifdef __STDC__
35473# include <limits.h>
35474#else
35475# include <assert.h>
35476#endif
35477		     Syntax error
35478_ACEOF
35479if ac_fn_c_try_cpp "$LINENO"; then :
35480
35481else
35482  # Broken: fails on valid input.
35483continue
35484fi
35485rm -f conftest.err conftest.i conftest.$ac_ext
35486
35487  # OK, works on sane cases.  Now check whether nonexistent headers
35488  # can be detected and how.
35489  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35490/* end confdefs.h.  */
35491#include <ac_nonexistent.h>
35492_ACEOF
35493if ac_fn_c_try_cpp "$LINENO"; then :
35494  # Broken: success on invalid input.
35495continue
35496else
35497  # Passes both tests.
35498ac_preproc_ok=:
35499break
35500fi
35501rm -f conftest.err conftest.i conftest.$ac_ext
35502
35503done
35504# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35505rm -f conftest.i conftest.err conftest.$ac_ext
35506if $ac_preproc_ok; then :
35507
35508else
35509  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35510$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35511as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35512See \`config.log' for more details" "$LINENO" 5; }
35513fi
35514
35515ac_ext=cpp
35516ac_cpp='$CXXCPP $CPPFLAGS'
35517ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35518ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35519ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35520
35521
35522  # Only process if variable expands to non-empty
35523
35524  if test "x$CPP" != x; then
35525    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35526
35527  # First separate the path from the arguments. This will split at the first
35528  # space.
35529  complete="$CPP"
35530  path="${complete%% *}"
35531  tmp="$complete EOL"
35532  arguments="${tmp#* }"
35533
35534  # Input might be given as Windows format, start by converting to
35535  # unix format.
35536  new_path=`$CYGPATH -u "$path"`
35537
35538  # Now try to locate executable using which
35539  new_path=`$WHICH "$new_path" 2> /dev/null`
35540  # bat and cmd files are not always considered executable in cygwin causing which
35541  # to not find them
35542  if test "x$new_path" = x \
35543      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35544      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35545    new_path=`$CYGPATH -u "$path"`
35546  fi
35547  if test "x$new_path" = x; then
35548    # Oops. Which didn't find the executable.
35549    # The splitting of arguments from the executable at a space might have been incorrect,
35550    # since paths with space are more likely in Windows. Give it another try with the whole
35551    # argument.
35552    path="$complete"
35553    arguments="EOL"
35554    new_path=`$CYGPATH -u "$path"`
35555    new_path=`$WHICH "$new_path" 2> /dev/null`
35556    # bat and cmd files are not always considered executable in cygwin causing which
35557    # to not find them
35558    if test "x$new_path" = x \
35559        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35560        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35561      new_path=`$CYGPATH -u "$path"`
35562    fi
35563    if test "x$new_path" = x; then
35564      # It's still not found. Now this is an unrecoverable error.
35565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35566$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35567      has_space=`$ECHO "$complete" | $GREP " "`
35568      if test "x$has_space" != x; then
35569        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35570$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35571      fi
35572      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35573    fi
35574  fi
35575
35576  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35577  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35578  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35579  # "foo.exe" is OK but "foo" is an error.
35580  #
35581  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35582  # It is also a way to make sure we got the proper file name for the real test later on.
35583  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35584  if test "x$test_shortpath" = x; then
35585    # Short path failed, file does not exist as specified.
35586    # Try adding .exe or .cmd
35587    if test -f "${new_path}.exe"; then
35588      input_to_shortpath="${new_path}.exe"
35589    elif test -f "${new_path}.cmd"; then
35590      input_to_shortpath="${new_path}.cmd"
35591    else
35592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35593$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35594      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35595$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35596      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35597    fi
35598  else
35599    input_to_shortpath="$new_path"
35600  fi
35601
35602  # Call helper function which possibly converts this using DOS-style short mode.
35603  # If so, the updated path is stored in $new_path.
35604  new_path="$input_to_shortpath"
35605
35606  input_path="$input_to_shortpath"
35607  # Check if we need to convert this using DOS-style short mode. If the path
35608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35609  # take no chances and rewrite it.
35610  # Note: m4 eats our [], so we need to use [ and ] instead.
35611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35612  if test "x$has_forbidden_chars" != x; then
35613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35614    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35615    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35616    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35617      # Going to short mode and back again did indeed matter. Since short mode is
35618      # case insensitive, let's make it lowercase to improve readability.
35619      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35620      # Now convert it back to Unix-style (cygpath)
35621      input_path=`$CYGPATH -u "$shortmode_path"`
35622      new_path="$input_path"
35623    fi
35624  fi
35625
35626  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35627  if test "x$test_cygdrive_prefix" = x; then
35628    # As a simple fix, exclude /usr/bin since it's not a real path.
35629    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35630      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35631      # a path prefixed by /cygdrive for fixpath to work.
35632      new_path="$CYGWIN_ROOT_PATH$input_path"
35633    fi
35634  fi
35635
35636  # remove trailing .exe if any
35637  new_path="${new_path/%.exe/}"
35638
35639    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35640
35641  # First separate the path from the arguments. This will split at the first
35642  # space.
35643  complete="$CPP"
35644  path="${complete%% *}"
35645  tmp="$complete EOL"
35646  arguments="${tmp#* }"
35647
35648  # Input might be given as Windows format, start by converting to
35649  # unix format.
35650  new_path="$path"
35651
35652  windows_path="$new_path"
35653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35654    unix_path=`$CYGPATH -u "$windows_path"`
35655    new_path="$unix_path"
35656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35658    new_path="$unix_path"
35659  fi
35660
35661
35662  # Now try to locate executable using which
35663  new_path=`$WHICH "$new_path" 2> /dev/null`
35664
35665  if test "x$new_path" = x; then
35666    # Oops. Which didn't find the executable.
35667    # The splitting of arguments from the executable at a space might have been incorrect,
35668    # since paths with space are more likely in Windows. Give it another try with the whole
35669    # argument.
35670    path="$complete"
35671    arguments="EOL"
35672    new_path="$path"
35673
35674  windows_path="$new_path"
35675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35676    unix_path=`$CYGPATH -u "$windows_path"`
35677    new_path="$unix_path"
35678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35680    new_path="$unix_path"
35681  fi
35682
35683
35684    new_path=`$WHICH "$new_path" 2> /dev/null`
35685    # bat and cmd files are not always considered executable in MSYS causing which
35686    # to not find them
35687    if test "x$new_path" = x \
35688        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35689        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35690      new_path="$path"
35691
35692  windows_path="$new_path"
35693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35694    unix_path=`$CYGPATH -u "$windows_path"`
35695    new_path="$unix_path"
35696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35698    new_path="$unix_path"
35699  fi
35700
35701    fi
35702
35703    if test "x$new_path" = x; then
35704      # It's still not found. Now this is an unrecoverable error.
35705      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35706$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35707      has_space=`$ECHO "$complete" | $GREP " "`
35708      if test "x$has_space" != x; then
35709        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35710$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35711      fi
35712      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35713    fi
35714  fi
35715
35716  # Now new_path has a complete unix path to the binary
35717  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35718    # Keep paths in /bin as-is, but remove trailing .exe if any
35719    new_path="${new_path/%.exe/}"
35720    # Do not save /bin paths to all_fixpath_prefixes!
35721  else
35722    # Not in mixed or Windows style, start by that.
35723    new_path=`cmd //c echo $new_path`
35724
35725  input_path="$new_path"
35726  # Check if we need to convert this using DOS-style short mode. If the path
35727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35728  # take no chances and rewrite it.
35729  # Note: m4 eats our [], so we need to use [ and ] instead.
35730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35731  if test "x$has_forbidden_chars" != x; then
35732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35734  fi
35735
35736    # Output is in $new_path
35737
35738  windows_path="$new_path"
35739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35740    unix_path=`$CYGPATH -u "$windows_path"`
35741    new_path="$unix_path"
35742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35744    new_path="$unix_path"
35745  fi
35746
35747    # remove trailing .exe if any
35748    new_path="${new_path/%.exe/}"
35749
35750    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35751    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35752  fi
35753
35754    else
35755      # We're on a unix platform. Hooray! :)
35756      # First separate the path from the arguments. This will split at the first
35757      # space.
35758      complete="$CPP"
35759      path="${complete%% *}"
35760      tmp="$complete EOL"
35761      arguments="${tmp#* }"
35762
35763      # Cannot rely on the command "which" here since it doesn't always work.
35764      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35765      if test -z "$is_absolute_path"; then
35766        # Path to executable is not absolute. Find it.
35767        IFS_save="$IFS"
35768        IFS=:
35769        for p in $PATH; do
35770          if test -f "$p/$path" && test -x "$p/$path"; then
35771            new_path="$p/$path"
35772            break
35773          fi
35774        done
35775        IFS="$IFS_save"
35776      else
35777        # This is an absolute path, we can use it without further modifications.
35778        new_path="$path"
35779      fi
35780
35781      if test "x$new_path" = x; then
35782        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35783$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35784        has_space=`$ECHO "$complete" | $GREP " "`
35785        if test "x$has_space" != x; then
35786          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35787$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35788        fi
35789        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35790      fi
35791    fi
35792
35793    # Now join together the path and the arguments once again
35794    if test "x$arguments" != xEOL; then
35795      new_complete="$new_path ${arguments% *}"
35796    else
35797      new_complete="$new_path"
35798    fi
35799
35800    if test "x$complete" != "x$new_complete"; then
35801      CPP="$new_complete"
35802      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35803$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35804    fi
35805  fi
35806
35807  ac_ext=cpp
35808ac_cpp='$CXXCPP $CPPFLAGS'
35809ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35810ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35811ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35813$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35814if test -z "$CXXCPP"; then
35815  if ${ac_cv_prog_CXXCPP+:} false; then :
35816  $as_echo_n "(cached) " >&6
35817else
35818      # Double quotes because CXXCPP needs to be expanded
35819    for CXXCPP in "$CXX -E" "/lib/cpp"
35820    do
35821      ac_preproc_ok=false
35822for ac_cxx_preproc_warn_flag in '' yes
35823do
35824  # Use a header file that comes with gcc, so configuring glibc
35825  # with a fresh cross-compiler works.
35826  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35827  # <limits.h> exists even on freestanding compilers.
35828  # On the NeXT, cc -E runs the code through the compiler's parser,
35829  # not just through cpp. "Syntax error" is here to catch this case.
35830  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35831/* end confdefs.h.  */
35832#ifdef __STDC__
35833# include <limits.h>
35834#else
35835# include <assert.h>
35836#endif
35837		     Syntax error
35838_ACEOF
35839if ac_fn_cxx_try_cpp "$LINENO"; then :
35840
35841else
35842  # Broken: fails on valid input.
35843continue
35844fi
35845rm -f conftest.err conftest.i conftest.$ac_ext
35846
35847  # OK, works on sane cases.  Now check whether nonexistent headers
35848  # can be detected and how.
35849  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35850/* end confdefs.h.  */
35851#include <ac_nonexistent.h>
35852_ACEOF
35853if ac_fn_cxx_try_cpp "$LINENO"; then :
35854  # Broken: success on invalid input.
35855continue
35856else
35857  # Passes both tests.
35858ac_preproc_ok=:
35859break
35860fi
35861rm -f conftest.err conftest.i conftest.$ac_ext
35862
35863done
35864# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35865rm -f conftest.i conftest.err conftest.$ac_ext
35866if $ac_preproc_ok; then :
35867  break
35868fi
35869
35870    done
35871    ac_cv_prog_CXXCPP=$CXXCPP
35872
35873fi
35874  CXXCPP=$ac_cv_prog_CXXCPP
35875else
35876  ac_cv_prog_CXXCPP=$CXXCPP
35877fi
35878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35879$as_echo "$CXXCPP" >&6; }
35880ac_preproc_ok=false
35881for ac_cxx_preproc_warn_flag in '' yes
35882do
35883  # Use a header file that comes with gcc, so configuring glibc
35884  # with a fresh cross-compiler works.
35885  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35886  # <limits.h> exists even on freestanding compilers.
35887  # On the NeXT, cc -E runs the code through the compiler's parser,
35888  # not just through cpp. "Syntax error" is here to catch this case.
35889  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35890/* end confdefs.h.  */
35891#ifdef __STDC__
35892# include <limits.h>
35893#else
35894# include <assert.h>
35895#endif
35896		     Syntax error
35897_ACEOF
35898if ac_fn_cxx_try_cpp "$LINENO"; then :
35899
35900else
35901  # Broken: fails on valid input.
35902continue
35903fi
35904rm -f conftest.err conftest.i conftest.$ac_ext
35905
35906  # OK, works on sane cases.  Now check whether nonexistent headers
35907  # can be detected and how.
35908  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35909/* end confdefs.h.  */
35910#include <ac_nonexistent.h>
35911_ACEOF
35912if ac_fn_cxx_try_cpp "$LINENO"; then :
35913  # Broken: success on invalid input.
35914continue
35915else
35916  # Passes both tests.
35917ac_preproc_ok=:
35918break
35919fi
35920rm -f conftest.err conftest.i conftest.$ac_ext
35921
35922done
35923# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35924rm -f conftest.i conftest.err conftest.$ac_ext
35925if $ac_preproc_ok; then :
35926
35927else
35928  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35929$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35930as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35931See \`config.log' for more details" "$LINENO" 5; }
35932fi
35933
35934ac_ext=cpp
35935ac_cpp='$CXXCPP $CPPFLAGS'
35936ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35937ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35938ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35939
35940
35941  # Only process if variable expands to non-empty
35942
35943  if test "x$CXXCPP" != x; then
35944    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35945
35946  # First separate the path from the arguments. This will split at the first
35947  # space.
35948  complete="$CXXCPP"
35949  path="${complete%% *}"
35950  tmp="$complete EOL"
35951  arguments="${tmp#* }"
35952
35953  # Input might be given as Windows format, start by converting to
35954  # unix format.
35955  new_path=`$CYGPATH -u "$path"`
35956
35957  # Now try to locate executable using which
35958  new_path=`$WHICH "$new_path" 2> /dev/null`
35959  # bat and cmd files are not always considered executable in cygwin causing which
35960  # to not find them
35961  if test "x$new_path" = x \
35962      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35963      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35964    new_path=`$CYGPATH -u "$path"`
35965  fi
35966  if test "x$new_path" = x; then
35967    # Oops. Which didn't find the executable.
35968    # The splitting of arguments from the executable at a space might have been incorrect,
35969    # since paths with space are more likely in Windows. Give it another try with the whole
35970    # argument.
35971    path="$complete"
35972    arguments="EOL"
35973    new_path=`$CYGPATH -u "$path"`
35974    new_path=`$WHICH "$new_path" 2> /dev/null`
35975    # bat and cmd files are not always considered executable in cygwin causing which
35976    # to not find them
35977    if test "x$new_path" = x \
35978        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35979        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35980      new_path=`$CYGPATH -u "$path"`
35981    fi
35982    if test "x$new_path" = x; then
35983      # It's still not found. Now this is an unrecoverable error.
35984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35985$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35986      has_space=`$ECHO "$complete" | $GREP " "`
35987      if test "x$has_space" != x; then
35988        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35989$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35990      fi
35991      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35992    fi
35993  fi
35994
35995  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35996  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35997  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35998  # "foo.exe" is OK but "foo" is an error.
35999  #
36000  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36001  # It is also a way to make sure we got the proper file name for the real test later on.
36002  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36003  if test "x$test_shortpath" = x; then
36004    # Short path failed, file does not exist as specified.
36005    # Try adding .exe or .cmd
36006    if test -f "${new_path}.exe"; then
36007      input_to_shortpath="${new_path}.exe"
36008    elif test -f "${new_path}.cmd"; then
36009      input_to_shortpath="${new_path}.cmd"
36010    else
36011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36012$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36013      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36014$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36015      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36016    fi
36017  else
36018    input_to_shortpath="$new_path"
36019  fi
36020
36021  # Call helper function which possibly converts this using DOS-style short mode.
36022  # If so, the updated path is stored in $new_path.
36023  new_path="$input_to_shortpath"
36024
36025  input_path="$input_to_shortpath"
36026  # Check if we need to convert this using DOS-style short mode. If the path
36027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36028  # take no chances and rewrite it.
36029  # Note: m4 eats our [], so we need to use [ and ] instead.
36030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36031  if test "x$has_forbidden_chars" != x; then
36032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36033    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36034    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36035    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36036      # Going to short mode and back again did indeed matter. Since short mode is
36037      # case insensitive, let's make it lowercase to improve readability.
36038      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36039      # Now convert it back to Unix-style (cygpath)
36040      input_path=`$CYGPATH -u "$shortmode_path"`
36041      new_path="$input_path"
36042    fi
36043  fi
36044
36045  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36046  if test "x$test_cygdrive_prefix" = x; then
36047    # As a simple fix, exclude /usr/bin since it's not a real path.
36048    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36049      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36050      # a path prefixed by /cygdrive for fixpath to work.
36051      new_path="$CYGWIN_ROOT_PATH$input_path"
36052    fi
36053  fi
36054
36055  # remove trailing .exe if any
36056  new_path="${new_path/%.exe/}"
36057
36058    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36059
36060  # First separate the path from the arguments. This will split at the first
36061  # space.
36062  complete="$CXXCPP"
36063  path="${complete%% *}"
36064  tmp="$complete EOL"
36065  arguments="${tmp#* }"
36066
36067  # Input might be given as Windows format, start by converting to
36068  # unix format.
36069  new_path="$path"
36070
36071  windows_path="$new_path"
36072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36073    unix_path=`$CYGPATH -u "$windows_path"`
36074    new_path="$unix_path"
36075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36077    new_path="$unix_path"
36078  fi
36079
36080
36081  # Now try to locate executable using which
36082  new_path=`$WHICH "$new_path" 2> /dev/null`
36083
36084  if test "x$new_path" = x; then
36085    # Oops. Which didn't find the executable.
36086    # The splitting of arguments from the executable at a space might have been incorrect,
36087    # since paths with space are more likely in Windows. Give it another try with the whole
36088    # argument.
36089    path="$complete"
36090    arguments="EOL"
36091    new_path="$path"
36092
36093  windows_path="$new_path"
36094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36095    unix_path=`$CYGPATH -u "$windows_path"`
36096    new_path="$unix_path"
36097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36099    new_path="$unix_path"
36100  fi
36101
36102
36103    new_path=`$WHICH "$new_path" 2> /dev/null`
36104    # bat and cmd files are not always considered executable in MSYS causing which
36105    # to not find them
36106    if test "x$new_path" = x \
36107        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36108        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36109      new_path="$path"
36110
36111  windows_path="$new_path"
36112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36113    unix_path=`$CYGPATH -u "$windows_path"`
36114    new_path="$unix_path"
36115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36117    new_path="$unix_path"
36118  fi
36119
36120    fi
36121
36122    if test "x$new_path" = x; then
36123      # It's still not found. Now this is an unrecoverable error.
36124      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36125$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36126      has_space=`$ECHO "$complete" | $GREP " "`
36127      if test "x$has_space" != x; then
36128        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36129$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36130      fi
36131      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36132    fi
36133  fi
36134
36135  # Now new_path has a complete unix path to the binary
36136  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36137    # Keep paths in /bin as-is, but remove trailing .exe if any
36138    new_path="${new_path/%.exe/}"
36139    # Do not save /bin paths to all_fixpath_prefixes!
36140  else
36141    # Not in mixed or Windows style, start by that.
36142    new_path=`cmd //c echo $new_path`
36143
36144  input_path="$new_path"
36145  # Check if we need to convert this using DOS-style short mode. If the path
36146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36147  # take no chances and rewrite it.
36148  # Note: m4 eats our [], so we need to use [ and ] instead.
36149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36150  if test "x$has_forbidden_chars" != x; then
36151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36152    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36153  fi
36154
36155    # Output is in $new_path
36156
36157  windows_path="$new_path"
36158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36159    unix_path=`$CYGPATH -u "$windows_path"`
36160    new_path="$unix_path"
36161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36163    new_path="$unix_path"
36164  fi
36165
36166    # remove trailing .exe if any
36167    new_path="${new_path/%.exe/}"
36168
36169    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36170    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36171  fi
36172
36173    else
36174      # We're on a unix platform. Hooray! :)
36175      # First separate the path from the arguments. This will split at the first
36176      # space.
36177      complete="$CXXCPP"
36178      path="${complete%% *}"
36179      tmp="$complete EOL"
36180      arguments="${tmp#* }"
36181
36182      # Cannot rely on the command "which" here since it doesn't always work.
36183      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36184      if test -z "$is_absolute_path"; then
36185        # Path to executable is not absolute. Find it.
36186        IFS_save="$IFS"
36187        IFS=:
36188        for p in $PATH; do
36189          if test -f "$p/$path" && test -x "$p/$path"; then
36190            new_path="$p/$path"
36191            break
36192          fi
36193        done
36194        IFS="$IFS_save"
36195      else
36196        # This is an absolute path, we can use it without further modifications.
36197        new_path="$path"
36198      fi
36199
36200      if test "x$new_path" = x; then
36201        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36202$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36203        has_space=`$ECHO "$complete" | $GREP " "`
36204        if test "x$has_space" != x; then
36205          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36206$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36207        fi
36208        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36209      fi
36210    fi
36211
36212    # Now join together the path and the arguments once again
36213    if test "x$arguments" != xEOL; then
36214      new_complete="$new_path ${arguments% *}"
36215    else
36216      new_complete="$new_path"
36217    fi
36218
36219    if test "x$complete" != "x$new_complete"; then
36220      CXXCPP="$new_complete"
36221      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36222$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36223    fi
36224  fi
36225
36226
36227  #
36228  # Setup the linker (LD)
36229  #
36230  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36231    # In the Microsoft toolchain we have a separate LD command "link".
36232    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36233    # a cygwin program for something completely different.
36234    # Extract the first word of "link", so it can be a program name with args.
36235set dummy link; ac_word=$2
36236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36237$as_echo_n "checking for $ac_word... " >&6; }
36238if ${ac_cv_prog_LD+:} false; then :
36239  $as_echo_n "(cached) " >&6
36240else
36241  if test -n "$LD"; then
36242  ac_cv_prog_LD="$LD" # Let the user override the test.
36243else
36244  ac_prog_rejected=no
36245as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36246for as_dir in $PATH
36247do
36248  IFS=$as_save_IFS
36249  test -z "$as_dir" && as_dir=.
36250    for ac_exec_ext in '' $ac_executable_extensions; do
36251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36252    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36253       ac_prog_rejected=yes
36254       continue
36255     fi
36256    ac_cv_prog_LD="link"
36257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36258    break 2
36259  fi
36260done
36261  done
36262IFS=$as_save_IFS
36263
36264if test $ac_prog_rejected = yes; then
36265  # We found a bogon in the path, so make sure we never use it.
36266  set dummy $ac_cv_prog_LD
36267  shift
36268  if test $# != 0; then
36269    # We chose a different compiler from the bogus one.
36270    # However, it has the same basename, so the bogon will be chosen
36271    # first if we set LD to just the basename; use the full file name.
36272    shift
36273    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36274  fi
36275fi
36276fi
36277fi
36278LD=$ac_cv_prog_LD
36279if test -n "$LD"; then
36280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36281$as_echo "$LD" >&6; }
36282else
36283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36284$as_echo "no" >&6; }
36285fi
36286
36287
36288
36289  # Only process if variable expands to non-empty
36290
36291  if test "x$LD" != x; then
36292    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36293
36294  # First separate the path from the arguments. This will split at the first
36295  # space.
36296  complete="$LD"
36297  path="${complete%% *}"
36298  tmp="$complete EOL"
36299  arguments="${tmp#* }"
36300
36301  # Input might be given as Windows format, start by converting to
36302  # unix format.
36303  new_path=`$CYGPATH -u "$path"`
36304
36305  # Now try to locate executable using which
36306  new_path=`$WHICH "$new_path" 2> /dev/null`
36307  # bat and cmd files are not always considered executable in cygwin causing which
36308  # to not find them
36309  if test "x$new_path" = x \
36310      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36311      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36312    new_path=`$CYGPATH -u "$path"`
36313  fi
36314  if test "x$new_path" = x; then
36315    # Oops. Which didn't find the executable.
36316    # The splitting of arguments from the executable at a space might have been incorrect,
36317    # since paths with space are more likely in Windows. Give it another try with the whole
36318    # argument.
36319    path="$complete"
36320    arguments="EOL"
36321    new_path=`$CYGPATH -u "$path"`
36322    new_path=`$WHICH "$new_path" 2> /dev/null`
36323    # bat and cmd files are not always considered executable in cygwin causing which
36324    # to not find them
36325    if test "x$new_path" = x \
36326        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36327        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36328      new_path=`$CYGPATH -u "$path"`
36329    fi
36330    if test "x$new_path" = x; then
36331      # It's still not found. Now this is an unrecoverable error.
36332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36333$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36334      has_space=`$ECHO "$complete" | $GREP " "`
36335      if test "x$has_space" != x; then
36336        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36337$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36338      fi
36339      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36340    fi
36341  fi
36342
36343  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36344  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36345  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36346  # "foo.exe" is OK but "foo" is an error.
36347  #
36348  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36349  # It is also a way to make sure we got the proper file name for the real test later on.
36350  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36351  if test "x$test_shortpath" = x; then
36352    # Short path failed, file does not exist as specified.
36353    # Try adding .exe or .cmd
36354    if test -f "${new_path}.exe"; then
36355      input_to_shortpath="${new_path}.exe"
36356    elif test -f "${new_path}.cmd"; then
36357      input_to_shortpath="${new_path}.cmd"
36358    else
36359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36360$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36361      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36362$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36363      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36364    fi
36365  else
36366    input_to_shortpath="$new_path"
36367  fi
36368
36369  # Call helper function which possibly converts this using DOS-style short mode.
36370  # If so, the updated path is stored in $new_path.
36371  new_path="$input_to_shortpath"
36372
36373  input_path="$input_to_shortpath"
36374  # Check if we need to convert this using DOS-style short mode. If the path
36375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36376  # take no chances and rewrite it.
36377  # Note: m4 eats our [], so we need to use [ and ] instead.
36378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36379  if test "x$has_forbidden_chars" != x; then
36380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36384      # Going to short mode and back again did indeed matter. Since short mode is
36385      # case insensitive, let's make it lowercase to improve readability.
36386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36387      # Now convert it back to Unix-style (cygpath)
36388      input_path=`$CYGPATH -u "$shortmode_path"`
36389      new_path="$input_path"
36390    fi
36391  fi
36392
36393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36394  if test "x$test_cygdrive_prefix" = x; then
36395    # As a simple fix, exclude /usr/bin since it's not a real path.
36396    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36398      # a path prefixed by /cygdrive for fixpath to work.
36399      new_path="$CYGWIN_ROOT_PATH$input_path"
36400    fi
36401  fi
36402
36403  # remove trailing .exe if any
36404  new_path="${new_path/%.exe/}"
36405
36406    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36407
36408  # First separate the path from the arguments. This will split at the first
36409  # space.
36410  complete="$LD"
36411  path="${complete%% *}"
36412  tmp="$complete EOL"
36413  arguments="${tmp#* }"
36414
36415  # Input might be given as Windows format, start by converting to
36416  # unix format.
36417  new_path="$path"
36418
36419  windows_path="$new_path"
36420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36421    unix_path=`$CYGPATH -u "$windows_path"`
36422    new_path="$unix_path"
36423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36425    new_path="$unix_path"
36426  fi
36427
36428
36429  # Now try to locate executable using which
36430  new_path=`$WHICH "$new_path" 2> /dev/null`
36431
36432  if test "x$new_path" = x; then
36433    # Oops. Which didn't find the executable.
36434    # The splitting of arguments from the executable at a space might have been incorrect,
36435    # since paths with space are more likely in Windows. Give it another try with the whole
36436    # argument.
36437    path="$complete"
36438    arguments="EOL"
36439    new_path="$path"
36440
36441  windows_path="$new_path"
36442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36443    unix_path=`$CYGPATH -u "$windows_path"`
36444    new_path="$unix_path"
36445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36447    new_path="$unix_path"
36448  fi
36449
36450
36451    new_path=`$WHICH "$new_path" 2> /dev/null`
36452    # bat and cmd files are not always considered executable in MSYS causing which
36453    # to not find them
36454    if test "x$new_path" = x \
36455        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36456        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36457      new_path="$path"
36458
36459  windows_path="$new_path"
36460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36461    unix_path=`$CYGPATH -u "$windows_path"`
36462    new_path="$unix_path"
36463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36465    new_path="$unix_path"
36466  fi
36467
36468    fi
36469
36470    if test "x$new_path" = x; then
36471      # It's still not found. Now this is an unrecoverable error.
36472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36473$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36474      has_space=`$ECHO "$complete" | $GREP " "`
36475      if test "x$has_space" != x; then
36476        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36477$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36478      fi
36479      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36480    fi
36481  fi
36482
36483  # Now new_path has a complete unix path to the binary
36484  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36485    # Keep paths in /bin as-is, but remove trailing .exe if any
36486    new_path="${new_path/%.exe/}"
36487    # Do not save /bin paths to all_fixpath_prefixes!
36488  else
36489    # Not in mixed or Windows style, start by that.
36490    new_path=`cmd //c echo $new_path`
36491
36492  input_path="$new_path"
36493  # Check if we need to convert this using DOS-style short mode. If the path
36494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36495  # take no chances and rewrite it.
36496  # Note: m4 eats our [], so we need to use [ and ] instead.
36497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36498  if test "x$has_forbidden_chars" != x; then
36499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36501  fi
36502
36503    # Output is in $new_path
36504
36505  windows_path="$new_path"
36506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36507    unix_path=`$CYGPATH -u "$windows_path"`
36508    new_path="$unix_path"
36509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36511    new_path="$unix_path"
36512  fi
36513
36514    # remove trailing .exe if any
36515    new_path="${new_path/%.exe/}"
36516
36517    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36518    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36519  fi
36520
36521    else
36522      # We're on a unix platform. Hooray! :)
36523      # First separate the path from the arguments. This will split at the first
36524      # space.
36525      complete="$LD"
36526      path="${complete%% *}"
36527      tmp="$complete EOL"
36528      arguments="${tmp#* }"
36529
36530      # Cannot rely on the command "which" here since it doesn't always work.
36531      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36532      if test -z "$is_absolute_path"; then
36533        # Path to executable is not absolute. Find it.
36534        IFS_save="$IFS"
36535        IFS=:
36536        for p in $PATH; do
36537          if test -f "$p/$path" && test -x "$p/$path"; then
36538            new_path="$p/$path"
36539            break
36540          fi
36541        done
36542        IFS="$IFS_save"
36543      else
36544        # This is an absolute path, we can use it without further modifications.
36545        new_path="$path"
36546      fi
36547
36548      if test "x$new_path" = x; then
36549        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36550$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36551        has_space=`$ECHO "$complete" | $GREP " "`
36552        if test "x$has_space" != x; then
36553          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36554$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36555        fi
36556        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36557      fi
36558    fi
36559
36560    # Now join together the path and the arguments once again
36561    if test "x$arguments" != xEOL; then
36562      new_complete="$new_path ${arguments% *}"
36563    else
36564      new_complete="$new_path"
36565    fi
36566
36567    if test "x$complete" != "x$new_complete"; then
36568      LD="$new_complete"
36569      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36570$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36571    fi
36572  fi
36573
36574    # Verify that we indeed succeeded with this trick.
36575    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36576$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36577    "$LD" --version > /dev/null
36578    if test $? -eq 0 ; then
36579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36580$as_echo "no" >&6; }
36581      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36582    else
36583      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36584$as_echo "yes" >&6; }
36585    fi
36586    LDCXX="$LD"
36587  else
36588    # All other toolchains use the compiler to link.
36589    LD="$CC"
36590    LDCXX="$CXX"
36591  fi
36592
36593  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36594
36595
36596  #
36597  # Setup the assembler (AS)
36598  #
36599  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36600
36601
36602  # Publish this variable in the help.
36603
36604
36605  if [ -z "${AS+x}" ]; then
36606    # The variable is not set by user, try to locate tool using the code snippet
36607    for ac_prog in as
36608do
36609  # Extract the first word of "$ac_prog", so it can be a program name with args.
36610set dummy $ac_prog; ac_word=$2
36611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36612$as_echo_n "checking for $ac_word... " >&6; }
36613if ${ac_cv_path_AS+:} false; then :
36614  $as_echo_n "(cached) " >&6
36615else
36616  case $AS in
36617  [\\/]* | ?:[\\/]*)
36618  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36619  ;;
36620  *)
36621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36622for as_dir in $PATH
36623do
36624  IFS=$as_save_IFS
36625  test -z "$as_dir" && as_dir=.
36626    for ac_exec_ext in '' $ac_executable_extensions; do
36627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36628    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36630    break 2
36631  fi
36632done
36633  done
36634IFS=$as_save_IFS
36635
36636  ;;
36637esac
36638fi
36639AS=$ac_cv_path_AS
36640if test -n "$AS"; then
36641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36642$as_echo "$AS" >&6; }
36643else
36644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36645$as_echo "no" >&6; }
36646fi
36647
36648
36649  test -n "$AS" && break
36650done
36651
36652  else
36653    # The variable is set, but is it from the command line or the environment?
36654
36655    # Try to remove the string !AS! from our list.
36656    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36657    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36658      # If it failed, the variable was not from the command line. Ignore it,
36659      # but warn the user (except for BASH, which is always set by the calling BASH).
36660      if test "xAS" != xBASH; then
36661        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36662$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36663      fi
36664      # Try to locate tool using the code snippet
36665      for ac_prog in as
36666do
36667  # Extract the first word of "$ac_prog", so it can be a program name with args.
36668set dummy $ac_prog; ac_word=$2
36669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36670$as_echo_n "checking for $ac_word... " >&6; }
36671if ${ac_cv_path_AS+:} false; then :
36672  $as_echo_n "(cached) " >&6
36673else
36674  case $AS in
36675  [\\/]* | ?:[\\/]*)
36676  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36677  ;;
36678  *)
36679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36680for as_dir in $PATH
36681do
36682  IFS=$as_save_IFS
36683  test -z "$as_dir" && as_dir=.
36684    for ac_exec_ext in '' $ac_executable_extensions; do
36685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36686    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36688    break 2
36689  fi
36690done
36691  done
36692IFS=$as_save_IFS
36693
36694  ;;
36695esac
36696fi
36697AS=$ac_cv_path_AS
36698if test -n "$AS"; then
36699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36700$as_echo "$AS" >&6; }
36701else
36702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36703$as_echo "no" >&6; }
36704fi
36705
36706
36707  test -n "$AS" && break
36708done
36709
36710    else
36711      # If it succeeded, then it was overridden by the user. We will use it
36712      # for the tool.
36713
36714      # First remove it from the list of overridden variables, so we can test
36715      # for unknown variables in the end.
36716      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36717
36718      # Check if we try to supply an empty value
36719      if test "x$AS" = x; then
36720        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36721$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36722        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36723$as_echo_n "checking for AS... " >&6; }
36724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36725$as_echo "disabled" >&6; }
36726      else
36727        # Check if the provided tool contains a complete path.
36728        tool_specified="$AS"
36729        tool_basename="${tool_specified##*/}"
36730        if test "x$tool_basename" = "x$tool_specified"; then
36731          # A command without a complete path is provided, search $PATH.
36732          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36733$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36734          # Extract the first word of "$tool_basename", so it can be a program name with args.
36735set dummy $tool_basename; ac_word=$2
36736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36737$as_echo_n "checking for $ac_word... " >&6; }
36738if ${ac_cv_path_AS+:} false; then :
36739  $as_echo_n "(cached) " >&6
36740else
36741  case $AS in
36742  [\\/]* | ?:[\\/]*)
36743  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36744  ;;
36745  *)
36746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36747for as_dir in $PATH
36748do
36749  IFS=$as_save_IFS
36750  test -z "$as_dir" && as_dir=.
36751    for ac_exec_ext in '' $ac_executable_extensions; do
36752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36753    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36755    break 2
36756  fi
36757done
36758  done
36759IFS=$as_save_IFS
36760
36761  ;;
36762esac
36763fi
36764AS=$ac_cv_path_AS
36765if test -n "$AS"; then
36766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36767$as_echo "$AS" >&6; }
36768else
36769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36770$as_echo "no" >&6; }
36771fi
36772
36773
36774          if test "x$AS" = x; then
36775            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36776          fi
36777        else
36778          # Otherwise we believe it is a complete path. Use it as it is.
36779          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36780$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36781          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36782$as_echo_n "checking for AS... " >&6; }
36783          if test ! -x "$tool_specified"; then
36784            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36785$as_echo "not found" >&6; }
36786            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36787          fi
36788          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36789$as_echo "$tool_specified" >&6; }
36790        fi
36791      fi
36792    fi
36793
36794  fi
36795
36796
36797
36798  # Only process if variable expands to non-empty
36799
36800  if test "x$AS" != x; then
36801    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36802
36803  # First separate the path from the arguments. This will split at the first
36804  # space.
36805  complete="$AS"
36806  path="${complete%% *}"
36807  tmp="$complete EOL"
36808  arguments="${tmp#* }"
36809
36810  # Input might be given as Windows format, start by converting to
36811  # unix format.
36812  new_path=`$CYGPATH -u "$path"`
36813
36814  # Now try to locate executable using which
36815  new_path=`$WHICH "$new_path" 2> /dev/null`
36816  # bat and cmd files are not always considered executable in cygwin causing which
36817  # to not find them
36818  if test "x$new_path" = x \
36819      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36820      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36821    new_path=`$CYGPATH -u "$path"`
36822  fi
36823  if test "x$new_path" = x; then
36824    # Oops. Which didn't find the executable.
36825    # The splitting of arguments from the executable at a space might have been incorrect,
36826    # since paths with space are more likely in Windows. Give it another try with the whole
36827    # argument.
36828    path="$complete"
36829    arguments="EOL"
36830    new_path=`$CYGPATH -u "$path"`
36831    new_path=`$WHICH "$new_path" 2> /dev/null`
36832    # bat and cmd files are not always considered executable in cygwin causing which
36833    # to not find them
36834    if test "x$new_path" = x \
36835        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36836        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36837      new_path=`$CYGPATH -u "$path"`
36838    fi
36839    if test "x$new_path" = x; then
36840      # It's still not found. Now this is an unrecoverable error.
36841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36842$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36843      has_space=`$ECHO "$complete" | $GREP " "`
36844      if test "x$has_space" != x; then
36845        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36846$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36847      fi
36848      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36849    fi
36850  fi
36851
36852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36855  # "foo.exe" is OK but "foo" is an error.
36856  #
36857  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36858  # It is also a way to make sure we got the proper file name for the real test later on.
36859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36860  if test "x$test_shortpath" = x; then
36861    # Short path failed, file does not exist as specified.
36862    # Try adding .exe or .cmd
36863    if test -f "${new_path}.exe"; then
36864      input_to_shortpath="${new_path}.exe"
36865    elif test -f "${new_path}.cmd"; then
36866      input_to_shortpath="${new_path}.cmd"
36867    else
36868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36869$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36870      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36871$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36872      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36873    fi
36874  else
36875    input_to_shortpath="$new_path"
36876  fi
36877
36878  # Call helper function which possibly converts this using DOS-style short mode.
36879  # If so, the updated path is stored in $new_path.
36880  new_path="$input_to_shortpath"
36881
36882  input_path="$input_to_shortpath"
36883  # Check if we need to convert this using DOS-style short mode. If the path
36884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36885  # take no chances and rewrite it.
36886  # Note: m4 eats our [], so we need to use [ and ] instead.
36887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36888  if test "x$has_forbidden_chars" != x; then
36889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36890    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36891    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36892    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36893      # Going to short mode and back again did indeed matter. Since short mode is
36894      # case insensitive, let's make it lowercase to improve readability.
36895      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36896      # Now convert it back to Unix-style (cygpath)
36897      input_path=`$CYGPATH -u "$shortmode_path"`
36898      new_path="$input_path"
36899    fi
36900  fi
36901
36902  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36903  if test "x$test_cygdrive_prefix" = x; then
36904    # As a simple fix, exclude /usr/bin since it's not a real path.
36905    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36906      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36907      # a path prefixed by /cygdrive for fixpath to work.
36908      new_path="$CYGWIN_ROOT_PATH$input_path"
36909    fi
36910  fi
36911
36912  # remove trailing .exe if any
36913  new_path="${new_path/%.exe/}"
36914
36915    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36916
36917  # First separate the path from the arguments. This will split at the first
36918  # space.
36919  complete="$AS"
36920  path="${complete%% *}"
36921  tmp="$complete EOL"
36922  arguments="${tmp#* }"
36923
36924  # Input might be given as Windows format, start by converting to
36925  # unix format.
36926  new_path="$path"
36927
36928  windows_path="$new_path"
36929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36930    unix_path=`$CYGPATH -u "$windows_path"`
36931    new_path="$unix_path"
36932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36934    new_path="$unix_path"
36935  fi
36936
36937
36938  # Now try to locate executable using which
36939  new_path=`$WHICH "$new_path" 2> /dev/null`
36940
36941  if test "x$new_path" = x; then
36942    # Oops. Which didn't find the executable.
36943    # The splitting of arguments from the executable at a space might have been incorrect,
36944    # since paths with space are more likely in Windows. Give it another try with the whole
36945    # argument.
36946    path="$complete"
36947    arguments="EOL"
36948    new_path="$path"
36949
36950  windows_path="$new_path"
36951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36952    unix_path=`$CYGPATH -u "$windows_path"`
36953    new_path="$unix_path"
36954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36956    new_path="$unix_path"
36957  fi
36958
36959
36960    new_path=`$WHICH "$new_path" 2> /dev/null`
36961    # bat and cmd files are not always considered executable in MSYS causing which
36962    # to not find them
36963    if test "x$new_path" = x \
36964        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36965        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36966      new_path="$path"
36967
36968  windows_path="$new_path"
36969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36970    unix_path=`$CYGPATH -u "$windows_path"`
36971    new_path="$unix_path"
36972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36974    new_path="$unix_path"
36975  fi
36976
36977    fi
36978
36979    if test "x$new_path" = x; then
36980      # It's still not found. Now this is an unrecoverable error.
36981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36982$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36983      has_space=`$ECHO "$complete" | $GREP " "`
36984      if test "x$has_space" != x; then
36985        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36986$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36987      fi
36988      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36989    fi
36990  fi
36991
36992  # Now new_path has a complete unix path to the binary
36993  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36994    # Keep paths in /bin as-is, but remove trailing .exe if any
36995    new_path="${new_path/%.exe/}"
36996    # Do not save /bin paths to all_fixpath_prefixes!
36997  else
36998    # Not in mixed or Windows style, start by that.
36999    new_path=`cmd //c echo $new_path`
37000
37001  input_path="$new_path"
37002  # Check if we need to convert this using DOS-style short mode. If the path
37003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37004  # take no chances and rewrite it.
37005  # Note: m4 eats our [], so we need to use [ and ] instead.
37006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37007  if test "x$has_forbidden_chars" != x; then
37008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37009    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37010  fi
37011
37012    # Output is in $new_path
37013
37014  windows_path="$new_path"
37015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37016    unix_path=`$CYGPATH -u "$windows_path"`
37017    new_path="$unix_path"
37018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37020    new_path="$unix_path"
37021  fi
37022
37023    # remove trailing .exe if any
37024    new_path="${new_path/%.exe/}"
37025
37026    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37027    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37028  fi
37029
37030    else
37031      # We're on a unix platform. Hooray! :)
37032      # First separate the path from the arguments. This will split at the first
37033      # space.
37034      complete="$AS"
37035      path="${complete%% *}"
37036      tmp="$complete EOL"
37037      arguments="${tmp#* }"
37038
37039      # Cannot rely on the command "which" here since it doesn't always work.
37040      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37041      if test -z "$is_absolute_path"; then
37042        # Path to executable is not absolute. Find it.
37043        IFS_save="$IFS"
37044        IFS=:
37045        for p in $PATH; do
37046          if test -f "$p/$path" && test -x "$p/$path"; then
37047            new_path="$p/$path"
37048            break
37049          fi
37050        done
37051        IFS="$IFS_save"
37052      else
37053        # This is an absolute path, we can use it without further modifications.
37054        new_path="$path"
37055      fi
37056
37057      if test "x$new_path" = x; then
37058        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37059$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37060        has_space=`$ECHO "$complete" | $GREP " "`
37061        if test "x$has_space" != x; then
37062          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37063$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37064        fi
37065        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37066      fi
37067    fi
37068
37069    # Now join together the path and the arguments once again
37070    if test "x$arguments" != xEOL; then
37071      new_complete="$new_path ${arguments% *}"
37072    else
37073      new_complete="$new_path"
37074    fi
37075
37076    if test "x$complete" != "x$new_complete"; then
37077      AS="$new_complete"
37078      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37079$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37080    fi
37081  fi
37082
37083    if test "x$AS" = x; then
37084      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37085    fi
37086  else
37087    # FIXME: is this correct for microsoft?
37088    AS="$CC -c"
37089  fi
37090
37091
37092  #
37093  # Setup the archiver (AR)
37094  #
37095  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37096    # The corresponding ar tool is lib.exe (used to create static libraries)
37097    # Extract the first word of "lib", so it can be a program name with args.
37098set dummy lib; ac_word=$2
37099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37100$as_echo_n "checking for $ac_word... " >&6; }
37101if ${ac_cv_prog_AR+:} false; then :
37102  $as_echo_n "(cached) " >&6
37103else
37104  if test -n "$AR"; then
37105  ac_cv_prog_AR="$AR" # Let the user override the test.
37106else
37107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37108for as_dir in $PATH
37109do
37110  IFS=$as_save_IFS
37111  test -z "$as_dir" && as_dir=.
37112    for ac_exec_ext in '' $ac_executable_extensions; do
37113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37114    ac_cv_prog_AR="lib"
37115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37116    break 2
37117  fi
37118done
37119  done
37120IFS=$as_save_IFS
37121
37122fi
37123fi
37124AR=$ac_cv_prog_AR
37125if test -n "$AR"; then
37126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37127$as_echo "$AR" >&6; }
37128else
37129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37130$as_echo "no" >&6; }
37131fi
37132
37133
37134  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37135
37136
37137  # Publish this variable in the help.
37138
37139
37140  if [ -z "${AR+x}" ]; then
37141    # The variable is not set by user, try to locate tool using the code snippet
37142    if test -n "$ac_tool_prefix"; then
37143  for ac_prog in ar gcc-ar
37144  do
37145    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37146set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37148$as_echo_n "checking for $ac_word... " >&6; }
37149if ${ac_cv_prog_AR+:} false; then :
37150  $as_echo_n "(cached) " >&6
37151else
37152  if test -n "$AR"; then
37153  ac_cv_prog_AR="$AR" # Let the user override the test.
37154else
37155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37156for as_dir in $PATH
37157do
37158  IFS=$as_save_IFS
37159  test -z "$as_dir" && as_dir=.
37160    for ac_exec_ext in '' $ac_executable_extensions; do
37161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37162    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37164    break 2
37165  fi
37166done
37167  done
37168IFS=$as_save_IFS
37169
37170fi
37171fi
37172AR=$ac_cv_prog_AR
37173if test -n "$AR"; then
37174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37175$as_echo "$AR" >&6; }
37176else
37177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37178$as_echo "no" >&6; }
37179fi
37180
37181
37182    test -n "$AR" && break
37183  done
37184fi
37185if test -z "$AR"; then
37186  ac_ct_AR=$AR
37187  for ac_prog in ar gcc-ar
37188do
37189  # Extract the first word of "$ac_prog", so it can be a program name with args.
37190set dummy $ac_prog; ac_word=$2
37191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37192$as_echo_n "checking for $ac_word... " >&6; }
37193if ${ac_cv_prog_ac_ct_AR+:} false; then :
37194  $as_echo_n "(cached) " >&6
37195else
37196  if test -n "$ac_ct_AR"; then
37197  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37198else
37199as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37200for as_dir in $PATH
37201do
37202  IFS=$as_save_IFS
37203  test -z "$as_dir" && as_dir=.
37204    for ac_exec_ext in '' $ac_executable_extensions; do
37205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37206    ac_cv_prog_ac_ct_AR="$ac_prog"
37207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37208    break 2
37209  fi
37210done
37211  done
37212IFS=$as_save_IFS
37213
37214fi
37215fi
37216ac_ct_AR=$ac_cv_prog_ac_ct_AR
37217if test -n "$ac_ct_AR"; then
37218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37219$as_echo "$ac_ct_AR" >&6; }
37220else
37221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37222$as_echo "no" >&6; }
37223fi
37224
37225
37226  test -n "$ac_ct_AR" && break
37227done
37228
37229  if test "x$ac_ct_AR" = x; then
37230    AR=""
37231  else
37232    case $cross_compiling:$ac_tool_warned in
37233yes:)
37234{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37235$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37236ac_tool_warned=yes ;;
37237esac
37238    AR=$ac_ct_AR
37239  fi
37240fi
37241
37242  else
37243    # The variable is set, but is it from the command line or the environment?
37244
37245    # Try to remove the string !AR! from our list.
37246    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37247    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37248      # If it failed, the variable was not from the command line. Ignore it,
37249      # but warn the user (except for BASH, which is always set by the calling BASH).
37250      if test "xAR" != xBASH; then
37251        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37252$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37253      fi
37254      # Try to locate tool using the code snippet
37255      if test -n "$ac_tool_prefix"; then
37256  for ac_prog in ar gcc-ar
37257  do
37258    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37259set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37261$as_echo_n "checking for $ac_word... " >&6; }
37262if ${ac_cv_prog_AR+:} false; then :
37263  $as_echo_n "(cached) " >&6
37264else
37265  if test -n "$AR"; then
37266  ac_cv_prog_AR="$AR" # Let the user override the test.
37267else
37268as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37269for as_dir in $PATH
37270do
37271  IFS=$as_save_IFS
37272  test -z "$as_dir" && as_dir=.
37273    for ac_exec_ext in '' $ac_executable_extensions; do
37274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37275    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37277    break 2
37278  fi
37279done
37280  done
37281IFS=$as_save_IFS
37282
37283fi
37284fi
37285AR=$ac_cv_prog_AR
37286if test -n "$AR"; then
37287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37288$as_echo "$AR" >&6; }
37289else
37290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37291$as_echo "no" >&6; }
37292fi
37293
37294
37295    test -n "$AR" && break
37296  done
37297fi
37298if test -z "$AR"; then
37299  ac_ct_AR=$AR
37300  for ac_prog in ar gcc-ar
37301do
37302  # Extract the first word of "$ac_prog", so it can be a program name with args.
37303set dummy $ac_prog; ac_word=$2
37304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37305$as_echo_n "checking for $ac_word... " >&6; }
37306if ${ac_cv_prog_ac_ct_AR+:} false; then :
37307  $as_echo_n "(cached) " >&6
37308else
37309  if test -n "$ac_ct_AR"; then
37310  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37311else
37312as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37313for as_dir in $PATH
37314do
37315  IFS=$as_save_IFS
37316  test -z "$as_dir" && as_dir=.
37317    for ac_exec_ext in '' $ac_executable_extensions; do
37318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37319    ac_cv_prog_ac_ct_AR="$ac_prog"
37320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37321    break 2
37322  fi
37323done
37324  done
37325IFS=$as_save_IFS
37326
37327fi
37328fi
37329ac_ct_AR=$ac_cv_prog_ac_ct_AR
37330if test -n "$ac_ct_AR"; then
37331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37332$as_echo "$ac_ct_AR" >&6; }
37333else
37334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37335$as_echo "no" >&6; }
37336fi
37337
37338
37339  test -n "$ac_ct_AR" && break
37340done
37341
37342  if test "x$ac_ct_AR" = x; then
37343    AR=""
37344  else
37345    case $cross_compiling:$ac_tool_warned in
37346yes:)
37347{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37348$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37349ac_tool_warned=yes ;;
37350esac
37351    AR=$ac_ct_AR
37352  fi
37353fi
37354
37355    else
37356      # If it succeeded, then it was overridden by the user. We will use it
37357      # for the tool.
37358
37359      # First remove it from the list of overridden variables, so we can test
37360      # for unknown variables in the end.
37361      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37362
37363      # Check if we try to supply an empty value
37364      if test "x$AR" = x; then
37365        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37366$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37367        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37368$as_echo_n "checking for AR... " >&6; }
37369        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37370$as_echo "disabled" >&6; }
37371      else
37372        # Check if the provided tool contains a complete path.
37373        tool_specified="$AR"
37374        tool_basename="${tool_specified##*/}"
37375        if test "x$tool_basename" = "x$tool_specified"; then
37376          # A command without a complete path is provided, search $PATH.
37377          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37378$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37379          # Extract the first word of "$tool_basename", so it can be a program name with args.
37380set dummy $tool_basename; ac_word=$2
37381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37382$as_echo_n "checking for $ac_word... " >&6; }
37383if ${ac_cv_path_AR+:} false; then :
37384  $as_echo_n "(cached) " >&6
37385else
37386  case $AR in
37387  [\\/]* | ?:[\\/]*)
37388  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37389  ;;
37390  *)
37391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37392for as_dir in $PATH
37393do
37394  IFS=$as_save_IFS
37395  test -z "$as_dir" && as_dir=.
37396    for ac_exec_ext in '' $ac_executable_extensions; do
37397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37398    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37400    break 2
37401  fi
37402done
37403  done
37404IFS=$as_save_IFS
37405
37406  ;;
37407esac
37408fi
37409AR=$ac_cv_path_AR
37410if test -n "$AR"; then
37411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37412$as_echo "$AR" >&6; }
37413else
37414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37415$as_echo "no" >&6; }
37416fi
37417
37418
37419          if test "x$AR" = x; then
37420            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37421          fi
37422        else
37423          # Otherwise we believe it is a complete path. Use it as it is.
37424          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37425$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37426          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37427$as_echo_n "checking for AR... " >&6; }
37428          if test ! -x "$tool_specified"; then
37429            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37430$as_echo "not found" >&6; }
37431            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37432          fi
37433          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37434$as_echo "$tool_specified" >&6; }
37435        fi
37436      fi
37437    fi
37438
37439  fi
37440
37441
37442  else
37443
37444
37445  # Publish this variable in the help.
37446
37447
37448  if [ -z "${AR+x}" ]; then
37449    # The variable is not set by user, try to locate tool using the code snippet
37450    if test -n "$ac_tool_prefix"; then
37451  for ac_prog in ar
37452  do
37453    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37454set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37456$as_echo_n "checking for $ac_word... " >&6; }
37457if ${ac_cv_prog_AR+:} false; then :
37458  $as_echo_n "(cached) " >&6
37459else
37460  if test -n "$AR"; then
37461  ac_cv_prog_AR="$AR" # Let the user override the test.
37462else
37463as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37464for as_dir in $PATH
37465do
37466  IFS=$as_save_IFS
37467  test -z "$as_dir" && as_dir=.
37468    for ac_exec_ext in '' $ac_executable_extensions; do
37469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37470    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37472    break 2
37473  fi
37474done
37475  done
37476IFS=$as_save_IFS
37477
37478fi
37479fi
37480AR=$ac_cv_prog_AR
37481if test -n "$AR"; then
37482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37483$as_echo "$AR" >&6; }
37484else
37485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37486$as_echo "no" >&6; }
37487fi
37488
37489
37490    test -n "$AR" && break
37491  done
37492fi
37493if test -z "$AR"; then
37494  ac_ct_AR=$AR
37495  for ac_prog in ar
37496do
37497  # Extract the first word of "$ac_prog", so it can be a program name with args.
37498set dummy $ac_prog; ac_word=$2
37499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37500$as_echo_n "checking for $ac_word... " >&6; }
37501if ${ac_cv_prog_ac_ct_AR+:} false; then :
37502  $as_echo_n "(cached) " >&6
37503else
37504  if test -n "$ac_ct_AR"; then
37505  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37506else
37507as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37508for as_dir in $PATH
37509do
37510  IFS=$as_save_IFS
37511  test -z "$as_dir" && as_dir=.
37512    for ac_exec_ext in '' $ac_executable_extensions; do
37513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37514    ac_cv_prog_ac_ct_AR="$ac_prog"
37515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37516    break 2
37517  fi
37518done
37519  done
37520IFS=$as_save_IFS
37521
37522fi
37523fi
37524ac_ct_AR=$ac_cv_prog_ac_ct_AR
37525if test -n "$ac_ct_AR"; then
37526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37527$as_echo "$ac_ct_AR" >&6; }
37528else
37529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37530$as_echo "no" >&6; }
37531fi
37532
37533
37534  test -n "$ac_ct_AR" && break
37535done
37536
37537  if test "x$ac_ct_AR" = x; then
37538    AR=""
37539  else
37540    case $cross_compiling:$ac_tool_warned in
37541yes:)
37542{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37543$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37544ac_tool_warned=yes ;;
37545esac
37546    AR=$ac_ct_AR
37547  fi
37548fi
37549
37550  else
37551    # The variable is set, but is it from the command line or the environment?
37552
37553    # Try to remove the string !AR! from our list.
37554    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37555    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37556      # If it failed, the variable was not from the command line. Ignore it,
37557      # but warn the user (except for BASH, which is always set by the calling BASH).
37558      if test "xAR" != xBASH; then
37559        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37560$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37561      fi
37562      # Try to locate tool using the code snippet
37563      if test -n "$ac_tool_prefix"; then
37564  for ac_prog in ar
37565  do
37566    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37567set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37569$as_echo_n "checking for $ac_word... " >&6; }
37570if ${ac_cv_prog_AR+:} false; then :
37571  $as_echo_n "(cached) " >&6
37572else
37573  if test -n "$AR"; then
37574  ac_cv_prog_AR="$AR" # Let the user override the test.
37575else
37576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37577for as_dir in $PATH
37578do
37579  IFS=$as_save_IFS
37580  test -z "$as_dir" && as_dir=.
37581    for ac_exec_ext in '' $ac_executable_extensions; do
37582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37583    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37585    break 2
37586  fi
37587done
37588  done
37589IFS=$as_save_IFS
37590
37591fi
37592fi
37593AR=$ac_cv_prog_AR
37594if test -n "$AR"; then
37595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37596$as_echo "$AR" >&6; }
37597else
37598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37599$as_echo "no" >&6; }
37600fi
37601
37602
37603    test -n "$AR" && break
37604  done
37605fi
37606if test -z "$AR"; then
37607  ac_ct_AR=$AR
37608  for ac_prog in ar
37609do
37610  # Extract the first word of "$ac_prog", so it can be a program name with args.
37611set dummy $ac_prog; ac_word=$2
37612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37613$as_echo_n "checking for $ac_word... " >&6; }
37614if ${ac_cv_prog_ac_ct_AR+:} false; then :
37615  $as_echo_n "(cached) " >&6
37616else
37617  if test -n "$ac_ct_AR"; then
37618  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37619else
37620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37621for as_dir in $PATH
37622do
37623  IFS=$as_save_IFS
37624  test -z "$as_dir" && as_dir=.
37625    for ac_exec_ext in '' $ac_executable_extensions; do
37626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37627    ac_cv_prog_ac_ct_AR="$ac_prog"
37628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37629    break 2
37630  fi
37631done
37632  done
37633IFS=$as_save_IFS
37634
37635fi
37636fi
37637ac_ct_AR=$ac_cv_prog_ac_ct_AR
37638if test -n "$ac_ct_AR"; then
37639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37640$as_echo "$ac_ct_AR" >&6; }
37641else
37642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37643$as_echo "no" >&6; }
37644fi
37645
37646
37647  test -n "$ac_ct_AR" && break
37648done
37649
37650  if test "x$ac_ct_AR" = x; then
37651    AR=""
37652  else
37653    case $cross_compiling:$ac_tool_warned in
37654yes:)
37655{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37656$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37657ac_tool_warned=yes ;;
37658esac
37659    AR=$ac_ct_AR
37660  fi
37661fi
37662
37663    else
37664      # If it succeeded, then it was overridden by the user. We will use it
37665      # for the tool.
37666
37667      # First remove it from the list of overridden variables, so we can test
37668      # for unknown variables in the end.
37669      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37670
37671      # Check if we try to supply an empty value
37672      if test "x$AR" = x; then
37673        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37674$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37675        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37676$as_echo_n "checking for AR... " >&6; }
37677        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37678$as_echo "disabled" >&6; }
37679      else
37680        # Check if the provided tool contains a complete path.
37681        tool_specified="$AR"
37682        tool_basename="${tool_specified##*/}"
37683        if test "x$tool_basename" = "x$tool_specified"; then
37684          # A command without a complete path is provided, search $PATH.
37685          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37686$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37687          # Extract the first word of "$tool_basename", so it can be a program name with args.
37688set dummy $tool_basename; ac_word=$2
37689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37690$as_echo_n "checking for $ac_word... " >&6; }
37691if ${ac_cv_path_AR+:} false; then :
37692  $as_echo_n "(cached) " >&6
37693else
37694  case $AR in
37695  [\\/]* | ?:[\\/]*)
37696  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37697  ;;
37698  *)
37699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37700for as_dir in $PATH
37701do
37702  IFS=$as_save_IFS
37703  test -z "$as_dir" && as_dir=.
37704    for ac_exec_ext in '' $ac_executable_extensions; do
37705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37706    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37708    break 2
37709  fi
37710done
37711  done
37712IFS=$as_save_IFS
37713
37714  ;;
37715esac
37716fi
37717AR=$ac_cv_path_AR
37718if test -n "$AR"; then
37719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37720$as_echo "$AR" >&6; }
37721else
37722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37723$as_echo "no" >&6; }
37724fi
37725
37726
37727          if test "x$AR" = x; then
37728            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37729          fi
37730        else
37731          # Otherwise we believe it is a complete path. Use it as it is.
37732          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37733$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37734          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37735$as_echo_n "checking for AR... " >&6; }
37736          if test ! -x "$tool_specified"; then
37737            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37738$as_echo "not found" >&6; }
37739            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37740          fi
37741          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37742$as_echo "$tool_specified" >&6; }
37743        fi
37744      fi
37745    fi
37746
37747  fi
37748
37749
37750  fi
37751
37752  # Only process if variable expands to non-empty
37753
37754  if test "x$AR" != x; then
37755    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37756
37757  # First separate the path from the arguments. This will split at the first
37758  # space.
37759  complete="$AR"
37760  path="${complete%% *}"
37761  tmp="$complete EOL"
37762  arguments="${tmp#* }"
37763
37764  # Input might be given as Windows format, start by converting to
37765  # unix format.
37766  new_path=`$CYGPATH -u "$path"`
37767
37768  # Now try to locate executable using which
37769  new_path=`$WHICH "$new_path" 2> /dev/null`
37770  # bat and cmd files are not always considered executable in cygwin causing which
37771  # to not find them
37772  if test "x$new_path" = x \
37773      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37774      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37775    new_path=`$CYGPATH -u "$path"`
37776  fi
37777  if test "x$new_path" = x; then
37778    # Oops. Which didn't find the executable.
37779    # The splitting of arguments from the executable at a space might have been incorrect,
37780    # since paths with space are more likely in Windows. Give it another try with the whole
37781    # argument.
37782    path="$complete"
37783    arguments="EOL"
37784    new_path=`$CYGPATH -u "$path"`
37785    new_path=`$WHICH "$new_path" 2> /dev/null`
37786    # bat and cmd files are not always considered executable in cygwin causing which
37787    # to not find them
37788    if test "x$new_path" = x \
37789        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37790        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37791      new_path=`$CYGPATH -u "$path"`
37792    fi
37793    if test "x$new_path" = x; then
37794      # It's still not found. Now this is an unrecoverable error.
37795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37796$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37797      has_space=`$ECHO "$complete" | $GREP " "`
37798      if test "x$has_space" != x; then
37799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37801      fi
37802      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37803    fi
37804  fi
37805
37806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37809  # "foo.exe" is OK but "foo" is an error.
37810  #
37811  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37812  # It is also a way to make sure we got the proper file name for the real test later on.
37813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37814  if test "x$test_shortpath" = x; then
37815    # Short path failed, file does not exist as specified.
37816    # Try adding .exe or .cmd
37817    if test -f "${new_path}.exe"; then
37818      input_to_shortpath="${new_path}.exe"
37819    elif test -f "${new_path}.cmd"; then
37820      input_to_shortpath="${new_path}.cmd"
37821    else
37822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37823$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37824      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37825$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37826      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37827    fi
37828  else
37829    input_to_shortpath="$new_path"
37830  fi
37831
37832  # Call helper function which possibly converts this using DOS-style short mode.
37833  # If so, the updated path is stored in $new_path.
37834  new_path="$input_to_shortpath"
37835
37836  input_path="$input_to_shortpath"
37837  # Check if we need to convert this using DOS-style short mode. If the path
37838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37839  # take no chances and rewrite it.
37840  # Note: m4 eats our [], so we need to use [ and ] instead.
37841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37842  if test "x$has_forbidden_chars" != x; then
37843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37844    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37845    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37846    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37847      # Going to short mode and back again did indeed matter. Since short mode is
37848      # case insensitive, let's make it lowercase to improve readability.
37849      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37850      # Now convert it back to Unix-style (cygpath)
37851      input_path=`$CYGPATH -u "$shortmode_path"`
37852      new_path="$input_path"
37853    fi
37854  fi
37855
37856  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37857  if test "x$test_cygdrive_prefix" = x; then
37858    # As a simple fix, exclude /usr/bin since it's not a real path.
37859    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37860      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37861      # a path prefixed by /cygdrive for fixpath to work.
37862      new_path="$CYGWIN_ROOT_PATH$input_path"
37863    fi
37864  fi
37865
37866  # remove trailing .exe if any
37867  new_path="${new_path/%.exe/}"
37868
37869    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37870
37871  # First separate the path from the arguments. This will split at the first
37872  # space.
37873  complete="$AR"
37874  path="${complete%% *}"
37875  tmp="$complete EOL"
37876  arguments="${tmp#* }"
37877
37878  # Input might be given as Windows format, start by converting to
37879  # unix format.
37880  new_path="$path"
37881
37882  windows_path="$new_path"
37883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37884    unix_path=`$CYGPATH -u "$windows_path"`
37885    new_path="$unix_path"
37886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37888    new_path="$unix_path"
37889  fi
37890
37891
37892  # Now try to locate executable using which
37893  new_path=`$WHICH "$new_path" 2> /dev/null`
37894
37895  if test "x$new_path" = x; then
37896    # Oops. Which didn't find the executable.
37897    # The splitting of arguments from the executable at a space might have been incorrect,
37898    # since paths with space are more likely in Windows. Give it another try with the whole
37899    # argument.
37900    path="$complete"
37901    arguments="EOL"
37902    new_path="$path"
37903
37904  windows_path="$new_path"
37905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37906    unix_path=`$CYGPATH -u "$windows_path"`
37907    new_path="$unix_path"
37908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37910    new_path="$unix_path"
37911  fi
37912
37913
37914    new_path=`$WHICH "$new_path" 2> /dev/null`
37915    # bat and cmd files are not always considered executable in MSYS causing which
37916    # to not find them
37917    if test "x$new_path" = x \
37918        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37919        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37920      new_path="$path"
37921
37922  windows_path="$new_path"
37923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37924    unix_path=`$CYGPATH -u "$windows_path"`
37925    new_path="$unix_path"
37926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37928    new_path="$unix_path"
37929  fi
37930
37931    fi
37932
37933    if test "x$new_path" = x; then
37934      # It's still not found. Now this is an unrecoverable error.
37935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37936$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37937      has_space=`$ECHO "$complete" | $GREP " "`
37938      if test "x$has_space" != x; then
37939        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37940$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37941      fi
37942      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37943    fi
37944  fi
37945
37946  # Now new_path has a complete unix path to the binary
37947  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37948    # Keep paths in /bin as-is, but remove trailing .exe if any
37949    new_path="${new_path/%.exe/}"
37950    # Do not save /bin paths to all_fixpath_prefixes!
37951  else
37952    # Not in mixed or Windows style, start by that.
37953    new_path=`cmd //c echo $new_path`
37954
37955  input_path="$new_path"
37956  # Check if we need to convert this using DOS-style short mode. If the path
37957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37958  # take no chances and rewrite it.
37959  # Note: m4 eats our [], so we need to use [ and ] instead.
37960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37961  if test "x$has_forbidden_chars" != x; then
37962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37963    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37964  fi
37965
37966    # Output is in $new_path
37967
37968  windows_path="$new_path"
37969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37970    unix_path=`$CYGPATH -u "$windows_path"`
37971    new_path="$unix_path"
37972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37974    new_path="$unix_path"
37975  fi
37976
37977    # remove trailing .exe if any
37978    new_path="${new_path/%.exe/}"
37979
37980    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37981    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37982  fi
37983
37984    else
37985      # We're on a unix platform. Hooray! :)
37986      # First separate the path from the arguments. This will split at the first
37987      # space.
37988      complete="$AR"
37989      path="${complete%% *}"
37990      tmp="$complete EOL"
37991      arguments="${tmp#* }"
37992
37993      # Cannot rely on the command "which" here since it doesn't always work.
37994      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37995      if test -z "$is_absolute_path"; then
37996        # Path to executable is not absolute. Find it.
37997        IFS_save="$IFS"
37998        IFS=:
37999        for p in $PATH; do
38000          if test -f "$p/$path" && test -x "$p/$path"; then
38001            new_path="$p/$path"
38002            break
38003          fi
38004        done
38005        IFS="$IFS_save"
38006      else
38007        # This is an absolute path, we can use it without further modifications.
38008        new_path="$path"
38009      fi
38010
38011      if test "x$new_path" = x; then
38012        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38013$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38014        has_space=`$ECHO "$complete" | $GREP " "`
38015        if test "x$has_space" != x; then
38016          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38017$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38018        fi
38019        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38020      fi
38021    fi
38022
38023    # Now join together the path and the arguments once again
38024    if test "x$arguments" != xEOL; then
38025      new_complete="$new_path ${arguments% *}"
38026    else
38027      new_complete="$new_path"
38028    fi
38029
38030    if test "x$complete" != "x$new_complete"; then
38031      AR="$new_complete"
38032      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38033$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38034    fi
38035  fi
38036
38037
38038
38039  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38040
38041
38042  # Publish this variable in the help.
38043
38044
38045  if [ -z "${LIPO+x}" ]; then
38046    # The variable is not set by user, try to locate tool using the code snippet
38047    for ac_prog in lipo
38048do
38049  # Extract the first word of "$ac_prog", so it can be a program name with args.
38050set dummy $ac_prog; ac_word=$2
38051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38052$as_echo_n "checking for $ac_word... " >&6; }
38053if ${ac_cv_path_LIPO+:} false; then :
38054  $as_echo_n "(cached) " >&6
38055else
38056  case $LIPO in
38057  [\\/]* | ?:[\\/]*)
38058  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38059  ;;
38060  *)
38061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38062for as_dir in $PATH
38063do
38064  IFS=$as_save_IFS
38065  test -z "$as_dir" && as_dir=.
38066    for ac_exec_ext in '' $ac_executable_extensions; do
38067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38068    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38070    break 2
38071  fi
38072done
38073  done
38074IFS=$as_save_IFS
38075
38076  ;;
38077esac
38078fi
38079LIPO=$ac_cv_path_LIPO
38080if test -n "$LIPO"; then
38081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38082$as_echo "$LIPO" >&6; }
38083else
38084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38085$as_echo "no" >&6; }
38086fi
38087
38088
38089  test -n "$LIPO" && break
38090done
38091
38092  else
38093    # The variable is set, but is it from the command line or the environment?
38094
38095    # Try to remove the string !LIPO! from our list.
38096    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38097    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38098      # If it failed, the variable was not from the command line. Ignore it,
38099      # but warn the user (except for BASH, which is always set by the calling BASH).
38100      if test "xLIPO" != xBASH; then
38101        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38102$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38103      fi
38104      # Try to locate tool using the code snippet
38105      for ac_prog in lipo
38106do
38107  # Extract the first word of "$ac_prog", so it can be a program name with args.
38108set dummy $ac_prog; ac_word=$2
38109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38110$as_echo_n "checking for $ac_word... " >&6; }
38111if ${ac_cv_path_LIPO+:} false; then :
38112  $as_echo_n "(cached) " >&6
38113else
38114  case $LIPO in
38115  [\\/]* | ?:[\\/]*)
38116  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38117  ;;
38118  *)
38119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38120for as_dir in $PATH
38121do
38122  IFS=$as_save_IFS
38123  test -z "$as_dir" && as_dir=.
38124    for ac_exec_ext in '' $ac_executable_extensions; do
38125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38126    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38128    break 2
38129  fi
38130done
38131  done
38132IFS=$as_save_IFS
38133
38134  ;;
38135esac
38136fi
38137LIPO=$ac_cv_path_LIPO
38138if test -n "$LIPO"; then
38139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38140$as_echo "$LIPO" >&6; }
38141else
38142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38143$as_echo "no" >&6; }
38144fi
38145
38146
38147  test -n "$LIPO" && break
38148done
38149
38150    else
38151      # If it succeeded, then it was overridden by the user. We will use it
38152      # for the tool.
38153
38154      # First remove it from the list of overridden variables, so we can test
38155      # for unknown variables in the end.
38156      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38157
38158      # Check if we try to supply an empty value
38159      if test "x$LIPO" = x; then
38160        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38161$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38162        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38163$as_echo_n "checking for LIPO... " >&6; }
38164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38165$as_echo "disabled" >&6; }
38166      else
38167        # Check if the provided tool contains a complete path.
38168        tool_specified="$LIPO"
38169        tool_basename="${tool_specified##*/}"
38170        if test "x$tool_basename" = "x$tool_specified"; then
38171          # A command without a complete path is provided, search $PATH.
38172          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38173$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38174          # Extract the first word of "$tool_basename", so it can be a program name with args.
38175set dummy $tool_basename; ac_word=$2
38176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38177$as_echo_n "checking for $ac_word... " >&6; }
38178if ${ac_cv_path_LIPO+:} false; then :
38179  $as_echo_n "(cached) " >&6
38180else
38181  case $LIPO in
38182  [\\/]* | ?:[\\/]*)
38183  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38184  ;;
38185  *)
38186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38187for as_dir in $PATH
38188do
38189  IFS=$as_save_IFS
38190  test -z "$as_dir" && as_dir=.
38191    for ac_exec_ext in '' $ac_executable_extensions; do
38192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38193    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38195    break 2
38196  fi
38197done
38198  done
38199IFS=$as_save_IFS
38200
38201  ;;
38202esac
38203fi
38204LIPO=$ac_cv_path_LIPO
38205if test -n "$LIPO"; then
38206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38207$as_echo "$LIPO" >&6; }
38208else
38209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38210$as_echo "no" >&6; }
38211fi
38212
38213
38214          if test "x$LIPO" = x; then
38215            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38216          fi
38217        else
38218          # Otherwise we believe it is a complete path. Use it as it is.
38219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38220$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38221          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38222$as_echo_n "checking for LIPO... " >&6; }
38223          if test ! -x "$tool_specified"; then
38224            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38225$as_echo "not found" >&6; }
38226            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38227          fi
38228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38229$as_echo "$tool_specified" >&6; }
38230        fi
38231      fi
38232    fi
38233
38234  fi
38235
38236
38237
38238  # Only process if variable expands to non-empty
38239
38240  if test "x$LIPO" != x; then
38241    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38242
38243  # First separate the path from the arguments. This will split at the first
38244  # space.
38245  complete="$LIPO"
38246  path="${complete%% *}"
38247  tmp="$complete EOL"
38248  arguments="${tmp#* }"
38249
38250  # Input might be given as Windows format, start by converting to
38251  # unix format.
38252  new_path=`$CYGPATH -u "$path"`
38253
38254  # Now try to locate executable using which
38255  new_path=`$WHICH "$new_path" 2> /dev/null`
38256  # bat and cmd files are not always considered executable in cygwin causing which
38257  # to not find them
38258  if test "x$new_path" = x \
38259      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38260      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38261    new_path=`$CYGPATH -u "$path"`
38262  fi
38263  if test "x$new_path" = x; then
38264    # Oops. Which didn't find the executable.
38265    # The splitting of arguments from the executable at a space might have been incorrect,
38266    # since paths with space are more likely in Windows. Give it another try with the whole
38267    # argument.
38268    path="$complete"
38269    arguments="EOL"
38270    new_path=`$CYGPATH -u "$path"`
38271    new_path=`$WHICH "$new_path" 2> /dev/null`
38272    # bat and cmd files are not always considered executable in cygwin causing which
38273    # to not find them
38274    if test "x$new_path" = x \
38275        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38276        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38277      new_path=`$CYGPATH -u "$path"`
38278    fi
38279    if test "x$new_path" = x; then
38280      # It's still not found. Now this is an unrecoverable error.
38281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38282$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38283      has_space=`$ECHO "$complete" | $GREP " "`
38284      if test "x$has_space" != x; then
38285        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38286$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38287      fi
38288      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38289    fi
38290  fi
38291
38292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38295  # "foo.exe" is OK but "foo" is an error.
38296  #
38297  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38298  # It is also a way to make sure we got the proper file name for the real test later on.
38299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38300  if test "x$test_shortpath" = x; then
38301    # Short path failed, file does not exist as specified.
38302    # Try adding .exe or .cmd
38303    if test -f "${new_path}.exe"; then
38304      input_to_shortpath="${new_path}.exe"
38305    elif test -f "${new_path}.cmd"; then
38306      input_to_shortpath="${new_path}.cmd"
38307    else
38308      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38309$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38310      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38311$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38312      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38313    fi
38314  else
38315    input_to_shortpath="$new_path"
38316  fi
38317
38318  # Call helper function which possibly converts this using DOS-style short mode.
38319  # If so, the updated path is stored in $new_path.
38320  new_path="$input_to_shortpath"
38321
38322  input_path="$input_to_shortpath"
38323  # Check if we need to convert this using DOS-style short mode. If the path
38324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38325  # take no chances and rewrite it.
38326  # Note: m4 eats our [], so we need to use [ and ] instead.
38327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38328  if test "x$has_forbidden_chars" != x; then
38329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38333      # Going to short mode and back again did indeed matter. Since short mode is
38334      # case insensitive, let's make it lowercase to improve readability.
38335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38336      # Now convert it back to Unix-style (cygpath)
38337      input_path=`$CYGPATH -u "$shortmode_path"`
38338      new_path="$input_path"
38339    fi
38340  fi
38341
38342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38343  if test "x$test_cygdrive_prefix" = x; then
38344    # As a simple fix, exclude /usr/bin since it's not a real path.
38345    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38347      # a path prefixed by /cygdrive for fixpath to work.
38348      new_path="$CYGWIN_ROOT_PATH$input_path"
38349    fi
38350  fi
38351
38352  # remove trailing .exe if any
38353  new_path="${new_path/%.exe/}"
38354
38355    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38356
38357  # First separate the path from the arguments. This will split at the first
38358  # space.
38359  complete="$LIPO"
38360  path="${complete%% *}"
38361  tmp="$complete EOL"
38362  arguments="${tmp#* }"
38363
38364  # Input might be given as Windows format, start by converting to
38365  # unix format.
38366  new_path="$path"
38367
38368  windows_path="$new_path"
38369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38370    unix_path=`$CYGPATH -u "$windows_path"`
38371    new_path="$unix_path"
38372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38374    new_path="$unix_path"
38375  fi
38376
38377
38378  # Now try to locate executable using which
38379  new_path=`$WHICH "$new_path" 2> /dev/null`
38380
38381  if test "x$new_path" = x; then
38382    # Oops. Which didn't find the executable.
38383    # The splitting of arguments from the executable at a space might have been incorrect,
38384    # since paths with space are more likely in Windows. Give it another try with the whole
38385    # argument.
38386    path="$complete"
38387    arguments="EOL"
38388    new_path="$path"
38389
38390  windows_path="$new_path"
38391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38392    unix_path=`$CYGPATH -u "$windows_path"`
38393    new_path="$unix_path"
38394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38396    new_path="$unix_path"
38397  fi
38398
38399
38400    new_path=`$WHICH "$new_path" 2> /dev/null`
38401    # bat and cmd files are not always considered executable in MSYS causing which
38402    # to not find them
38403    if test "x$new_path" = x \
38404        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38405        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38406      new_path="$path"
38407
38408  windows_path="$new_path"
38409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38410    unix_path=`$CYGPATH -u "$windows_path"`
38411    new_path="$unix_path"
38412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38414    new_path="$unix_path"
38415  fi
38416
38417    fi
38418
38419    if test "x$new_path" = x; then
38420      # It's still not found. Now this is an unrecoverable error.
38421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38422$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38423      has_space=`$ECHO "$complete" | $GREP " "`
38424      if test "x$has_space" != x; then
38425        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38426$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38427      fi
38428      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38429    fi
38430  fi
38431
38432  # Now new_path has a complete unix path to the binary
38433  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38434    # Keep paths in /bin as-is, but remove trailing .exe if any
38435    new_path="${new_path/%.exe/}"
38436    # Do not save /bin paths to all_fixpath_prefixes!
38437  else
38438    # Not in mixed or Windows style, start by that.
38439    new_path=`cmd //c echo $new_path`
38440
38441  input_path="$new_path"
38442  # Check if we need to convert this using DOS-style short mode. If the path
38443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38444  # take no chances and rewrite it.
38445  # Note: m4 eats our [], so we need to use [ and ] instead.
38446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38447  if test "x$has_forbidden_chars" != x; then
38448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38450  fi
38451
38452    # Output is in $new_path
38453
38454  windows_path="$new_path"
38455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38456    unix_path=`$CYGPATH -u "$windows_path"`
38457    new_path="$unix_path"
38458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38460    new_path="$unix_path"
38461  fi
38462
38463    # remove trailing .exe if any
38464    new_path="${new_path/%.exe/}"
38465
38466    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38467    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38468  fi
38469
38470    else
38471      # We're on a unix platform. Hooray! :)
38472      # First separate the path from the arguments. This will split at the first
38473      # space.
38474      complete="$LIPO"
38475      path="${complete%% *}"
38476      tmp="$complete EOL"
38477      arguments="${tmp#* }"
38478
38479      # Cannot rely on the command "which" here since it doesn't always work.
38480      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38481      if test -z "$is_absolute_path"; then
38482        # Path to executable is not absolute. Find it.
38483        IFS_save="$IFS"
38484        IFS=:
38485        for p in $PATH; do
38486          if test -f "$p/$path" && test -x "$p/$path"; then
38487            new_path="$p/$path"
38488            break
38489          fi
38490        done
38491        IFS="$IFS_save"
38492      else
38493        # This is an absolute path, we can use it without further modifications.
38494        new_path="$path"
38495      fi
38496
38497      if test "x$new_path" = x; then
38498        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38499$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38500        has_space=`$ECHO "$complete" | $GREP " "`
38501        if test "x$has_space" != x; then
38502          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38503$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38504        fi
38505        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38506      fi
38507    fi
38508
38509    # Now join together the path and the arguments once again
38510    if test "x$arguments" != xEOL; then
38511      new_complete="$new_path ${arguments% *}"
38512    else
38513      new_complete="$new_path"
38514    fi
38515
38516    if test "x$complete" != "x$new_complete"; then
38517      LIPO="$new_complete"
38518      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38519$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38520    fi
38521  fi
38522
38523  fi
38524
38525  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38526    # Extract the first word of "mt", so it can be a program name with args.
38527set dummy mt; ac_word=$2
38528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38529$as_echo_n "checking for $ac_word... " >&6; }
38530if ${ac_cv_prog_MT+:} false; then :
38531  $as_echo_n "(cached) " >&6
38532else
38533  if test -n "$MT"; then
38534  ac_cv_prog_MT="$MT" # Let the user override the test.
38535else
38536  ac_prog_rejected=no
38537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38538for as_dir in $PATH
38539do
38540  IFS=$as_save_IFS
38541  test -z "$as_dir" && as_dir=.
38542    for ac_exec_ext in '' $ac_executable_extensions; do
38543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38544    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38545       ac_prog_rejected=yes
38546       continue
38547     fi
38548    ac_cv_prog_MT="mt"
38549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38550    break 2
38551  fi
38552done
38553  done
38554IFS=$as_save_IFS
38555
38556if test $ac_prog_rejected = yes; then
38557  # We found a bogon in the path, so make sure we never use it.
38558  set dummy $ac_cv_prog_MT
38559  shift
38560  if test $# != 0; then
38561    # We chose a different compiler from the bogus one.
38562    # However, it has the same basename, so the bogon will be chosen
38563    # first if we set MT to just the basename; use the full file name.
38564    shift
38565    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38566  fi
38567fi
38568fi
38569fi
38570MT=$ac_cv_prog_MT
38571if test -n "$MT"; then
38572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38573$as_echo "$MT" >&6; }
38574else
38575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38576$as_echo "no" >&6; }
38577fi
38578
38579
38580
38581  # Only process if variable expands to non-empty
38582
38583  if test "x$MT" != x; then
38584    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38585
38586  # First separate the path from the arguments. This will split at the first
38587  # space.
38588  complete="$MT"
38589  path="${complete%% *}"
38590  tmp="$complete EOL"
38591  arguments="${tmp#* }"
38592
38593  # Input might be given as Windows format, start by converting to
38594  # unix format.
38595  new_path=`$CYGPATH -u "$path"`
38596
38597  # Now try to locate executable using which
38598  new_path=`$WHICH "$new_path" 2> /dev/null`
38599  # bat and cmd files are not always considered executable in cygwin causing which
38600  # to not find them
38601  if test "x$new_path" = x \
38602      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38603      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38604    new_path=`$CYGPATH -u "$path"`
38605  fi
38606  if test "x$new_path" = x; then
38607    # Oops. Which didn't find the executable.
38608    # The splitting of arguments from the executable at a space might have been incorrect,
38609    # since paths with space are more likely in Windows. Give it another try with the whole
38610    # argument.
38611    path="$complete"
38612    arguments="EOL"
38613    new_path=`$CYGPATH -u "$path"`
38614    new_path=`$WHICH "$new_path" 2> /dev/null`
38615    # bat and cmd files are not always considered executable in cygwin causing which
38616    # to not find them
38617    if test "x$new_path" = x \
38618        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38619        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38620      new_path=`$CYGPATH -u "$path"`
38621    fi
38622    if test "x$new_path" = x; then
38623      # It's still not found. Now this is an unrecoverable error.
38624      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38625$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38626      has_space=`$ECHO "$complete" | $GREP " "`
38627      if test "x$has_space" != x; then
38628        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38629$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38630      fi
38631      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38632    fi
38633  fi
38634
38635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38638  # "foo.exe" is OK but "foo" is an error.
38639  #
38640  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38641  # It is also a way to make sure we got the proper file name for the real test later on.
38642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38643  if test "x$test_shortpath" = x; then
38644    # Short path failed, file does not exist as specified.
38645    # Try adding .exe or .cmd
38646    if test -f "${new_path}.exe"; then
38647      input_to_shortpath="${new_path}.exe"
38648    elif test -f "${new_path}.cmd"; then
38649      input_to_shortpath="${new_path}.cmd"
38650    else
38651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38652$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38653      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38654$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38655      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38656    fi
38657  else
38658    input_to_shortpath="$new_path"
38659  fi
38660
38661  # Call helper function which possibly converts this using DOS-style short mode.
38662  # If so, the updated path is stored in $new_path.
38663  new_path="$input_to_shortpath"
38664
38665  input_path="$input_to_shortpath"
38666  # Check if we need to convert this using DOS-style short mode. If the path
38667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38668  # take no chances and rewrite it.
38669  # Note: m4 eats our [], so we need to use [ and ] instead.
38670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38671  if test "x$has_forbidden_chars" != x; then
38672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38673    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38674    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38675    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38676      # Going to short mode and back again did indeed matter. Since short mode is
38677      # case insensitive, let's make it lowercase to improve readability.
38678      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38679      # Now convert it back to Unix-style (cygpath)
38680      input_path=`$CYGPATH -u "$shortmode_path"`
38681      new_path="$input_path"
38682    fi
38683  fi
38684
38685  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38686  if test "x$test_cygdrive_prefix" = x; then
38687    # As a simple fix, exclude /usr/bin since it's not a real path.
38688    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38689      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38690      # a path prefixed by /cygdrive for fixpath to work.
38691      new_path="$CYGWIN_ROOT_PATH$input_path"
38692    fi
38693  fi
38694
38695  # remove trailing .exe if any
38696  new_path="${new_path/%.exe/}"
38697
38698    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38699
38700  # First separate the path from the arguments. This will split at the first
38701  # space.
38702  complete="$MT"
38703  path="${complete%% *}"
38704  tmp="$complete EOL"
38705  arguments="${tmp#* }"
38706
38707  # Input might be given as Windows format, start by converting to
38708  # unix format.
38709  new_path="$path"
38710
38711  windows_path="$new_path"
38712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38713    unix_path=`$CYGPATH -u "$windows_path"`
38714    new_path="$unix_path"
38715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38717    new_path="$unix_path"
38718  fi
38719
38720
38721  # Now try to locate executable using which
38722  new_path=`$WHICH "$new_path" 2> /dev/null`
38723
38724  if test "x$new_path" = x; then
38725    # Oops. Which didn't find the executable.
38726    # The splitting of arguments from the executable at a space might have been incorrect,
38727    # since paths with space are more likely in Windows. Give it another try with the whole
38728    # argument.
38729    path="$complete"
38730    arguments="EOL"
38731    new_path="$path"
38732
38733  windows_path="$new_path"
38734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38735    unix_path=`$CYGPATH -u "$windows_path"`
38736    new_path="$unix_path"
38737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38739    new_path="$unix_path"
38740  fi
38741
38742
38743    new_path=`$WHICH "$new_path" 2> /dev/null`
38744    # bat and cmd files are not always considered executable in MSYS causing which
38745    # to not find them
38746    if test "x$new_path" = x \
38747        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38748        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38749      new_path="$path"
38750
38751  windows_path="$new_path"
38752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38753    unix_path=`$CYGPATH -u "$windows_path"`
38754    new_path="$unix_path"
38755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38757    new_path="$unix_path"
38758  fi
38759
38760    fi
38761
38762    if test "x$new_path" = x; then
38763      # It's still not found. Now this is an unrecoverable error.
38764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38765$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38766      has_space=`$ECHO "$complete" | $GREP " "`
38767      if test "x$has_space" != x; then
38768        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38769$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38770      fi
38771      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38772    fi
38773  fi
38774
38775  # Now new_path has a complete unix path to the binary
38776  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38777    # Keep paths in /bin as-is, but remove trailing .exe if any
38778    new_path="${new_path/%.exe/}"
38779    # Do not save /bin paths to all_fixpath_prefixes!
38780  else
38781    # Not in mixed or Windows style, start by that.
38782    new_path=`cmd //c echo $new_path`
38783
38784  input_path="$new_path"
38785  # Check if we need to convert this using DOS-style short mode. If the path
38786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38787  # take no chances and rewrite it.
38788  # Note: m4 eats our [], so we need to use [ and ] instead.
38789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38790  if test "x$has_forbidden_chars" != x; then
38791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38793  fi
38794
38795    # Output is in $new_path
38796
38797  windows_path="$new_path"
38798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38799    unix_path=`$CYGPATH -u "$windows_path"`
38800    new_path="$unix_path"
38801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38803    new_path="$unix_path"
38804  fi
38805
38806    # remove trailing .exe if any
38807    new_path="${new_path/%.exe/}"
38808
38809    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38810    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38811  fi
38812
38813    else
38814      # We're on a unix platform. Hooray! :)
38815      # First separate the path from the arguments. This will split at the first
38816      # space.
38817      complete="$MT"
38818      path="${complete%% *}"
38819      tmp="$complete EOL"
38820      arguments="${tmp#* }"
38821
38822      # Cannot rely on the command "which" here since it doesn't always work.
38823      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38824      if test -z "$is_absolute_path"; then
38825        # Path to executable is not absolute. Find it.
38826        IFS_save="$IFS"
38827        IFS=:
38828        for p in $PATH; do
38829          if test -f "$p/$path" && test -x "$p/$path"; then
38830            new_path="$p/$path"
38831            break
38832          fi
38833        done
38834        IFS="$IFS_save"
38835      else
38836        # This is an absolute path, we can use it without further modifications.
38837        new_path="$path"
38838      fi
38839
38840      if test "x$new_path" = x; then
38841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38842$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38843        has_space=`$ECHO "$complete" | $GREP " "`
38844        if test "x$has_space" != x; then
38845          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38846$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38847        fi
38848        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38849      fi
38850    fi
38851
38852    # Now join together the path and the arguments once again
38853    if test "x$arguments" != xEOL; then
38854      new_complete="$new_path ${arguments% *}"
38855    else
38856      new_complete="$new_path"
38857    fi
38858
38859    if test "x$complete" != "x$new_complete"; then
38860      MT="$new_complete"
38861      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38862$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38863    fi
38864  fi
38865
38866    # Setup the resource compiler (RC)
38867    # Extract the first word of "rc", so it can be a program name with args.
38868set dummy rc; ac_word=$2
38869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38870$as_echo_n "checking for $ac_word... " >&6; }
38871if ${ac_cv_prog_RC+:} false; then :
38872  $as_echo_n "(cached) " >&6
38873else
38874  if test -n "$RC"; then
38875  ac_cv_prog_RC="$RC" # Let the user override the test.
38876else
38877  ac_prog_rejected=no
38878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38879for as_dir in $PATH
38880do
38881  IFS=$as_save_IFS
38882  test -z "$as_dir" && as_dir=.
38883    for ac_exec_ext in '' $ac_executable_extensions; do
38884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38885    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38886       ac_prog_rejected=yes
38887       continue
38888     fi
38889    ac_cv_prog_RC="rc"
38890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38891    break 2
38892  fi
38893done
38894  done
38895IFS=$as_save_IFS
38896
38897if test $ac_prog_rejected = yes; then
38898  # We found a bogon in the path, so make sure we never use it.
38899  set dummy $ac_cv_prog_RC
38900  shift
38901  if test $# != 0; then
38902    # We chose a different compiler from the bogus one.
38903    # However, it has the same basename, so the bogon will be chosen
38904    # first if we set RC to just the basename; use the full file name.
38905    shift
38906    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38907  fi
38908fi
38909fi
38910fi
38911RC=$ac_cv_prog_RC
38912if test -n "$RC"; then
38913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38914$as_echo "$RC" >&6; }
38915else
38916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38917$as_echo "no" >&6; }
38918fi
38919
38920
38921
38922  # Only process if variable expands to non-empty
38923
38924  if test "x$RC" != x; then
38925    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38926
38927  # First separate the path from the arguments. This will split at the first
38928  # space.
38929  complete="$RC"
38930  path="${complete%% *}"
38931  tmp="$complete EOL"
38932  arguments="${tmp#* }"
38933
38934  # Input might be given as Windows format, start by converting to
38935  # unix format.
38936  new_path=`$CYGPATH -u "$path"`
38937
38938  # Now try to locate executable using which
38939  new_path=`$WHICH "$new_path" 2> /dev/null`
38940  # bat and cmd files are not always considered executable in cygwin causing which
38941  # to not find them
38942  if test "x$new_path" = x \
38943      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38944      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38945    new_path=`$CYGPATH -u "$path"`
38946  fi
38947  if test "x$new_path" = x; then
38948    # Oops. Which didn't find the executable.
38949    # The splitting of arguments from the executable at a space might have been incorrect,
38950    # since paths with space are more likely in Windows. Give it another try with the whole
38951    # argument.
38952    path="$complete"
38953    arguments="EOL"
38954    new_path=`$CYGPATH -u "$path"`
38955    new_path=`$WHICH "$new_path" 2> /dev/null`
38956    # bat and cmd files are not always considered executable in cygwin causing which
38957    # to not find them
38958    if test "x$new_path" = x \
38959        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38960        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38961      new_path=`$CYGPATH -u "$path"`
38962    fi
38963    if test "x$new_path" = x; then
38964      # It's still not found. Now this is an unrecoverable error.
38965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38966$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38967      has_space=`$ECHO "$complete" | $GREP " "`
38968      if test "x$has_space" != x; then
38969        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38970$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38971      fi
38972      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38973    fi
38974  fi
38975
38976  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38977  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38978  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38979  # "foo.exe" is OK but "foo" is an error.
38980  #
38981  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38982  # It is also a way to make sure we got the proper file name for the real test later on.
38983  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38984  if test "x$test_shortpath" = x; then
38985    # Short path failed, file does not exist as specified.
38986    # Try adding .exe or .cmd
38987    if test -f "${new_path}.exe"; then
38988      input_to_shortpath="${new_path}.exe"
38989    elif test -f "${new_path}.cmd"; then
38990      input_to_shortpath="${new_path}.cmd"
38991    else
38992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38993$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38994      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38995$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38996      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38997    fi
38998  else
38999    input_to_shortpath="$new_path"
39000  fi
39001
39002  # Call helper function which possibly converts this using DOS-style short mode.
39003  # If so, the updated path is stored in $new_path.
39004  new_path="$input_to_shortpath"
39005
39006  input_path="$input_to_shortpath"
39007  # Check if we need to convert this using DOS-style short mode. If the path
39008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39009  # take no chances and rewrite it.
39010  # Note: m4 eats our [], so we need to use [ and ] instead.
39011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39012  if test "x$has_forbidden_chars" != x; then
39013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39017      # Going to short mode and back again did indeed matter. Since short mode is
39018      # case insensitive, let's make it lowercase to improve readability.
39019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39020      # Now convert it back to Unix-style (cygpath)
39021      input_path=`$CYGPATH -u "$shortmode_path"`
39022      new_path="$input_path"
39023    fi
39024  fi
39025
39026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39027  if test "x$test_cygdrive_prefix" = x; then
39028    # As a simple fix, exclude /usr/bin since it's not a real path.
39029    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39031      # a path prefixed by /cygdrive for fixpath to work.
39032      new_path="$CYGWIN_ROOT_PATH$input_path"
39033    fi
39034  fi
39035
39036  # remove trailing .exe if any
39037  new_path="${new_path/%.exe/}"
39038
39039    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39040
39041  # First separate the path from the arguments. This will split at the first
39042  # space.
39043  complete="$RC"
39044  path="${complete%% *}"
39045  tmp="$complete EOL"
39046  arguments="${tmp#* }"
39047
39048  # Input might be given as Windows format, start by converting to
39049  # unix format.
39050  new_path="$path"
39051
39052  windows_path="$new_path"
39053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39054    unix_path=`$CYGPATH -u "$windows_path"`
39055    new_path="$unix_path"
39056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39058    new_path="$unix_path"
39059  fi
39060
39061
39062  # Now try to locate executable using which
39063  new_path=`$WHICH "$new_path" 2> /dev/null`
39064
39065  if test "x$new_path" = x; then
39066    # Oops. Which didn't find the executable.
39067    # The splitting of arguments from the executable at a space might have been incorrect,
39068    # since paths with space are more likely in Windows. Give it another try with the whole
39069    # argument.
39070    path="$complete"
39071    arguments="EOL"
39072    new_path="$path"
39073
39074  windows_path="$new_path"
39075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39076    unix_path=`$CYGPATH -u "$windows_path"`
39077    new_path="$unix_path"
39078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39080    new_path="$unix_path"
39081  fi
39082
39083
39084    new_path=`$WHICH "$new_path" 2> /dev/null`
39085    # bat and cmd files are not always considered executable in MSYS causing which
39086    # to not find them
39087    if test "x$new_path" = x \
39088        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39089        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39090      new_path="$path"
39091
39092  windows_path="$new_path"
39093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39094    unix_path=`$CYGPATH -u "$windows_path"`
39095    new_path="$unix_path"
39096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39098    new_path="$unix_path"
39099  fi
39100
39101    fi
39102
39103    if test "x$new_path" = x; then
39104      # It's still not found. Now this is an unrecoverable error.
39105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39106$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39107      has_space=`$ECHO "$complete" | $GREP " "`
39108      if test "x$has_space" != x; then
39109        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39110$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39111      fi
39112      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39113    fi
39114  fi
39115
39116  # Now new_path has a complete unix path to the binary
39117  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39118    # Keep paths in /bin as-is, but remove trailing .exe if any
39119    new_path="${new_path/%.exe/}"
39120    # Do not save /bin paths to all_fixpath_prefixes!
39121  else
39122    # Not in mixed or Windows style, start by that.
39123    new_path=`cmd //c echo $new_path`
39124
39125  input_path="$new_path"
39126  # Check if we need to convert this using DOS-style short mode. If the path
39127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39128  # take no chances and rewrite it.
39129  # Note: m4 eats our [], so we need to use [ and ] instead.
39130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39131  if test "x$has_forbidden_chars" != x; then
39132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39134  fi
39135
39136    # Output is in $new_path
39137
39138  windows_path="$new_path"
39139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39140    unix_path=`$CYGPATH -u "$windows_path"`
39141    new_path="$unix_path"
39142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39144    new_path="$unix_path"
39145  fi
39146
39147    # remove trailing .exe if any
39148    new_path="${new_path/%.exe/}"
39149
39150    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39151    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39152  fi
39153
39154    else
39155      # We're on a unix platform. Hooray! :)
39156      # First separate the path from the arguments. This will split at the first
39157      # space.
39158      complete="$RC"
39159      path="${complete%% *}"
39160      tmp="$complete EOL"
39161      arguments="${tmp#* }"
39162
39163      # Cannot rely on the command "which" here since it doesn't always work.
39164      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39165      if test -z "$is_absolute_path"; then
39166        # Path to executable is not absolute. Find it.
39167        IFS_save="$IFS"
39168        IFS=:
39169        for p in $PATH; do
39170          if test -f "$p/$path" && test -x "$p/$path"; then
39171            new_path="$p/$path"
39172            break
39173          fi
39174        done
39175        IFS="$IFS_save"
39176      else
39177        # This is an absolute path, we can use it without further modifications.
39178        new_path="$path"
39179      fi
39180
39181      if test "x$new_path" = x; then
39182        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39183$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39184        has_space=`$ECHO "$complete" | $GREP " "`
39185        if test "x$has_space" != x; then
39186          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39187$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39188        fi
39189        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39190      fi
39191    fi
39192
39193    # Now join together the path and the arguments once again
39194    if test "x$arguments" != xEOL; then
39195      new_complete="$new_path ${arguments% *}"
39196    else
39197      new_complete="$new_path"
39198    fi
39199
39200    if test "x$complete" != "x$new_complete"; then
39201      RC="$new_complete"
39202      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39203$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39204    fi
39205  fi
39206
39207    # Extract the first word of "dumpbin", so it can be a program name with args.
39208set dummy dumpbin; ac_word=$2
39209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39210$as_echo_n "checking for $ac_word... " >&6; }
39211if ${ac_cv_prog_DUMPBIN+:} false; then :
39212  $as_echo_n "(cached) " >&6
39213else
39214  if test -n "$DUMPBIN"; then
39215  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39216else
39217as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39218for as_dir in $PATH
39219do
39220  IFS=$as_save_IFS
39221  test -z "$as_dir" && as_dir=.
39222    for ac_exec_ext in '' $ac_executable_extensions; do
39223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39224    ac_cv_prog_DUMPBIN="dumpbin"
39225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39226    break 2
39227  fi
39228done
39229  done
39230IFS=$as_save_IFS
39231
39232fi
39233fi
39234DUMPBIN=$ac_cv_prog_DUMPBIN
39235if test -n "$DUMPBIN"; then
39236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39237$as_echo "$DUMPBIN" >&6; }
39238else
39239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39240$as_echo "no" >&6; }
39241fi
39242
39243
39244
39245  # Only process if variable expands to non-empty
39246
39247  if test "x$DUMPBIN" != x; then
39248    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39249
39250  # First separate the path from the arguments. This will split at the first
39251  # space.
39252  complete="$DUMPBIN"
39253  path="${complete%% *}"
39254  tmp="$complete EOL"
39255  arguments="${tmp#* }"
39256
39257  # Input might be given as Windows format, start by converting to
39258  # unix format.
39259  new_path=`$CYGPATH -u "$path"`
39260
39261  # Now try to locate executable using which
39262  new_path=`$WHICH "$new_path" 2> /dev/null`
39263  # bat and cmd files are not always considered executable in cygwin causing which
39264  # to not find them
39265  if test "x$new_path" = x \
39266      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39267      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39268    new_path=`$CYGPATH -u "$path"`
39269  fi
39270  if test "x$new_path" = x; then
39271    # Oops. Which didn't find the executable.
39272    # The splitting of arguments from the executable at a space might have been incorrect,
39273    # since paths with space are more likely in Windows. Give it another try with the whole
39274    # argument.
39275    path="$complete"
39276    arguments="EOL"
39277    new_path=`$CYGPATH -u "$path"`
39278    new_path=`$WHICH "$new_path" 2> /dev/null`
39279    # bat and cmd files are not always considered executable in cygwin causing which
39280    # to not find them
39281    if test "x$new_path" = x \
39282        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39283        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39284      new_path=`$CYGPATH -u "$path"`
39285    fi
39286    if test "x$new_path" = x; then
39287      # It's still not found. Now this is an unrecoverable error.
39288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39289$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39290      has_space=`$ECHO "$complete" | $GREP " "`
39291      if test "x$has_space" != x; then
39292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39294      fi
39295      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39296    fi
39297  fi
39298
39299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39302  # "foo.exe" is OK but "foo" is an error.
39303  #
39304  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39305  # It is also a way to make sure we got the proper file name for the real test later on.
39306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39307  if test "x$test_shortpath" = x; then
39308    # Short path failed, file does not exist as specified.
39309    # Try adding .exe or .cmd
39310    if test -f "${new_path}.exe"; then
39311      input_to_shortpath="${new_path}.exe"
39312    elif test -f "${new_path}.cmd"; then
39313      input_to_shortpath="${new_path}.cmd"
39314    else
39315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39316$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39317      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39318$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39319      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39320    fi
39321  else
39322    input_to_shortpath="$new_path"
39323  fi
39324
39325  # Call helper function which possibly converts this using DOS-style short mode.
39326  # If so, the updated path is stored in $new_path.
39327  new_path="$input_to_shortpath"
39328
39329  input_path="$input_to_shortpath"
39330  # Check if we need to convert this using DOS-style short mode. If the path
39331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39332  # take no chances and rewrite it.
39333  # Note: m4 eats our [], so we need to use [ and ] instead.
39334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39335  if test "x$has_forbidden_chars" != x; then
39336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39340      # Going to short mode and back again did indeed matter. Since short mode is
39341      # case insensitive, let's make it lowercase to improve readability.
39342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39343      # Now convert it back to Unix-style (cygpath)
39344      input_path=`$CYGPATH -u "$shortmode_path"`
39345      new_path="$input_path"
39346    fi
39347  fi
39348
39349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39350  if test "x$test_cygdrive_prefix" = x; then
39351    # As a simple fix, exclude /usr/bin since it's not a real path.
39352    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39354      # a path prefixed by /cygdrive for fixpath to work.
39355      new_path="$CYGWIN_ROOT_PATH$input_path"
39356    fi
39357  fi
39358
39359  # remove trailing .exe if any
39360  new_path="${new_path/%.exe/}"
39361
39362    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39363
39364  # First separate the path from the arguments. This will split at the first
39365  # space.
39366  complete="$DUMPBIN"
39367  path="${complete%% *}"
39368  tmp="$complete EOL"
39369  arguments="${tmp#* }"
39370
39371  # Input might be given as Windows format, start by converting to
39372  # unix format.
39373  new_path="$path"
39374
39375  windows_path="$new_path"
39376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39377    unix_path=`$CYGPATH -u "$windows_path"`
39378    new_path="$unix_path"
39379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39381    new_path="$unix_path"
39382  fi
39383
39384
39385  # Now try to locate executable using which
39386  new_path=`$WHICH "$new_path" 2> /dev/null`
39387
39388  if test "x$new_path" = x; then
39389    # Oops. Which didn't find the executable.
39390    # The splitting of arguments from the executable at a space might have been incorrect,
39391    # since paths with space are more likely in Windows. Give it another try with the whole
39392    # argument.
39393    path="$complete"
39394    arguments="EOL"
39395    new_path="$path"
39396
39397  windows_path="$new_path"
39398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39399    unix_path=`$CYGPATH -u "$windows_path"`
39400    new_path="$unix_path"
39401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39403    new_path="$unix_path"
39404  fi
39405
39406
39407    new_path=`$WHICH "$new_path" 2> /dev/null`
39408    # bat and cmd files are not always considered executable in MSYS causing which
39409    # to not find them
39410    if test "x$new_path" = x \
39411        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39412        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39413      new_path="$path"
39414
39415  windows_path="$new_path"
39416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39417    unix_path=`$CYGPATH -u "$windows_path"`
39418    new_path="$unix_path"
39419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39421    new_path="$unix_path"
39422  fi
39423
39424    fi
39425
39426    if test "x$new_path" = x; then
39427      # It's still not found. Now this is an unrecoverable error.
39428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39429$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39430      has_space=`$ECHO "$complete" | $GREP " "`
39431      if test "x$has_space" != x; then
39432        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39433$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39434      fi
39435      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39436    fi
39437  fi
39438
39439  # Now new_path has a complete unix path to the binary
39440  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39441    # Keep paths in /bin as-is, but remove trailing .exe if any
39442    new_path="${new_path/%.exe/}"
39443    # Do not save /bin paths to all_fixpath_prefixes!
39444  else
39445    # Not in mixed or Windows style, start by that.
39446    new_path=`cmd //c echo $new_path`
39447
39448  input_path="$new_path"
39449  # Check if we need to convert this using DOS-style short mode. If the path
39450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39451  # take no chances and rewrite it.
39452  # Note: m4 eats our [], so we need to use [ and ] instead.
39453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39454  if test "x$has_forbidden_chars" != x; then
39455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39457  fi
39458
39459    # Output is in $new_path
39460
39461  windows_path="$new_path"
39462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39463    unix_path=`$CYGPATH -u "$windows_path"`
39464    new_path="$unix_path"
39465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39467    new_path="$unix_path"
39468  fi
39469
39470    # remove trailing .exe if any
39471    new_path="${new_path/%.exe/}"
39472
39473    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39474    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39475  fi
39476
39477    else
39478      # We're on a unix platform. Hooray! :)
39479      # First separate the path from the arguments. This will split at the first
39480      # space.
39481      complete="$DUMPBIN"
39482      path="${complete%% *}"
39483      tmp="$complete EOL"
39484      arguments="${tmp#* }"
39485
39486      # Cannot rely on the command "which" here since it doesn't always work.
39487      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39488      if test -z "$is_absolute_path"; then
39489        # Path to executable is not absolute. Find it.
39490        IFS_save="$IFS"
39491        IFS=:
39492        for p in $PATH; do
39493          if test -f "$p/$path" && test -x "$p/$path"; then
39494            new_path="$p/$path"
39495            break
39496          fi
39497        done
39498        IFS="$IFS_save"
39499      else
39500        # This is an absolute path, we can use it without further modifications.
39501        new_path="$path"
39502      fi
39503
39504      if test "x$new_path" = x; then
39505        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39506$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39507        has_space=`$ECHO "$complete" | $GREP " "`
39508        if test "x$has_space" != x; then
39509          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39510$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39511        fi
39512        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39513      fi
39514    fi
39515
39516    # Now join together the path and the arguments once again
39517    if test "x$arguments" != xEOL; then
39518      new_complete="$new_path ${arguments% *}"
39519    else
39520      new_complete="$new_path"
39521    fi
39522
39523    if test "x$complete" != "x$new_complete"; then
39524      DUMPBIN="$new_complete"
39525      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39526$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39527    fi
39528  fi
39529
39530    # We need to check for 'msbuild.exe' because at the place where we expect to
39531    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39532    # won't find the 'msbuild.exe' executable in that case (and the
39533    # 'ac_executable_extensions' is unusable due to performance reasons).
39534    # Notice that we intentionally don't fix up the path to MSBUILD because we
39535    # will call it in a DOS shell during freetype detection on Windows (see
39536    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39537    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39538set dummy msbuild.exe; ac_word=$2
39539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39540$as_echo_n "checking for $ac_word... " >&6; }
39541if ${ac_cv_prog_MSBUILD+:} false; then :
39542  $as_echo_n "(cached) " >&6
39543else
39544  if test -n "$MSBUILD"; then
39545  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39546else
39547as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39548for as_dir in $PATH
39549do
39550  IFS=$as_save_IFS
39551  test -z "$as_dir" && as_dir=.
39552    for ac_exec_ext in '' $ac_executable_extensions; do
39553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39554    ac_cv_prog_MSBUILD="msbuild.exe"
39555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39556    break 2
39557  fi
39558done
39559  done
39560IFS=$as_save_IFS
39561
39562fi
39563fi
39564MSBUILD=$ac_cv_prog_MSBUILD
39565if test -n "$MSBUILD"; then
39566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39567$as_echo "$MSBUILD" >&6; }
39568else
39569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39570$as_echo "no" >&6; }
39571fi
39572
39573
39574  fi
39575
39576  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39577
39578
39579  # Publish this variable in the help.
39580
39581
39582  if [ -z "${STRIP+x}" ]; then
39583    # The variable is not set by user, try to locate tool using the code snippet
39584    for ac_prog in strip
39585do
39586  # Extract the first word of "$ac_prog", so it can be a program name with args.
39587set dummy $ac_prog; ac_word=$2
39588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39589$as_echo_n "checking for $ac_word... " >&6; }
39590if ${ac_cv_path_STRIP+:} false; then :
39591  $as_echo_n "(cached) " >&6
39592else
39593  case $STRIP in
39594  [\\/]* | ?:[\\/]*)
39595  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39596  ;;
39597  *)
39598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39599for as_dir in $PATH
39600do
39601  IFS=$as_save_IFS
39602  test -z "$as_dir" && as_dir=.
39603    for ac_exec_ext in '' $ac_executable_extensions; do
39604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39605    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39607    break 2
39608  fi
39609done
39610  done
39611IFS=$as_save_IFS
39612
39613  ;;
39614esac
39615fi
39616STRIP=$ac_cv_path_STRIP
39617if test -n "$STRIP"; then
39618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39619$as_echo "$STRIP" >&6; }
39620else
39621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39622$as_echo "no" >&6; }
39623fi
39624
39625
39626  test -n "$STRIP" && break
39627done
39628
39629  else
39630    # The variable is set, but is it from the command line or the environment?
39631
39632    # Try to remove the string !STRIP! from our list.
39633    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39634    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39635      # If it failed, the variable was not from the command line. Ignore it,
39636      # but warn the user (except for BASH, which is always set by the calling BASH).
39637      if test "xSTRIP" != xBASH; then
39638        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39639$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39640      fi
39641      # Try to locate tool using the code snippet
39642      for ac_prog in strip
39643do
39644  # Extract the first word of "$ac_prog", so it can be a program name with args.
39645set dummy $ac_prog; ac_word=$2
39646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39647$as_echo_n "checking for $ac_word... " >&6; }
39648if ${ac_cv_path_STRIP+:} false; then :
39649  $as_echo_n "(cached) " >&6
39650else
39651  case $STRIP in
39652  [\\/]* | ?:[\\/]*)
39653  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39654  ;;
39655  *)
39656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39657for as_dir in $PATH
39658do
39659  IFS=$as_save_IFS
39660  test -z "$as_dir" && as_dir=.
39661    for ac_exec_ext in '' $ac_executable_extensions; do
39662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39663    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39665    break 2
39666  fi
39667done
39668  done
39669IFS=$as_save_IFS
39670
39671  ;;
39672esac
39673fi
39674STRIP=$ac_cv_path_STRIP
39675if test -n "$STRIP"; then
39676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39677$as_echo "$STRIP" >&6; }
39678else
39679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39680$as_echo "no" >&6; }
39681fi
39682
39683
39684  test -n "$STRIP" && break
39685done
39686
39687    else
39688      # If it succeeded, then it was overridden by the user. We will use it
39689      # for the tool.
39690
39691      # First remove it from the list of overridden variables, so we can test
39692      # for unknown variables in the end.
39693      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39694
39695      # Check if we try to supply an empty value
39696      if test "x$STRIP" = x; then
39697        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39698$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39699        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39700$as_echo_n "checking for STRIP... " >&6; }
39701        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39702$as_echo "disabled" >&6; }
39703      else
39704        # Check if the provided tool contains a complete path.
39705        tool_specified="$STRIP"
39706        tool_basename="${tool_specified##*/}"
39707        if test "x$tool_basename" = "x$tool_specified"; then
39708          # A command without a complete path is provided, search $PATH.
39709          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39710$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39711          # Extract the first word of "$tool_basename", so it can be a program name with args.
39712set dummy $tool_basename; ac_word=$2
39713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39714$as_echo_n "checking for $ac_word... " >&6; }
39715if ${ac_cv_path_STRIP+:} false; then :
39716  $as_echo_n "(cached) " >&6
39717else
39718  case $STRIP in
39719  [\\/]* | ?:[\\/]*)
39720  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39721  ;;
39722  *)
39723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39724for as_dir in $PATH
39725do
39726  IFS=$as_save_IFS
39727  test -z "$as_dir" && as_dir=.
39728    for ac_exec_ext in '' $ac_executable_extensions; do
39729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39730    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39732    break 2
39733  fi
39734done
39735  done
39736IFS=$as_save_IFS
39737
39738  ;;
39739esac
39740fi
39741STRIP=$ac_cv_path_STRIP
39742if test -n "$STRIP"; then
39743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39744$as_echo "$STRIP" >&6; }
39745else
39746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39747$as_echo "no" >&6; }
39748fi
39749
39750
39751          if test "x$STRIP" = x; then
39752            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39753          fi
39754        else
39755          # Otherwise we believe it is a complete path. Use it as it is.
39756          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39757$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39758          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39759$as_echo_n "checking for STRIP... " >&6; }
39760          if test ! -x "$tool_specified"; then
39761            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39762$as_echo "not found" >&6; }
39763            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39764          fi
39765          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39766$as_echo "$tool_specified" >&6; }
39767        fi
39768      fi
39769    fi
39770
39771  fi
39772
39773
39774
39775  # Only process if variable expands to non-empty
39776
39777  if test "x$STRIP" != x; then
39778    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39779
39780  # First separate the path from the arguments. This will split at the first
39781  # space.
39782  complete="$STRIP"
39783  path="${complete%% *}"
39784  tmp="$complete EOL"
39785  arguments="${tmp#* }"
39786
39787  # Input might be given as Windows format, start by converting to
39788  # unix format.
39789  new_path=`$CYGPATH -u "$path"`
39790
39791  # Now try to locate executable using which
39792  new_path=`$WHICH "$new_path" 2> /dev/null`
39793  # bat and cmd files are not always considered executable in cygwin causing which
39794  # to not find them
39795  if test "x$new_path" = x \
39796      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39797      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39798    new_path=`$CYGPATH -u "$path"`
39799  fi
39800  if test "x$new_path" = x; then
39801    # Oops. Which didn't find the executable.
39802    # The splitting of arguments from the executable at a space might have been incorrect,
39803    # since paths with space are more likely in Windows. Give it another try with the whole
39804    # argument.
39805    path="$complete"
39806    arguments="EOL"
39807    new_path=`$CYGPATH -u "$path"`
39808    new_path=`$WHICH "$new_path" 2> /dev/null`
39809    # bat and cmd files are not always considered executable in cygwin causing which
39810    # to not find them
39811    if test "x$new_path" = x \
39812        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39813        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39814      new_path=`$CYGPATH -u "$path"`
39815    fi
39816    if test "x$new_path" = x; then
39817      # It's still not found. Now this is an unrecoverable error.
39818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39819$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39820      has_space=`$ECHO "$complete" | $GREP " "`
39821      if test "x$has_space" != x; then
39822        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39823$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39824      fi
39825      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39826    fi
39827  fi
39828
39829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39832  # "foo.exe" is OK but "foo" is an error.
39833  #
39834  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39835  # It is also a way to make sure we got the proper file name for the real test later on.
39836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39837  if test "x$test_shortpath" = x; then
39838    # Short path failed, file does not exist as specified.
39839    # Try adding .exe or .cmd
39840    if test -f "${new_path}.exe"; then
39841      input_to_shortpath="${new_path}.exe"
39842    elif test -f "${new_path}.cmd"; then
39843      input_to_shortpath="${new_path}.cmd"
39844    else
39845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39846$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39847      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39848$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39849      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39850    fi
39851  else
39852    input_to_shortpath="$new_path"
39853  fi
39854
39855  # Call helper function which possibly converts this using DOS-style short mode.
39856  # If so, the updated path is stored in $new_path.
39857  new_path="$input_to_shortpath"
39858
39859  input_path="$input_to_shortpath"
39860  # Check if we need to convert this using DOS-style short mode. If the path
39861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39862  # take no chances and rewrite it.
39863  # Note: m4 eats our [], so we need to use [ and ] instead.
39864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39865  if test "x$has_forbidden_chars" != x; then
39866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39870      # Going to short mode and back again did indeed matter. Since short mode is
39871      # case insensitive, let's make it lowercase to improve readability.
39872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39873      # Now convert it back to Unix-style (cygpath)
39874      input_path=`$CYGPATH -u "$shortmode_path"`
39875      new_path="$input_path"
39876    fi
39877  fi
39878
39879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39880  if test "x$test_cygdrive_prefix" = x; then
39881    # As a simple fix, exclude /usr/bin since it's not a real path.
39882    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39884      # a path prefixed by /cygdrive for fixpath to work.
39885      new_path="$CYGWIN_ROOT_PATH$input_path"
39886    fi
39887  fi
39888
39889  # remove trailing .exe if any
39890  new_path="${new_path/%.exe/}"
39891
39892    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39893
39894  # First separate the path from the arguments. This will split at the first
39895  # space.
39896  complete="$STRIP"
39897  path="${complete%% *}"
39898  tmp="$complete EOL"
39899  arguments="${tmp#* }"
39900
39901  # Input might be given as Windows format, start by converting to
39902  # unix format.
39903  new_path="$path"
39904
39905  windows_path="$new_path"
39906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39907    unix_path=`$CYGPATH -u "$windows_path"`
39908    new_path="$unix_path"
39909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39911    new_path="$unix_path"
39912  fi
39913
39914
39915  # Now try to locate executable using which
39916  new_path=`$WHICH "$new_path" 2> /dev/null`
39917
39918  if test "x$new_path" = x; then
39919    # Oops. Which didn't find the executable.
39920    # The splitting of arguments from the executable at a space might have been incorrect,
39921    # since paths with space are more likely in Windows. Give it another try with the whole
39922    # argument.
39923    path="$complete"
39924    arguments="EOL"
39925    new_path="$path"
39926
39927  windows_path="$new_path"
39928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39929    unix_path=`$CYGPATH -u "$windows_path"`
39930    new_path="$unix_path"
39931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39933    new_path="$unix_path"
39934  fi
39935
39936
39937    new_path=`$WHICH "$new_path" 2> /dev/null`
39938    # bat and cmd files are not always considered executable in MSYS causing which
39939    # to not find them
39940    if test "x$new_path" = x \
39941        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39942        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39943      new_path="$path"
39944
39945  windows_path="$new_path"
39946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39947    unix_path=`$CYGPATH -u "$windows_path"`
39948    new_path="$unix_path"
39949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39951    new_path="$unix_path"
39952  fi
39953
39954    fi
39955
39956    if test "x$new_path" = x; then
39957      # It's still not found. Now this is an unrecoverable error.
39958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39959$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39960      has_space=`$ECHO "$complete" | $GREP " "`
39961      if test "x$has_space" != x; then
39962        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39963$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39964      fi
39965      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39966    fi
39967  fi
39968
39969  # Now new_path has a complete unix path to the binary
39970  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39971    # Keep paths in /bin as-is, but remove trailing .exe if any
39972    new_path="${new_path/%.exe/}"
39973    # Do not save /bin paths to all_fixpath_prefixes!
39974  else
39975    # Not in mixed or Windows style, start by that.
39976    new_path=`cmd //c echo $new_path`
39977
39978  input_path="$new_path"
39979  # Check if we need to convert this using DOS-style short mode. If the path
39980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39981  # take no chances and rewrite it.
39982  # Note: m4 eats our [], so we need to use [ and ] instead.
39983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39984  if test "x$has_forbidden_chars" != x; then
39985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39986    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39987  fi
39988
39989    # Output is in $new_path
39990
39991  windows_path="$new_path"
39992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39993    unix_path=`$CYGPATH -u "$windows_path"`
39994    new_path="$unix_path"
39995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39997    new_path="$unix_path"
39998  fi
39999
40000    # remove trailing .exe if any
40001    new_path="${new_path/%.exe/}"
40002
40003    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40004    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40005  fi
40006
40007    else
40008      # We're on a unix platform. Hooray! :)
40009      # First separate the path from the arguments. This will split at the first
40010      # space.
40011      complete="$STRIP"
40012      path="${complete%% *}"
40013      tmp="$complete EOL"
40014      arguments="${tmp#* }"
40015
40016      # Cannot rely on the command "which" here since it doesn't always work.
40017      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40018      if test -z "$is_absolute_path"; then
40019        # Path to executable is not absolute. Find it.
40020        IFS_save="$IFS"
40021        IFS=:
40022        for p in $PATH; do
40023          if test -f "$p/$path" && test -x "$p/$path"; then
40024            new_path="$p/$path"
40025            break
40026          fi
40027        done
40028        IFS="$IFS_save"
40029      else
40030        # This is an absolute path, we can use it without further modifications.
40031        new_path="$path"
40032      fi
40033
40034      if test "x$new_path" = x; then
40035        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40036$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40037        has_space=`$ECHO "$complete" | $GREP " "`
40038        if test "x$has_space" != x; then
40039          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40040$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40041        fi
40042        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40043      fi
40044    fi
40045
40046    # Now join together the path and the arguments once again
40047    if test "x$arguments" != xEOL; then
40048      new_complete="$new_path ${arguments% *}"
40049    else
40050      new_complete="$new_path"
40051    fi
40052
40053    if test "x$complete" != "x$new_complete"; then
40054      STRIP="$new_complete"
40055      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40056$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40057    fi
40058  fi
40059
40060
40061
40062  # Publish this variable in the help.
40063
40064
40065  if [ -z "${NM+x}" ]; then
40066    # The variable is not set by user, try to locate tool using the code snippet
40067    for ac_prog in nm
40068do
40069  # Extract the first word of "$ac_prog", so it can be a program name with args.
40070set dummy $ac_prog; ac_word=$2
40071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40072$as_echo_n "checking for $ac_word... " >&6; }
40073if ${ac_cv_path_NM+:} false; then :
40074  $as_echo_n "(cached) " >&6
40075else
40076  case $NM in
40077  [\\/]* | ?:[\\/]*)
40078  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40079  ;;
40080  *)
40081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40082for as_dir in $PATH
40083do
40084  IFS=$as_save_IFS
40085  test -z "$as_dir" && as_dir=.
40086    for ac_exec_ext in '' $ac_executable_extensions; do
40087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40088    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40090    break 2
40091  fi
40092done
40093  done
40094IFS=$as_save_IFS
40095
40096  ;;
40097esac
40098fi
40099NM=$ac_cv_path_NM
40100if test -n "$NM"; then
40101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40102$as_echo "$NM" >&6; }
40103else
40104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40105$as_echo "no" >&6; }
40106fi
40107
40108
40109  test -n "$NM" && break
40110done
40111
40112  else
40113    # The variable is set, but is it from the command line or the environment?
40114
40115    # Try to remove the string !NM! from our list.
40116    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40117    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40118      # If it failed, the variable was not from the command line. Ignore it,
40119      # but warn the user (except for BASH, which is always set by the calling BASH).
40120      if test "xNM" != xBASH; then
40121        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40122$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40123      fi
40124      # Try to locate tool using the code snippet
40125      for ac_prog in nm
40126do
40127  # Extract the first word of "$ac_prog", so it can be a program name with args.
40128set dummy $ac_prog; ac_word=$2
40129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40130$as_echo_n "checking for $ac_word... " >&6; }
40131if ${ac_cv_path_NM+:} false; then :
40132  $as_echo_n "(cached) " >&6
40133else
40134  case $NM in
40135  [\\/]* | ?:[\\/]*)
40136  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40137  ;;
40138  *)
40139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40140for as_dir in $PATH
40141do
40142  IFS=$as_save_IFS
40143  test -z "$as_dir" && as_dir=.
40144    for ac_exec_ext in '' $ac_executable_extensions; do
40145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40146    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40148    break 2
40149  fi
40150done
40151  done
40152IFS=$as_save_IFS
40153
40154  ;;
40155esac
40156fi
40157NM=$ac_cv_path_NM
40158if test -n "$NM"; then
40159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40160$as_echo "$NM" >&6; }
40161else
40162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40163$as_echo "no" >&6; }
40164fi
40165
40166
40167  test -n "$NM" && break
40168done
40169
40170    else
40171      # If it succeeded, then it was overridden by the user. We will use it
40172      # for the tool.
40173
40174      # First remove it from the list of overridden variables, so we can test
40175      # for unknown variables in the end.
40176      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40177
40178      # Check if we try to supply an empty value
40179      if test "x$NM" = x; then
40180        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40181$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40182        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40183$as_echo_n "checking for NM... " >&6; }
40184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40185$as_echo "disabled" >&6; }
40186      else
40187        # Check if the provided tool contains a complete path.
40188        tool_specified="$NM"
40189        tool_basename="${tool_specified##*/}"
40190        if test "x$tool_basename" = "x$tool_specified"; then
40191          # A command without a complete path is provided, search $PATH.
40192          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40193$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40194          # Extract the first word of "$tool_basename", so it can be a program name with args.
40195set dummy $tool_basename; ac_word=$2
40196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40197$as_echo_n "checking for $ac_word... " >&6; }
40198if ${ac_cv_path_NM+:} false; then :
40199  $as_echo_n "(cached) " >&6
40200else
40201  case $NM in
40202  [\\/]* | ?:[\\/]*)
40203  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40204  ;;
40205  *)
40206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40207for as_dir in $PATH
40208do
40209  IFS=$as_save_IFS
40210  test -z "$as_dir" && as_dir=.
40211    for ac_exec_ext in '' $ac_executable_extensions; do
40212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40213    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40215    break 2
40216  fi
40217done
40218  done
40219IFS=$as_save_IFS
40220
40221  ;;
40222esac
40223fi
40224NM=$ac_cv_path_NM
40225if test -n "$NM"; then
40226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40227$as_echo "$NM" >&6; }
40228else
40229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40230$as_echo "no" >&6; }
40231fi
40232
40233
40234          if test "x$NM" = x; then
40235            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40236          fi
40237        else
40238          # Otherwise we believe it is a complete path. Use it as it is.
40239          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40240$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40241          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40242$as_echo_n "checking for NM... " >&6; }
40243          if test ! -x "$tool_specified"; then
40244            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40245$as_echo "not found" >&6; }
40246            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40247          fi
40248          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40249$as_echo "$tool_specified" >&6; }
40250        fi
40251      fi
40252    fi
40253
40254  fi
40255
40256
40257
40258  # Only process if variable expands to non-empty
40259
40260  if test "x$NM" != x; then
40261    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40262
40263  # First separate the path from the arguments. This will split at the first
40264  # space.
40265  complete="$NM"
40266  path="${complete%% *}"
40267  tmp="$complete EOL"
40268  arguments="${tmp#* }"
40269
40270  # Input might be given as Windows format, start by converting to
40271  # unix format.
40272  new_path=`$CYGPATH -u "$path"`
40273
40274  # Now try to locate executable using which
40275  new_path=`$WHICH "$new_path" 2> /dev/null`
40276  # bat and cmd files are not always considered executable in cygwin causing which
40277  # to not find them
40278  if test "x$new_path" = x \
40279      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40280      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40281    new_path=`$CYGPATH -u "$path"`
40282  fi
40283  if test "x$new_path" = x; then
40284    # Oops. Which didn't find the executable.
40285    # The splitting of arguments from the executable at a space might have been incorrect,
40286    # since paths with space are more likely in Windows. Give it another try with the whole
40287    # argument.
40288    path="$complete"
40289    arguments="EOL"
40290    new_path=`$CYGPATH -u "$path"`
40291    new_path=`$WHICH "$new_path" 2> /dev/null`
40292    # bat and cmd files are not always considered executable in cygwin causing which
40293    # to not find them
40294    if test "x$new_path" = x \
40295        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40296        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40297      new_path=`$CYGPATH -u "$path"`
40298    fi
40299    if test "x$new_path" = x; then
40300      # It's still not found. Now this is an unrecoverable error.
40301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40302$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40303      has_space=`$ECHO "$complete" | $GREP " "`
40304      if test "x$has_space" != x; then
40305        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40306$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40307      fi
40308      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40309    fi
40310  fi
40311
40312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40315  # "foo.exe" is OK but "foo" is an error.
40316  #
40317  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40318  # It is also a way to make sure we got the proper file name for the real test later on.
40319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40320  if test "x$test_shortpath" = x; then
40321    # Short path failed, file does not exist as specified.
40322    # Try adding .exe or .cmd
40323    if test -f "${new_path}.exe"; then
40324      input_to_shortpath="${new_path}.exe"
40325    elif test -f "${new_path}.cmd"; then
40326      input_to_shortpath="${new_path}.cmd"
40327    else
40328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40329$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40330      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40331$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40332      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40333    fi
40334  else
40335    input_to_shortpath="$new_path"
40336  fi
40337
40338  # Call helper function which possibly converts this using DOS-style short mode.
40339  # If so, the updated path is stored in $new_path.
40340  new_path="$input_to_shortpath"
40341
40342  input_path="$input_to_shortpath"
40343  # Check if we need to convert this using DOS-style short mode. If the path
40344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40345  # take no chances and rewrite it.
40346  # Note: m4 eats our [], so we need to use [ and ] instead.
40347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40348  if test "x$has_forbidden_chars" != x; then
40349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40353      # Going to short mode and back again did indeed matter. Since short mode is
40354      # case insensitive, let's make it lowercase to improve readability.
40355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40356      # Now convert it back to Unix-style (cygpath)
40357      input_path=`$CYGPATH -u "$shortmode_path"`
40358      new_path="$input_path"
40359    fi
40360  fi
40361
40362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40363  if test "x$test_cygdrive_prefix" = x; then
40364    # As a simple fix, exclude /usr/bin since it's not a real path.
40365    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40367      # a path prefixed by /cygdrive for fixpath to work.
40368      new_path="$CYGWIN_ROOT_PATH$input_path"
40369    fi
40370  fi
40371
40372  # remove trailing .exe if any
40373  new_path="${new_path/%.exe/}"
40374
40375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40376
40377  # First separate the path from the arguments. This will split at the first
40378  # space.
40379  complete="$NM"
40380  path="${complete%% *}"
40381  tmp="$complete EOL"
40382  arguments="${tmp#* }"
40383
40384  # Input might be given as Windows format, start by converting to
40385  # unix format.
40386  new_path="$path"
40387
40388  windows_path="$new_path"
40389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40390    unix_path=`$CYGPATH -u "$windows_path"`
40391    new_path="$unix_path"
40392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40394    new_path="$unix_path"
40395  fi
40396
40397
40398  # Now try to locate executable using which
40399  new_path=`$WHICH "$new_path" 2> /dev/null`
40400
40401  if test "x$new_path" = x; then
40402    # Oops. Which didn't find the executable.
40403    # The splitting of arguments from the executable at a space might have been incorrect,
40404    # since paths with space are more likely in Windows. Give it another try with the whole
40405    # argument.
40406    path="$complete"
40407    arguments="EOL"
40408    new_path="$path"
40409
40410  windows_path="$new_path"
40411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40412    unix_path=`$CYGPATH -u "$windows_path"`
40413    new_path="$unix_path"
40414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40416    new_path="$unix_path"
40417  fi
40418
40419
40420    new_path=`$WHICH "$new_path" 2> /dev/null`
40421    # bat and cmd files are not always considered executable in MSYS causing which
40422    # to not find them
40423    if test "x$new_path" = x \
40424        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40425        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40426      new_path="$path"
40427
40428  windows_path="$new_path"
40429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40430    unix_path=`$CYGPATH -u "$windows_path"`
40431    new_path="$unix_path"
40432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40434    new_path="$unix_path"
40435  fi
40436
40437    fi
40438
40439    if test "x$new_path" = x; then
40440      # It's still not found. Now this is an unrecoverable error.
40441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40442$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40443      has_space=`$ECHO "$complete" | $GREP " "`
40444      if test "x$has_space" != x; then
40445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40447      fi
40448      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40449    fi
40450  fi
40451
40452  # Now new_path has a complete unix path to the binary
40453  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40454    # Keep paths in /bin as-is, but remove trailing .exe if any
40455    new_path="${new_path/%.exe/}"
40456    # Do not save /bin paths to all_fixpath_prefixes!
40457  else
40458    # Not in mixed or Windows style, start by that.
40459    new_path=`cmd //c echo $new_path`
40460
40461  input_path="$new_path"
40462  # Check if we need to convert this using DOS-style short mode. If the path
40463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40464  # take no chances and rewrite it.
40465  # Note: m4 eats our [], so we need to use [ and ] instead.
40466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40467  if test "x$has_forbidden_chars" != x; then
40468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40470  fi
40471
40472    # Output is in $new_path
40473
40474  windows_path="$new_path"
40475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40476    unix_path=`$CYGPATH -u "$windows_path"`
40477    new_path="$unix_path"
40478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40480    new_path="$unix_path"
40481  fi
40482
40483    # remove trailing .exe if any
40484    new_path="${new_path/%.exe/}"
40485
40486    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40487    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40488  fi
40489
40490    else
40491      # We're on a unix platform. Hooray! :)
40492      # First separate the path from the arguments. This will split at the first
40493      # space.
40494      complete="$NM"
40495      path="${complete%% *}"
40496      tmp="$complete EOL"
40497      arguments="${tmp#* }"
40498
40499      # Cannot rely on the command "which" here since it doesn't always work.
40500      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40501      if test -z "$is_absolute_path"; then
40502        # Path to executable is not absolute. Find it.
40503        IFS_save="$IFS"
40504        IFS=:
40505        for p in $PATH; do
40506          if test -f "$p/$path" && test -x "$p/$path"; then
40507            new_path="$p/$path"
40508            break
40509          fi
40510        done
40511        IFS="$IFS_save"
40512      else
40513        # This is an absolute path, we can use it without further modifications.
40514        new_path="$path"
40515      fi
40516
40517      if test "x$new_path" = x; then
40518        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40519$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40520        has_space=`$ECHO "$complete" | $GREP " "`
40521        if test "x$has_space" != x; then
40522          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40523$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40524        fi
40525        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40526      fi
40527    fi
40528
40529    # Now join together the path and the arguments once again
40530    if test "x$arguments" != xEOL; then
40531      new_complete="$new_path ${arguments% *}"
40532    else
40533      new_complete="$new_path"
40534    fi
40535
40536    if test "x$complete" != "x$new_complete"; then
40537      NM="$new_complete"
40538      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40539$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40540    fi
40541  fi
40542
40543
40544
40545  # Publish this variable in the help.
40546
40547
40548  if [ -z "${GNM+x}" ]; then
40549    # The variable is not set by user, try to locate tool using the code snippet
40550    for ac_prog in gnm
40551do
40552  # Extract the first word of "$ac_prog", so it can be a program name with args.
40553set dummy $ac_prog; ac_word=$2
40554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40555$as_echo_n "checking for $ac_word... " >&6; }
40556if ${ac_cv_path_GNM+:} false; then :
40557  $as_echo_n "(cached) " >&6
40558else
40559  case $GNM in
40560  [\\/]* | ?:[\\/]*)
40561  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40562  ;;
40563  *)
40564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40565for as_dir in $PATH
40566do
40567  IFS=$as_save_IFS
40568  test -z "$as_dir" && as_dir=.
40569    for ac_exec_ext in '' $ac_executable_extensions; do
40570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40571    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40573    break 2
40574  fi
40575done
40576  done
40577IFS=$as_save_IFS
40578
40579  ;;
40580esac
40581fi
40582GNM=$ac_cv_path_GNM
40583if test -n "$GNM"; then
40584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40585$as_echo "$GNM" >&6; }
40586else
40587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40588$as_echo "no" >&6; }
40589fi
40590
40591
40592  test -n "$GNM" && break
40593done
40594
40595  else
40596    # The variable is set, but is it from the command line or the environment?
40597
40598    # Try to remove the string !GNM! from our list.
40599    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40600    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40601      # If it failed, the variable was not from the command line. Ignore it,
40602      # but warn the user (except for BASH, which is always set by the calling BASH).
40603      if test "xGNM" != xBASH; then
40604        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40605$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40606      fi
40607      # Try to locate tool using the code snippet
40608      for ac_prog in gnm
40609do
40610  # Extract the first word of "$ac_prog", so it can be a program name with args.
40611set dummy $ac_prog; ac_word=$2
40612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40613$as_echo_n "checking for $ac_word... " >&6; }
40614if ${ac_cv_path_GNM+:} false; then :
40615  $as_echo_n "(cached) " >&6
40616else
40617  case $GNM in
40618  [\\/]* | ?:[\\/]*)
40619  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40620  ;;
40621  *)
40622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40623for as_dir in $PATH
40624do
40625  IFS=$as_save_IFS
40626  test -z "$as_dir" && as_dir=.
40627    for ac_exec_ext in '' $ac_executable_extensions; do
40628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40629    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40631    break 2
40632  fi
40633done
40634  done
40635IFS=$as_save_IFS
40636
40637  ;;
40638esac
40639fi
40640GNM=$ac_cv_path_GNM
40641if test -n "$GNM"; then
40642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40643$as_echo "$GNM" >&6; }
40644else
40645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40646$as_echo "no" >&6; }
40647fi
40648
40649
40650  test -n "$GNM" && break
40651done
40652
40653    else
40654      # If it succeeded, then it was overridden by the user. We will use it
40655      # for the tool.
40656
40657      # First remove it from the list of overridden variables, so we can test
40658      # for unknown variables in the end.
40659      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40660
40661      # Check if we try to supply an empty value
40662      if test "x$GNM" = x; then
40663        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40664$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40665        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40666$as_echo_n "checking for GNM... " >&6; }
40667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40668$as_echo "disabled" >&6; }
40669      else
40670        # Check if the provided tool contains a complete path.
40671        tool_specified="$GNM"
40672        tool_basename="${tool_specified##*/}"
40673        if test "x$tool_basename" = "x$tool_specified"; then
40674          # A command without a complete path is provided, search $PATH.
40675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40676$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40677          # Extract the first word of "$tool_basename", so it can be a program name with args.
40678set dummy $tool_basename; ac_word=$2
40679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40680$as_echo_n "checking for $ac_word... " >&6; }
40681if ${ac_cv_path_GNM+:} false; then :
40682  $as_echo_n "(cached) " >&6
40683else
40684  case $GNM in
40685  [\\/]* | ?:[\\/]*)
40686  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40687  ;;
40688  *)
40689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40690for as_dir in $PATH
40691do
40692  IFS=$as_save_IFS
40693  test -z "$as_dir" && as_dir=.
40694    for ac_exec_ext in '' $ac_executable_extensions; do
40695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40696    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40698    break 2
40699  fi
40700done
40701  done
40702IFS=$as_save_IFS
40703
40704  ;;
40705esac
40706fi
40707GNM=$ac_cv_path_GNM
40708if test -n "$GNM"; then
40709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40710$as_echo "$GNM" >&6; }
40711else
40712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40713$as_echo "no" >&6; }
40714fi
40715
40716
40717          if test "x$GNM" = x; then
40718            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40719          fi
40720        else
40721          # Otherwise we believe it is a complete path. Use it as it is.
40722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40723$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40724          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40725$as_echo_n "checking for GNM... " >&6; }
40726          if test ! -x "$tool_specified"; then
40727            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40728$as_echo "not found" >&6; }
40729            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40730          fi
40731          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40732$as_echo "$tool_specified" >&6; }
40733        fi
40734      fi
40735    fi
40736
40737  fi
40738
40739
40740
40741  # Only process if variable expands to non-empty
40742
40743  if test "x$GNM" != x; then
40744    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40745
40746  # First separate the path from the arguments. This will split at the first
40747  # space.
40748  complete="$GNM"
40749  path="${complete%% *}"
40750  tmp="$complete EOL"
40751  arguments="${tmp#* }"
40752
40753  # Input might be given as Windows format, start by converting to
40754  # unix format.
40755  new_path=`$CYGPATH -u "$path"`
40756
40757  # Now try to locate executable using which
40758  new_path=`$WHICH "$new_path" 2> /dev/null`
40759  # bat and cmd files are not always considered executable in cygwin causing which
40760  # to not find them
40761  if test "x$new_path" = x \
40762      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40763      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40764    new_path=`$CYGPATH -u "$path"`
40765  fi
40766  if test "x$new_path" = x; then
40767    # Oops. Which didn't find the executable.
40768    # The splitting of arguments from the executable at a space might have been incorrect,
40769    # since paths with space are more likely in Windows. Give it another try with the whole
40770    # argument.
40771    path="$complete"
40772    arguments="EOL"
40773    new_path=`$CYGPATH -u "$path"`
40774    new_path=`$WHICH "$new_path" 2> /dev/null`
40775    # bat and cmd files are not always considered executable in cygwin causing which
40776    # to not find them
40777    if test "x$new_path" = x \
40778        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40779        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40780      new_path=`$CYGPATH -u "$path"`
40781    fi
40782    if test "x$new_path" = x; then
40783      # It's still not found. Now this is an unrecoverable error.
40784      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40785$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40786      has_space=`$ECHO "$complete" | $GREP " "`
40787      if test "x$has_space" != x; then
40788        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40789$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40790      fi
40791      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40792    fi
40793  fi
40794
40795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40798  # "foo.exe" is OK but "foo" is an error.
40799  #
40800  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40801  # It is also a way to make sure we got the proper file name for the real test later on.
40802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40803  if test "x$test_shortpath" = x; then
40804    # Short path failed, file does not exist as specified.
40805    # Try adding .exe or .cmd
40806    if test -f "${new_path}.exe"; then
40807      input_to_shortpath="${new_path}.exe"
40808    elif test -f "${new_path}.cmd"; then
40809      input_to_shortpath="${new_path}.cmd"
40810    else
40811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40812$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40813      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40814$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40815      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40816    fi
40817  else
40818    input_to_shortpath="$new_path"
40819  fi
40820
40821  # Call helper function which possibly converts this using DOS-style short mode.
40822  # If so, the updated path is stored in $new_path.
40823  new_path="$input_to_shortpath"
40824
40825  input_path="$input_to_shortpath"
40826  # Check if we need to convert this using DOS-style short mode. If the path
40827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40828  # take no chances and rewrite it.
40829  # Note: m4 eats our [], so we need to use [ and ] instead.
40830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40831  if test "x$has_forbidden_chars" != x; then
40832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40836      # Going to short mode and back again did indeed matter. Since short mode is
40837      # case insensitive, let's make it lowercase to improve readability.
40838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40839      # Now convert it back to Unix-style (cygpath)
40840      input_path=`$CYGPATH -u "$shortmode_path"`
40841      new_path="$input_path"
40842    fi
40843  fi
40844
40845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40846  if test "x$test_cygdrive_prefix" = x; then
40847    # As a simple fix, exclude /usr/bin since it's not a real path.
40848    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40850      # a path prefixed by /cygdrive for fixpath to work.
40851      new_path="$CYGWIN_ROOT_PATH$input_path"
40852    fi
40853  fi
40854
40855  # remove trailing .exe if any
40856  new_path="${new_path/%.exe/}"
40857
40858    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40859
40860  # First separate the path from the arguments. This will split at the first
40861  # space.
40862  complete="$GNM"
40863  path="${complete%% *}"
40864  tmp="$complete EOL"
40865  arguments="${tmp#* }"
40866
40867  # Input might be given as Windows format, start by converting to
40868  # unix format.
40869  new_path="$path"
40870
40871  windows_path="$new_path"
40872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40873    unix_path=`$CYGPATH -u "$windows_path"`
40874    new_path="$unix_path"
40875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40877    new_path="$unix_path"
40878  fi
40879
40880
40881  # Now try to locate executable using which
40882  new_path=`$WHICH "$new_path" 2> /dev/null`
40883
40884  if test "x$new_path" = x; then
40885    # Oops. Which didn't find the executable.
40886    # The splitting of arguments from the executable at a space might have been incorrect,
40887    # since paths with space are more likely in Windows. Give it another try with the whole
40888    # argument.
40889    path="$complete"
40890    arguments="EOL"
40891    new_path="$path"
40892
40893  windows_path="$new_path"
40894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40895    unix_path=`$CYGPATH -u "$windows_path"`
40896    new_path="$unix_path"
40897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40899    new_path="$unix_path"
40900  fi
40901
40902
40903    new_path=`$WHICH "$new_path" 2> /dev/null`
40904    # bat and cmd files are not always considered executable in MSYS causing which
40905    # to not find them
40906    if test "x$new_path" = x \
40907        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40908        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40909      new_path="$path"
40910
40911  windows_path="$new_path"
40912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40913    unix_path=`$CYGPATH -u "$windows_path"`
40914    new_path="$unix_path"
40915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40917    new_path="$unix_path"
40918  fi
40919
40920    fi
40921
40922    if test "x$new_path" = x; then
40923      # It's still not found. Now this is an unrecoverable error.
40924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40925$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40926      has_space=`$ECHO "$complete" | $GREP " "`
40927      if test "x$has_space" != x; then
40928        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40929$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40930      fi
40931      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40932    fi
40933  fi
40934
40935  # Now new_path has a complete unix path to the binary
40936  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40937    # Keep paths in /bin as-is, but remove trailing .exe if any
40938    new_path="${new_path/%.exe/}"
40939    # Do not save /bin paths to all_fixpath_prefixes!
40940  else
40941    # Not in mixed or Windows style, start by that.
40942    new_path=`cmd //c echo $new_path`
40943
40944  input_path="$new_path"
40945  # Check if we need to convert this using DOS-style short mode. If the path
40946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40947  # take no chances and rewrite it.
40948  # Note: m4 eats our [], so we need to use [ and ] instead.
40949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40950  if test "x$has_forbidden_chars" != x; then
40951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40952    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40953  fi
40954
40955    # Output is in $new_path
40956
40957  windows_path="$new_path"
40958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40959    unix_path=`$CYGPATH -u "$windows_path"`
40960    new_path="$unix_path"
40961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40963    new_path="$unix_path"
40964  fi
40965
40966    # remove trailing .exe if any
40967    new_path="${new_path/%.exe/}"
40968
40969    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40970    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40971  fi
40972
40973    else
40974      # We're on a unix platform. Hooray! :)
40975      # First separate the path from the arguments. This will split at the first
40976      # space.
40977      complete="$GNM"
40978      path="${complete%% *}"
40979      tmp="$complete EOL"
40980      arguments="${tmp#* }"
40981
40982      # Cannot rely on the command "which" here since it doesn't always work.
40983      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40984      if test -z "$is_absolute_path"; then
40985        # Path to executable is not absolute. Find it.
40986        IFS_save="$IFS"
40987        IFS=:
40988        for p in $PATH; do
40989          if test -f "$p/$path" && test -x "$p/$path"; then
40990            new_path="$p/$path"
40991            break
40992          fi
40993        done
40994        IFS="$IFS_save"
40995      else
40996        # This is an absolute path, we can use it without further modifications.
40997        new_path="$path"
40998      fi
40999
41000      if test "x$new_path" = x; then
41001        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41002$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41003        has_space=`$ECHO "$complete" | $GREP " "`
41004        if test "x$has_space" != x; then
41005          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41006$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41007        fi
41008        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41009      fi
41010    fi
41011
41012    # Now join together the path and the arguments once again
41013    if test "x$arguments" != xEOL; then
41014      new_complete="$new_path ${arguments% *}"
41015    else
41016      new_complete="$new_path"
41017    fi
41018
41019    if test "x$complete" != "x$new_complete"; then
41020      GNM="$new_complete"
41021      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41022$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41023    fi
41024  fi
41025
41026  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41027    # FIXME: we should unify this with the solaris case above.
41028
41029
41030  # Publish this variable in the help.
41031
41032
41033  if [ -z "${STRIP+x}" ]; then
41034    # The variable is not set by user, try to locate tool using the code snippet
41035    if test -n "$ac_tool_prefix"; then
41036  for ac_prog in strip
41037  do
41038    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41039set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41041$as_echo_n "checking for $ac_word... " >&6; }
41042if ${ac_cv_prog_STRIP+:} false; then :
41043  $as_echo_n "(cached) " >&6
41044else
41045  if test -n "$STRIP"; then
41046  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41047else
41048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41049for as_dir in $PATH
41050do
41051  IFS=$as_save_IFS
41052  test -z "$as_dir" && as_dir=.
41053    for ac_exec_ext in '' $ac_executable_extensions; do
41054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41055    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41057    break 2
41058  fi
41059done
41060  done
41061IFS=$as_save_IFS
41062
41063fi
41064fi
41065STRIP=$ac_cv_prog_STRIP
41066if test -n "$STRIP"; then
41067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41068$as_echo "$STRIP" >&6; }
41069else
41070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41071$as_echo "no" >&6; }
41072fi
41073
41074
41075    test -n "$STRIP" && break
41076  done
41077fi
41078if test -z "$STRIP"; then
41079  ac_ct_STRIP=$STRIP
41080  for ac_prog in strip
41081do
41082  # Extract the first word of "$ac_prog", so it can be a program name with args.
41083set dummy $ac_prog; ac_word=$2
41084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41085$as_echo_n "checking for $ac_word... " >&6; }
41086if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41087  $as_echo_n "(cached) " >&6
41088else
41089  if test -n "$ac_ct_STRIP"; then
41090  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41091else
41092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41093for as_dir in $PATH
41094do
41095  IFS=$as_save_IFS
41096  test -z "$as_dir" && as_dir=.
41097    for ac_exec_ext in '' $ac_executable_extensions; do
41098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41099    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41101    break 2
41102  fi
41103done
41104  done
41105IFS=$as_save_IFS
41106
41107fi
41108fi
41109ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41110if test -n "$ac_ct_STRIP"; then
41111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41112$as_echo "$ac_ct_STRIP" >&6; }
41113else
41114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41115$as_echo "no" >&6; }
41116fi
41117
41118
41119  test -n "$ac_ct_STRIP" && break
41120done
41121
41122  if test "x$ac_ct_STRIP" = x; then
41123    STRIP=""
41124  else
41125    case $cross_compiling:$ac_tool_warned in
41126yes:)
41127{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41128$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41129ac_tool_warned=yes ;;
41130esac
41131    STRIP=$ac_ct_STRIP
41132  fi
41133fi
41134
41135  else
41136    # The variable is set, but is it from the command line or the environment?
41137
41138    # Try to remove the string !STRIP! from our list.
41139    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41140    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41141      # If it failed, the variable was not from the command line. Ignore it,
41142      # but warn the user (except for BASH, which is always set by the calling BASH).
41143      if test "xSTRIP" != xBASH; then
41144        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41145$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41146      fi
41147      # Try to locate tool using the code snippet
41148      if test -n "$ac_tool_prefix"; then
41149  for ac_prog in strip
41150  do
41151    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41152set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41154$as_echo_n "checking for $ac_word... " >&6; }
41155if ${ac_cv_prog_STRIP+:} false; then :
41156  $as_echo_n "(cached) " >&6
41157else
41158  if test -n "$STRIP"; then
41159  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41160else
41161as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41162for as_dir in $PATH
41163do
41164  IFS=$as_save_IFS
41165  test -z "$as_dir" && as_dir=.
41166    for ac_exec_ext in '' $ac_executable_extensions; do
41167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41168    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41170    break 2
41171  fi
41172done
41173  done
41174IFS=$as_save_IFS
41175
41176fi
41177fi
41178STRIP=$ac_cv_prog_STRIP
41179if test -n "$STRIP"; then
41180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41181$as_echo "$STRIP" >&6; }
41182else
41183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41184$as_echo "no" >&6; }
41185fi
41186
41187
41188    test -n "$STRIP" && break
41189  done
41190fi
41191if test -z "$STRIP"; then
41192  ac_ct_STRIP=$STRIP
41193  for ac_prog in strip
41194do
41195  # Extract the first word of "$ac_prog", so it can be a program name with args.
41196set dummy $ac_prog; ac_word=$2
41197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41198$as_echo_n "checking for $ac_word... " >&6; }
41199if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41200  $as_echo_n "(cached) " >&6
41201else
41202  if test -n "$ac_ct_STRIP"; then
41203  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41204else
41205as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41206for as_dir in $PATH
41207do
41208  IFS=$as_save_IFS
41209  test -z "$as_dir" && as_dir=.
41210    for ac_exec_ext in '' $ac_executable_extensions; do
41211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41212    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41214    break 2
41215  fi
41216done
41217  done
41218IFS=$as_save_IFS
41219
41220fi
41221fi
41222ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41223if test -n "$ac_ct_STRIP"; then
41224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41225$as_echo "$ac_ct_STRIP" >&6; }
41226else
41227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41228$as_echo "no" >&6; }
41229fi
41230
41231
41232  test -n "$ac_ct_STRIP" && break
41233done
41234
41235  if test "x$ac_ct_STRIP" = x; then
41236    STRIP=""
41237  else
41238    case $cross_compiling:$ac_tool_warned in
41239yes:)
41240{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41241$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41242ac_tool_warned=yes ;;
41243esac
41244    STRIP=$ac_ct_STRIP
41245  fi
41246fi
41247
41248    else
41249      # If it succeeded, then it was overridden by the user. We will use it
41250      # for the tool.
41251
41252      # First remove it from the list of overridden variables, so we can test
41253      # for unknown variables in the end.
41254      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41255
41256      # Check if we try to supply an empty value
41257      if test "x$STRIP" = x; then
41258        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41259$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41260        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41261$as_echo_n "checking for STRIP... " >&6; }
41262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41263$as_echo "disabled" >&6; }
41264      else
41265        # Check if the provided tool contains a complete path.
41266        tool_specified="$STRIP"
41267        tool_basename="${tool_specified##*/}"
41268        if test "x$tool_basename" = "x$tool_specified"; then
41269          # A command without a complete path is provided, search $PATH.
41270          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41271$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41272          # Extract the first word of "$tool_basename", so it can be a program name with args.
41273set dummy $tool_basename; ac_word=$2
41274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41275$as_echo_n "checking for $ac_word... " >&6; }
41276if ${ac_cv_path_STRIP+:} false; then :
41277  $as_echo_n "(cached) " >&6
41278else
41279  case $STRIP in
41280  [\\/]* | ?:[\\/]*)
41281  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41282  ;;
41283  *)
41284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41285for as_dir in $PATH
41286do
41287  IFS=$as_save_IFS
41288  test -z "$as_dir" && as_dir=.
41289    for ac_exec_ext in '' $ac_executable_extensions; do
41290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41291    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41293    break 2
41294  fi
41295done
41296  done
41297IFS=$as_save_IFS
41298
41299  ;;
41300esac
41301fi
41302STRIP=$ac_cv_path_STRIP
41303if test -n "$STRIP"; then
41304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41305$as_echo "$STRIP" >&6; }
41306else
41307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41308$as_echo "no" >&6; }
41309fi
41310
41311
41312          if test "x$STRIP" = x; then
41313            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41314          fi
41315        else
41316          # Otherwise we believe it is a complete path. Use it as it is.
41317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41318$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41319          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41320$as_echo_n "checking for STRIP... " >&6; }
41321          if test ! -x "$tool_specified"; then
41322            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41323$as_echo "not found" >&6; }
41324            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41325          fi
41326          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41327$as_echo "$tool_specified" >&6; }
41328        fi
41329      fi
41330    fi
41331
41332  fi
41333
41334
41335
41336  # Only process if variable expands to non-empty
41337
41338  if test "x$STRIP" != x; then
41339    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41340
41341  # First separate the path from the arguments. This will split at the first
41342  # space.
41343  complete="$STRIP"
41344  path="${complete%% *}"
41345  tmp="$complete EOL"
41346  arguments="${tmp#* }"
41347
41348  # Input might be given as Windows format, start by converting to
41349  # unix format.
41350  new_path=`$CYGPATH -u "$path"`
41351
41352  # Now try to locate executable using which
41353  new_path=`$WHICH "$new_path" 2> /dev/null`
41354  # bat and cmd files are not always considered executable in cygwin causing which
41355  # to not find them
41356  if test "x$new_path" = x \
41357      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41358      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41359    new_path=`$CYGPATH -u "$path"`
41360  fi
41361  if test "x$new_path" = x; then
41362    # Oops. Which didn't find the executable.
41363    # The splitting of arguments from the executable at a space might have been incorrect,
41364    # since paths with space are more likely in Windows. Give it another try with the whole
41365    # argument.
41366    path="$complete"
41367    arguments="EOL"
41368    new_path=`$CYGPATH -u "$path"`
41369    new_path=`$WHICH "$new_path" 2> /dev/null`
41370    # bat and cmd files are not always considered executable in cygwin causing which
41371    # to not find them
41372    if test "x$new_path" = x \
41373        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41374        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41375      new_path=`$CYGPATH -u "$path"`
41376    fi
41377    if test "x$new_path" = x; then
41378      # It's still not found. Now this is an unrecoverable error.
41379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41380$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41381      has_space=`$ECHO "$complete" | $GREP " "`
41382      if test "x$has_space" != x; then
41383        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41384$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41385      fi
41386      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41387    fi
41388  fi
41389
41390  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41391  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41392  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41393  # "foo.exe" is OK but "foo" is an error.
41394  #
41395  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41396  # It is also a way to make sure we got the proper file name for the real test later on.
41397  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41398  if test "x$test_shortpath" = x; then
41399    # Short path failed, file does not exist as specified.
41400    # Try adding .exe or .cmd
41401    if test -f "${new_path}.exe"; then
41402      input_to_shortpath="${new_path}.exe"
41403    elif test -f "${new_path}.cmd"; then
41404      input_to_shortpath="${new_path}.cmd"
41405    else
41406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41407$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41408      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41409$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41410      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41411    fi
41412  else
41413    input_to_shortpath="$new_path"
41414  fi
41415
41416  # Call helper function which possibly converts this using DOS-style short mode.
41417  # If so, the updated path is stored in $new_path.
41418  new_path="$input_to_shortpath"
41419
41420  input_path="$input_to_shortpath"
41421  # Check if we need to convert this using DOS-style short mode. If the path
41422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41423  # take no chances and rewrite it.
41424  # Note: m4 eats our [], so we need to use [ and ] instead.
41425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41426  if test "x$has_forbidden_chars" != x; then
41427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41431      # Going to short mode and back again did indeed matter. Since short mode is
41432      # case insensitive, let's make it lowercase to improve readability.
41433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41434      # Now convert it back to Unix-style (cygpath)
41435      input_path=`$CYGPATH -u "$shortmode_path"`
41436      new_path="$input_path"
41437    fi
41438  fi
41439
41440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41441  if test "x$test_cygdrive_prefix" = x; then
41442    # As a simple fix, exclude /usr/bin since it's not a real path.
41443    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41445      # a path prefixed by /cygdrive for fixpath to work.
41446      new_path="$CYGWIN_ROOT_PATH$input_path"
41447    fi
41448  fi
41449
41450  # remove trailing .exe if any
41451  new_path="${new_path/%.exe/}"
41452
41453    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41454
41455  # First separate the path from the arguments. This will split at the first
41456  # space.
41457  complete="$STRIP"
41458  path="${complete%% *}"
41459  tmp="$complete EOL"
41460  arguments="${tmp#* }"
41461
41462  # Input might be given as Windows format, start by converting to
41463  # unix format.
41464  new_path="$path"
41465
41466  windows_path="$new_path"
41467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41468    unix_path=`$CYGPATH -u "$windows_path"`
41469    new_path="$unix_path"
41470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41472    new_path="$unix_path"
41473  fi
41474
41475
41476  # Now try to locate executable using which
41477  new_path=`$WHICH "$new_path" 2> /dev/null`
41478
41479  if test "x$new_path" = x; then
41480    # Oops. Which didn't find the executable.
41481    # The splitting of arguments from the executable at a space might have been incorrect,
41482    # since paths with space are more likely in Windows. Give it another try with the whole
41483    # argument.
41484    path="$complete"
41485    arguments="EOL"
41486    new_path="$path"
41487
41488  windows_path="$new_path"
41489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41490    unix_path=`$CYGPATH -u "$windows_path"`
41491    new_path="$unix_path"
41492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41494    new_path="$unix_path"
41495  fi
41496
41497
41498    new_path=`$WHICH "$new_path" 2> /dev/null`
41499    # bat and cmd files are not always considered executable in MSYS causing which
41500    # to not find them
41501    if test "x$new_path" = x \
41502        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41503        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41504      new_path="$path"
41505
41506  windows_path="$new_path"
41507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41508    unix_path=`$CYGPATH -u "$windows_path"`
41509    new_path="$unix_path"
41510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41512    new_path="$unix_path"
41513  fi
41514
41515    fi
41516
41517    if test "x$new_path" = x; then
41518      # It's still not found. Now this is an unrecoverable error.
41519      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41520$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41521      has_space=`$ECHO "$complete" | $GREP " "`
41522      if test "x$has_space" != x; then
41523        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41524$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41525      fi
41526      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41527    fi
41528  fi
41529
41530  # Now new_path has a complete unix path to the binary
41531  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41532    # Keep paths in /bin as-is, but remove trailing .exe if any
41533    new_path="${new_path/%.exe/}"
41534    # Do not save /bin paths to all_fixpath_prefixes!
41535  else
41536    # Not in mixed or Windows style, start by that.
41537    new_path=`cmd //c echo $new_path`
41538
41539  input_path="$new_path"
41540  # Check if we need to convert this using DOS-style short mode. If the path
41541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41542  # take no chances and rewrite it.
41543  # Note: m4 eats our [], so we need to use [ and ] instead.
41544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41545  if test "x$has_forbidden_chars" != x; then
41546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41548  fi
41549
41550    # Output is in $new_path
41551
41552  windows_path="$new_path"
41553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41554    unix_path=`$CYGPATH -u "$windows_path"`
41555    new_path="$unix_path"
41556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41558    new_path="$unix_path"
41559  fi
41560
41561    # remove trailing .exe if any
41562    new_path="${new_path/%.exe/}"
41563
41564    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41565    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41566  fi
41567
41568    else
41569      # We're on a unix platform. Hooray! :)
41570      # First separate the path from the arguments. This will split at the first
41571      # space.
41572      complete="$STRIP"
41573      path="${complete%% *}"
41574      tmp="$complete EOL"
41575      arguments="${tmp#* }"
41576
41577      # Cannot rely on the command "which" here since it doesn't always work.
41578      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41579      if test -z "$is_absolute_path"; then
41580        # Path to executable is not absolute. Find it.
41581        IFS_save="$IFS"
41582        IFS=:
41583        for p in $PATH; do
41584          if test -f "$p/$path" && test -x "$p/$path"; then
41585            new_path="$p/$path"
41586            break
41587          fi
41588        done
41589        IFS="$IFS_save"
41590      else
41591        # This is an absolute path, we can use it without further modifications.
41592        new_path="$path"
41593      fi
41594
41595      if test "x$new_path" = x; then
41596        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41597$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41598        has_space=`$ECHO "$complete" | $GREP " "`
41599        if test "x$has_space" != x; then
41600          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41601$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41602        fi
41603        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41604      fi
41605    fi
41606
41607    # Now join together the path and the arguments once again
41608    if test "x$arguments" != xEOL; then
41609      new_complete="$new_path ${arguments% *}"
41610    else
41611      new_complete="$new_path"
41612    fi
41613
41614    if test "x$complete" != "x$new_complete"; then
41615      STRIP="$new_complete"
41616      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41617$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41618    fi
41619  fi
41620
41621    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41622
41623
41624  # Publish this variable in the help.
41625
41626
41627  if [ -z "${NM+x}" ]; then
41628    # The variable is not set by user, try to locate tool using the code snippet
41629    if test -n "$ac_tool_prefix"; then
41630  for ac_prog in nm gcc-nm
41631  do
41632    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41633set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41635$as_echo_n "checking for $ac_word... " >&6; }
41636if ${ac_cv_prog_NM+:} false; then :
41637  $as_echo_n "(cached) " >&6
41638else
41639  if test -n "$NM"; then
41640  ac_cv_prog_NM="$NM" # Let the user override the test.
41641else
41642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41643for as_dir in $PATH
41644do
41645  IFS=$as_save_IFS
41646  test -z "$as_dir" && as_dir=.
41647    for ac_exec_ext in '' $ac_executable_extensions; do
41648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41649    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41651    break 2
41652  fi
41653done
41654  done
41655IFS=$as_save_IFS
41656
41657fi
41658fi
41659NM=$ac_cv_prog_NM
41660if test -n "$NM"; then
41661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41662$as_echo "$NM" >&6; }
41663else
41664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41665$as_echo "no" >&6; }
41666fi
41667
41668
41669    test -n "$NM" && break
41670  done
41671fi
41672if test -z "$NM"; then
41673  ac_ct_NM=$NM
41674  for ac_prog in nm gcc-nm
41675do
41676  # Extract the first word of "$ac_prog", so it can be a program name with args.
41677set dummy $ac_prog; ac_word=$2
41678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41679$as_echo_n "checking for $ac_word... " >&6; }
41680if ${ac_cv_prog_ac_ct_NM+:} false; then :
41681  $as_echo_n "(cached) " >&6
41682else
41683  if test -n "$ac_ct_NM"; then
41684  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41685else
41686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41687for as_dir in $PATH
41688do
41689  IFS=$as_save_IFS
41690  test -z "$as_dir" && as_dir=.
41691    for ac_exec_ext in '' $ac_executable_extensions; do
41692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41693    ac_cv_prog_ac_ct_NM="$ac_prog"
41694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41695    break 2
41696  fi
41697done
41698  done
41699IFS=$as_save_IFS
41700
41701fi
41702fi
41703ac_ct_NM=$ac_cv_prog_ac_ct_NM
41704if test -n "$ac_ct_NM"; then
41705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41706$as_echo "$ac_ct_NM" >&6; }
41707else
41708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41709$as_echo "no" >&6; }
41710fi
41711
41712
41713  test -n "$ac_ct_NM" && break
41714done
41715
41716  if test "x$ac_ct_NM" = x; then
41717    NM=""
41718  else
41719    case $cross_compiling:$ac_tool_warned in
41720yes:)
41721{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41722$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41723ac_tool_warned=yes ;;
41724esac
41725    NM=$ac_ct_NM
41726  fi
41727fi
41728
41729  else
41730    # The variable is set, but is it from the command line or the environment?
41731
41732    # Try to remove the string !NM! from our list.
41733    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41734    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41735      # If it failed, the variable was not from the command line. Ignore it,
41736      # but warn the user (except for BASH, which is always set by the calling BASH).
41737      if test "xNM" != xBASH; then
41738        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41739$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41740      fi
41741      # Try to locate tool using the code snippet
41742      if test -n "$ac_tool_prefix"; then
41743  for ac_prog in nm gcc-nm
41744  do
41745    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41746set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41748$as_echo_n "checking for $ac_word... " >&6; }
41749if ${ac_cv_prog_NM+:} false; then :
41750  $as_echo_n "(cached) " >&6
41751else
41752  if test -n "$NM"; then
41753  ac_cv_prog_NM="$NM" # Let the user override the test.
41754else
41755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41756for as_dir in $PATH
41757do
41758  IFS=$as_save_IFS
41759  test -z "$as_dir" && as_dir=.
41760    for ac_exec_ext in '' $ac_executable_extensions; do
41761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41762    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41764    break 2
41765  fi
41766done
41767  done
41768IFS=$as_save_IFS
41769
41770fi
41771fi
41772NM=$ac_cv_prog_NM
41773if test -n "$NM"; then
41774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41775$as_echo "$NM" >&6; }
41776else
41777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41778$as_echo "no" >&6; }
41779fi
41780
41781
41782    test -n "$NM" && break
41783  done
41784fi
41785if test -z "$NM"; then
41786  ac_ct_NM=$NM
41787  for ac_prog in nm gcc-nm
41788do
41789  # Extract the first word of "$ac_prog", so it can be a program name with args.
41790set dummy $ac_prog; ac_word=$2
41791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41792$as_echo_n "checking for $ac_word... " >&6; }
41793if ${ac_cv_prog_ac_ct_NM+:} false; then :
41794  $as_echo_n "(cached) " >&6
41795else
41796  if test -n "$ac_ct_NM"; then
41797  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41798else
41799as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41800for as_dir in $PATH
41801do
41802  IFS=$as_save_IFS
41803  test -z "$as_dir" && as_dir=.
41804    for ac_exec_ext in '' $ac_executable_extensions; do
41805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41806    ac_cv_prog_ac_ct_NM="$ac_prog"
41807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41808    break 2
41809  fi
41810done
41811  done
41812IFS=$as_save_IFS
41813
41814fi
41815fi
41816ac_ct_NM=$ac_cv_prog_ac_ct_NM
41817if test -n "$ac_ct_NM"; then
41818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41819$as_echo "$ac_ct_NM" >&6; }
41820else
41821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41822$as_echo "no" >&6; }
41823fi
41824
41825
41826  test -n "$ac_ct_NM" && break
41827done
41828
41829  if test "x$ac_ct_NM" = x; then
41830    NM=""
41831  else
41832    case $cross_compiling:$ac_tool_warned in
41833yes:)
41834{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41835$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41836ac_tool_warned=yes ;;
41837esac
41838    NM=$ac_ct_NM
41839  fi
41840fi
41841
41842    else
41843      # If it succeeded, then it was overridden by the user. We will use it
41844      # for the tool.
41845
41846      # First remove it from the list of overridden variables, so we can test
41847      # for unknown variables in the end.
41848      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41849
41850      # Check if we try to supply an empty value
41851      if test "x$NM" = x; then
41852        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41853$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41854        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41855$as_echo_n "checking for NM... " >&6; }
41856        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41857$as_echo "disabled" >&6; }
41858      else
41859        # Check if the provided tool contains a complete path.
41860        tool_specified="$NM"
41861        tool_basename="${tool_specified##*/}"
41862        if test "x$tool_basename" = "x$tool_specified"; then
41863          # A command without a complete path is provided, search $PATH.
41864          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41865$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41866          # Extract the first word of "$tool_basename", so it can be a program name with args.
41867set dummy $tool_basename; ac_word=$2
41868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41869$as_echo_n "checking for $ac_word... " >&6; }
41870if ${ac_cv_path_NM+:} false; then :
41871  $as_echo_n "(cached) " >&6
41872else
41873  case $NM in
41874  [\\/]* | ?:[\\/]*)
41875  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41876  ;;
41877  *)
41878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41879for as_dir in $PATH
41880do
41881  IFS=$as_save_IFS
41882  test -z "$as_dir" && as_dir=.
41883    for ac_exec_ext in '' $ac_executable_extensions; do
41884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41885    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41887    break 2
41888  fi
41889done
41890  done
41891IFS=$as_save_IFS
41892
41893  ;;
41894esac
41895fi
41896NM=$ac_cv_path_NM
41897if test -n "$NM"; then
41898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41899$as_echo "$NM" >&6; }
41900else
41901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41902$as_echo "no" >&6; }
41903fi
41904
41905
41906          if test "x$NM" = x; then
41907            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41908          fi
41909        else
41910          # Otherwise we believe it is a complete path. Use it as it is.
41911          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41912$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41913          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41914$as_echo_n "checking for NM... " >&6; }
41915          if test ! -x "$tool_specified"; then
41916            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41917$as_echo "not found" >&6; }
41918            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41919          fi
41920          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41921$as_echo "$tool_specified" >&6; }
41922        fi
41923      fi
41924    fi
41925
41926  fi
41927
41928
41929    else
41930
41931
41932  # Publish this variable in the help.
41933
41934
41935  if [ -z "${NM+x}" ]; then
41936    # The variable is not set by user, try to locate tool using the code snippet
41937    if test -n "$ac_tool_prefix"; then
41938  for ac_prog in nm
41939  do
41940    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41941set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41943$as_echo_n "checking for $ac_word... " >&6; }
41944if ${ac_cv_prog_NM+:} false; then :
41945  $as_echo_n "(cached) " >&6
41946else
41947  if test -n "$NM"; then
41948  ac_cv_prog_NM="$NM" # Let the user override the test.
41949else
41950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41951for as_dir in $PATH
41952do
41953  IFS=$as_save_IFS
41954  test -z "$as_dir" && as_dir=.
41955    for ac_exec_ext in '' $ac_executable_extensions; do
41956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41957    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41959    break 2
41960  fi
41961done
41962  done
41963IFS=$as_save_IFS
41964
41965fi
41966fi
41967NM=$ac_cv_prog_NM
41968if test -n "$NM"; then
41969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41970$as_echo "$NM" >&6; }
41971else
41972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41973$as_echo "no" >&6; }
41974fi
41975
41976
41977    test -n "$NM" && break
41978  done
41979fi
41980if test -z "$NM"; then
41981  ac_ct_NM=$NM
41982  for ac_prog in nm
41983do
41984  # Extract the first word of "$ac_prog", so it can be a program name with args.
41985set dummy $ac_prog; ac_word=$2
41986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41987$as_echo_n "checking for $ac_word... " >&6; }
41988if ${ac_cv_prog_ac_ct_NM+:} false; then :
41989  $as_echo_n "(cached) " >&6
41990else
41991  if test -n "$ac_ct_NM"; then
41992  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41993else
41994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41995for as_dir in $PATH
41996do
41997  IFS=$as_save_IFS
41998  test -z "$as_dir" && as_dir=.
41999    for ac_exec_ext in '' $ac_executable_extensions; do
42000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42001    ac_cv_prog_ac_ct_NM="$ac_prog"
42002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42003    break 2
42004  fi
42005done
42006  done
42007IFS=$as_save_IFS
42008
42009fi
42010fi
42011ac_ct_NM=$ac_cv_prog_ac_ct_NM
42012if test -n "$ac_ct_NM"; then
42013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42014$as_echo "$ac_ct_NM" >&6; }
42015else
42016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42017$as_echo "no" >&6; }
42018fi
42019
42020
42021  test -n "$ac_ct_NM" && break
42022done
42023
42024  if test "x$ac_ct_NM" = x; then
42025    NM=""
42026  else
42027    case $cross_compiling:$ac_tool_warned in
42028yes:)
42029{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42030$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42031ac_tool_warned=yes ;;
42032esac
42033    NM=$ac_ct_NM
42034  fi
42035fi
42036
42037  else
42038    # The variable is set, but is it from the command line or the environment?
42039
42040    # Try to remove the string !NM! from our list.
42041    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42042    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42043      # If it failed, the variable was not from the command line. Ignore it,
42044      # but warn the user (except for BASH, which is always set by the calling BASH).
42045      if test "xNM" != xBASH; then
42046        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42047$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42048      fi
42049      # Try to locate tool using the code snippet
42050      if test -n "$ac_tool_prefix"; then
42051  for ac_prog in nm
42052  do
42053    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42054set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42056$as_echo_n "checking for $ac_word... " >&6; }
42057if ${ac_cv_prog_NM+:} false; then :
42058  $as_echo_n "(cached) " >&6
42059else
42060  if test -n "$NM"; then
42061  ac_cv_prog_NM="$NM" # Let the user override the test.
42062else
42063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42064for as_dir in $PATH
42065do
42066  IFS=$as_save_IFS
42067  test -z "$as_dir" && as_dir=.
42068    for ac_exec_ext in '' $ac_executable_extensions; do
42069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42070    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42072    break 2
42073  fi
42074done
42075  done
42076IFS=$as_save_IFS
42077
42078fi
42079fi
42080NM=$ac_cv_prog_NM
42081if test -n "$NM"; then
42082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42083$as_echo "$NM" >&6; }
42084else
42085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42086$as_echo "no" >&6; }
42087fi
42088
42089
42090    test -n "$NM" && break
42091  done
42092fi
42093if test -z "$NM"; then
42094  ac_ct_NM=$NM
42095  for ac_prog in nm
42096do
42097  # Extract the first word of "$ac_prog", so it can be a program name with args.
42098set dummy $ac_prog; ac_word=$2
42099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42100$as_echo_n "checking for $ac_word... " >&6; }
42101if ${ac_cv_prog_ac_ct_NM+:} false; then :
42102  $as_echo_n "(cached) " >&6
42103else
42104  if test -n "$ac_ct_NM"; then
42105  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42106else
42107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42108for as_dir in $PATH
42109do
42110  IFS=$as_save_IFS
42111  test -z "$as_dir" && as_dir=.
42112    for ac_exec_ext in '' $ac_executable_extensions; do
42113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42114    ac_cv_prog_ac_ct_NM="$ac_prog"
42115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42116    break 2
42117  fi
42118done
42119  done
42120IFS=$as_save_IFS
42121
42122fi
42123fi
42124ac_ct_NM=$ac_cv_prog_ac_ct_NM
42125if test -n "$ac_ct_NM"; then
42126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42127$as_echo "$ac_ct_NM" >&6; }
42128else
42129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42130$as_echo "no" >&6; }
42131fi
42132
42133
42134  test -n "$ac_ct_NM" && break
42135done
42136
42137  if test "x$ac_ct_NM" = x; then
42138    NM=""
42139  else
42140    case $cross_compiling:$ac_tool_warned in
42141yes:)
42142{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42143$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42144ac_tool_warned=yes ;;
42145esac
42146    NM=$ac_ct_NM
42147  fi
42148fi
42149
42150    else
42151      # If it succeeded, then it was overridden by the user. We will use it
42152      # for the tool.
42153
42154      # First remove it from the list of overridden variables, so we can test
42155      # for unknown variables in the end.
42156      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42157
42158      # Check if we try to supply an empty value
42159      if test "x$NM" = x; then
42160        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42161$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42162        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42163$as_echo_n "checking for NM... " >&6; }
42164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42165$as_echo "disabled" >&6; }
42166      else
42167        # Check if the provided tool contains a complete path.
42168        tool_specified="$NM"
42169        tool_basename="${tool_specified##*/}"
42170        if test "x$tool_basename" = "x$tool_specified"; then
42171          # A command without a complete path is provided, search $PATH.
42172          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42173$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42174          # Extract the first word of "$tool_basename", so it can be a program name with args.
42175set dummy $tool_basename; ac_word=$2
42176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42177$as_echo_n "checking for $ac_word... " >&6; }
42178if ${ac_cv_path_NM+:} false; then :
42179  $as_echo_n "(cached) " >&6
42180else
42181  case $NM in
42182  [\\/]* | ?:[\\/]*)
42183  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42184  ;;
42185  *)
42186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42187for as_dir in $PATH
42188do
42189  IFS=$as_save_IFS
42190  test -z "$as_dir" && as_dir=.
42191    for ac_exec_ext in '' $ac_executable_extensions; do
42192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42193    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42195    break 2
42196  fi
42197done
42198  done
42199IFS=$as_save_IFS
42200
42201  ;;
42202esac
42203fi
42204NM=$ac_cv_path_NM
42205if test -n "$NM"; then
42206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42207$as_echo "$NM" >&6; }
42208else
42209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42210$as_echo "no" >&6; }
42211fi
42212
42213
42214          if test "x$NM" = x; then
42215            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42216          fi
42217        else
42218          # Otherwise we believe it is a complete path. Use it as it is.
42219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42220$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42221          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42222$as_echo_n "checking for NM... " >&6; }
42223          if test ! -x "$tool_specified"; then
42224            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42225$as_echo "not found" >&6; }
42226            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42227          fi
42228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42229$as_echo "$tool_specified" >&6; }
42230        fi
42231      fi
42232    fi
42233
42234  fi
42235
42236
42237    fi
42238
42239  # Only process if variable expands to non-empty
42240
42241  if test "x$NM" != x; then
42242    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42243
42244  # First separate the path from the arguments. This will split at the first
42245  # space.
42246  complete="$NM"
42247  path="${complete%% *}"
42248  tmp="$complete EOL"
42249  arguments="${tmp#* }"
42250
42251  # Input might be given as Windows format, start by converting to
42252  # unix format.
42253  new_path=`$CYGPATH -u "$path"`
42254
42255  # Now try to locate executable using which
42256  new_path=`$WHICH "$new_path" 2> /dev/null`
42257  # bat and cmd files are not always considered executable in cygwin causing which
42258  # to not find them
42259  if test "x$new_path" = x \
42260      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42261      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42262    new_path=`$CYGPATH -u "$path"`
42263  fi
42264  if test "x$new_path" = x; then
42265    # Oops. Which didn't find the executable.
42266    # The splitting of arguments from the executable at a space might have been incorrect,
42267    # since paths with space are more likely in Windows. Give it another try with the whole
42268    # argument.
42269    path="$complete"
42270    arguments="EOL"
42271    new_path=`$CYGPATH -u "$path"`
42272    new_path=`$WHICH "$new_path" 2> /dev/null`
42273    # bat and cmd files are not always considered executable in cygwin causing which
42274    # to not find them
42275    if test "x$new_path" = x \
42276        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42277        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42278      new_path=`$CYGPATH -u "$path"`
42279    fi
42280    if test "x$new_path" = x; then
42281      # It's still not found. Now this is an unrecoverable error.
42282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42283$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42284      has_space=`$ECHO "$complete" | $GREP " "`
42285      if test "x$has_space" != x; then
42286        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42287$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42288      fi
42289      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42290    fi
42291  fi
42292
42293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42296  # "foo.exe" is OK but "foo" is an error.
42297  #
42298  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42299  # It is also a way to make sure we got the proper file name for the real test later on.
42300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42301  if test "x$test_shortpath" = x; then
42302    # Short path failed, file does not exist as specified.
42303    # Try adding .exe or .cmd
42304    if test -f "${new_path}.exe"; then
42305      input_to_shortpath="${new_path}.exe"
42306    elif test -f "${new_path}.cmd"; then
42307      input_to_shortpath="${new_path}.cmd"
42308    else
42309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42310$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42311      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42312$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42313      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42314    fi
42315  else
42316    input_to_shortpath="$new_path"
42317  fi
42318
42319  # Call helper function which possibly converts this using DOS-style short mode.
42320  # If so, the updated path is stored in $new_path.
42321  new_path="$input_to_shortpath"
42322
42323  input_path="$input_to_shortpath"
42324  # Check if we need to convert this using DOS-style short mode. If the path
42325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42326  # take no chances and rewrite it.
42327  # Note: m4 eats our [], so we need to use [ and ] instead.
42328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42329  if test "x$has_forbidden_chars" != x; then
42330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42334      # Going to short mode and back again did indeed matter. Since short mode is
42335      # case insensitive, let's make it lowercase to improve readability.
42336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42337      # Now convert it back to Unix-style (cygpath)
42338      input_path=`$CYGPATH -u "$shortmode_path"`
42339      new_path="$input_path"
42340    fi
42341  fi
42342
42343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42344  if test "x$test_cygdrive_prefix" = x; then
42345    # As a simple fix, exclude /usr/bin since it's not a real path.
42346    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42348      # a path prefixed by /cygdrive for fixpath to work.
42349      new_path="$CYGWIN_ROOT_PATH$input_path"
42350    fi
42351  fi
42352
42353  # remove trailing .exe if any
42354  new_path="${new_path/%.exe/}"
42355
42356    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42357
42358  # First separate the path from the arguments. This will split at the first
42359  # space.
42360  complete="$NM"
42361  path="${complete%% *}"
42362  tmp="$complete EOL"
42363  arguments="${tmp#* }"
42364
42365  # Input might be given as Windows format, start by converting to
42366  # unix format.
42367  new_path="$path"
42368
42369  windows_path="$new_path"
42370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42371    unix_path=`$CYGPATH -u "$windows_path"`
42372    new_path="$unix_path"
42373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42375    new_path="$unix_path"
42376  fi
42377
42378
42379  # Now try to locate executable using which
42380  new_path=`$WHICH "$new_path" 2> /dev/null`
42381
42382  if test "x$new_path" = x; then
42383    # Oops. Which didn't find the executable.
42384    # The splitting of arguments from the executable at a space might have been incorrect,
42385    # since paths with space are more likely in Windows. Give it another try with the whole
42386    # argument.
42387    path="$complete"
42388    arguments="EOL"
42389    new_path="$path"
42390
42391  windows_path="$new_path"
42392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42393    unix_path=`$CYGPATH -u "$windows_path"`
42394    new_path="$unix_path"
42395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42397    new_path="$unix_path"
42398  fi
42399
42400
42401    new_path=`$WHICH "$new_path" 2> /dev/null`
42402    # bat and cmd files are not always considered executable in MSYS causing which
42403    # to not find them
42404    if test "x$new_path" = x \
42405        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42406        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42407      new_path="$path"
42408
42409  windows_path="$new_path"
42410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42411    unix_path=`$CYGPATH -u "$windows_path"`
42412    new_path="$unix_path"
42413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42415    new_path="$unix_path"
42416  fi
42417
42418    fi
42419
42420    if test "x$new_path" = x; then
42421      # It's still not found. Now this is an unrecoverable error.
42422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42423$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42424      has_space=`$ECHO "$complete" | $GREP " "`
42425      if test "x$has_space" != x; then
42426        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42427$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42428      fi
42429      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42430    fi
42431  fi
42432
42433  # Now new_path has a complete unix path to the binary
42434  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42435    # Keep paths in /bin as-is, but remove trailing .exe if any
42436    new_path="${new_path/%.exe/}"
42437    # Do not save /bin paths to all_fixpath_prefixes!
42438  else
42439    # Not in mixed or Windows style, start by that.
42440    new_path=`cmd //c echo $new_path`
42441
42442  input_path="$new_path"
42443  # Check if we need to convert this using DOS-style short mode. If the path
42444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42445  # take no chances and rewrite it.
42446  # Note: m4 eats our [], so we need to use [ and ] instead.
42447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42448  if test "x$has_forbidden_chars" != x; then
42449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42451  fi
42452
42453    # Output is in $new_path
42454
42455  windows_path="$new_path"
42456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42457    unix_path=`$CYGPATH -u "$windows_path"`
42458    new_path="$unix_path"
42459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42461    new_path="$unix_path"
42462  fi
42463
42464    # remove trailing .exe if any
42465    new_path="${new_path/%.exe/}"
42466
42467    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42468    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42469  fi
42470
42471    else
42472      # We're on a unix platform. Hooray! :)
42473      # First separate the path from the arguments. This will split at the first
42474      # space.
42475      complete="$NM"
42476      path="${complete%% *}"
42477      tmp="$complete EOL"
42478      arguments="${tmp#* }"
42479
42480      # Cannot rely on the command "which" here since it doesn't always work.
42481      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42482      if test -z "$is_absolute_path"; then
42483        # Path to executable is not absolute. Find it.
42484        IFS_save="$IFS"
42485        IFS=:
42486        for p in $PATH; do
42487          if test -f "$p/$path" && test -x "$p/$path"; then
42488            new_path="$p/$path"
42489            break
42490          fi
42491        done
42492        IFS="$IFS_save"
42493      else
42494        # This is an absolute path, we can use it without further modifications.
42495        new_path="$path"
42496      fi
42497
42498      if test "x$new_path" = x; then
42499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42500$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42501        has_space=`$ECHO "$complete" | $GREP " "`
42502        if test "x$has_space" != x; then
42503          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42504$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42505        fi
42506        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42507      fi
42508    fi
42509
42510    # Now join together the path and the arguments once again
42511    if test "x$arguments" != xEOL; then
42512      new_complete="$new_path ${arguments% *}"
42513    else
42514      new_complete="$new_path"
42515    fi
42516
42517    if test "x$complete" != "x$new_complete"; then
42518      NM="$new_complete"
42519      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42520$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42521    fi
42522  fi
42523
42524    GNM="$NM"
42525
42526  fi
42527
42528  # objcopy is used for moving debug symbols to separate files when
42529  # full debug symbols are enabled.
42530  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42531
42532
42533  # Publish this variable in the help.
42534
42535
42536  if [ -z "${OBJCOPY+x}" ]; then
42537    # The variable is not set by user, try to locate tool using the code snippet
42538    if test -n "$ac_tool_prefix"; then
42539  for ac_prog in gobjcopy objcopy
42540  do
42541    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42542set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42544$as_echo_n "checking for $ac_word... " >&6; }
42545if ${ac_cv_prog_OBJCOPY+:} false; then :
42546  $as_echo_n "(cached) " >&6
42547else
42548  if test -n "$OBJCOPY"; then
42549  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42550else
42551as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42552for as_dir in $PATH
42553do
42554  IFS=$as_save_IFS
42555  test -z "$as_dir" && as_dir=.
42556    for ac_exec_ext in '' $ac_executable_extensions; do
42557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42558    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42560    break 2
42561  fi
42562done
42563  done
42564IFS=$as_save_IFS
42565
42566fi
42567fi
42568OBJCOPY=$ac_cv_prog_OBJCOPY
42569if test -n "$OBJCOPY"; then
42570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42571$as_echo "$OBJCOPY" >&6; }
42572else
42573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42574$as_echo "no" >&6; }
42575fi
42576
42577
42578    test -n "$OBJCOPY" && break
42579  done
42580fi
42581if test -z "$OBJCOPY"; then
42582  ac_ct_OBJCOPY=$OBJCOPY
42583  for ac_prog in gobjcopy objcopy
42584do
42585  # Extract the first word of "$ac_prog", so it can be a program name with args.
42586set dummy $ac_prog; ac_word=$2
42587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42588$as_echo_n "checking for $ac_word... " >&6; }
42589if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42590  $as_echo_n "(cached) " >&6
42591else
42592  if test -n "$ac_ct_OBJCOPY"; then
42593  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42594else
42595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42596for as_dir in $PATH
42597do
42598  IFS=$as_save_IFS
42599  test -z "$as_dir" && as_dir=.
42600    for ac_exec_ext in '' $ac_executable_extensions; do
42601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42602    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42604    break 2
42605  fi
42606done
42607  done
42608IFS=$as_save_IFS
42609
42610fi
42611fi
42612ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42613if test -n "$ac_ct_OBJCOPY"; then
42614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42615$as_echo "$ac_ct_OBJCOPY" >&6; }
42616else
42617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42618$as_echo "no" >&6; }
42619fi
42620
42621
42622  test -n "$ac_ct_OBJCOPY" && break
42623done
42624
42625  if test "x$ac_ct_OBJCOPY" = x; then
42626    OBJCOPY=""
42627  else
42628    case $cross_compiling:$ac_tool_warned in
42629yes:)
42630{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42631$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42632ac_tool_warned=yes ;;
42633esac
42634    OBJCOPY=$ac_ct_OBJCOPY
42635  fi
42636fi
42637
42638  else
42639    # The variable is set, but is it from the command line or the environment?
42640
42641    # Try to remove the string !OBJCOPY! from our list.
42642    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42643    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42644      # If it failed, the variable was not from the command line. Ignore it,
42645      # but warn the user (except for BASH, which is always set by the calling BASH).
42646      if test "xOBJCOPY" != xBASH; then
42647        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42648$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42649      fi
42650      # Try to locate tool using the code snippet
42651      if test -n "$ac_tool_prefix"; then
42652  for ac_prog in gobjcopy objcopy
42653  do
42654    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42655set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42657$as_echo_n "checking for $ac_word... " >&6; }
42658if ${ac_cv_prog_OBJCOPY+:} false; then :
42659  $as_echo_n "(cached) " >&6
42660else
42661  if test -n "$OBJCOPY"; then
42662  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42663else
42664as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42665for as_dir in $PATH
42666do
42667  IFS=$as_save_IFS
42668  test -z "$as_dir" && as_dir=.
42669    for ac_exec_ext in '' $ac_executable_extensions; do
42670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42671    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42673    break 2
42674  fi
42675done
42676  done
42677IFS=$as_save_IFS
42678
42679fi
42680fi
42681OBJCOPY=$ac_cv_prog_OBJCOPY
42682if test -n "$OBJCOPY"; then
42683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42684$as_echo "$OBJCOPY" >&6; }
42685else
42686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42687$as_echo "no" >&6; }
42688fi
42689
42690
42691    test -n "$OBJCOPY" && break
42692  done
42693fi
42694if test -z "$OBJCOPY"; then
42695  ac_ct_OBJCOPY=$OBJCOPY
42696  for ac_prog in gobjcopy objcopy
42697do
42698  # Extract the first word of "$ac_prog", so it can be a program name with args.
42699set dummy $ac_prog; ac_word=$2
42700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42701$as_echo_n "checking for $ac_word... " >&6; }
42702if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42703  $as_echo_n "(cached) " >&6
42704else
42705  if test -n "$ac_ct_OBJCOPY"; then
42706  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42707else
42708as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42709for as_dir in $PATH
42710do
42711  IFS=$as_save_IFS
42712  test -z "$as_dir" && as_dir=.
42713    for ac_exec_ext in '' $ac_executable_extensions; do
42714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42715    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42717    break 2
42718  fi
42719done
42720  done
42721IFS=$as_save_IFS
42722
42723fi
42724fi
42725ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42726if test -n "$ac_ct_OBJCOPY"; then
42727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42728$as_echo "$ac_ct_OBJCOPY" >&6; }
42729else
42730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42731$as_echo "no" >&6; }
42732fi
42733
42734
42735  test -n "$ac_ct_OBJCOPY" && break
42736done
42737
42738  if test "x$ac_ct_OBJCOPY" = x; then
42739    OBJCOPY=""
42740  else
42741    case $cross_compiling:$ac_tool_warned in
42742yes:)
42743{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42744$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42745ac_tool_warned=yes ;;
42746esac
42747    OBJCOPY=$ac_ct_OBJCOPY
42748  fi
42749fi
42750
42751    else
42752      # If it succeeded, then it was overridden by the user. We will use it
42753      # for the tool.
42754
42755      # First remove it from the list of overridden variables, so we can test
42756      # for unknown variables in the end.
42757      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42758
42759      # Check if we try to supply an empty value
42760      if test "x$OBJCOPY" = x; then
42761        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42762$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42763        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42764$as_echo_n "checking for OBJCOPY... " >&6; }
42765        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42766$as_echo "disabled" >&6; }
42767      else
42768        # Check if the provided tool contains a complete path.
42769        tool_specified="$OBJCOPY"
42770        tool_basename="${tool_specified##*/}"
42771        if test "x$tool_basename" = "x$tool_specified"; then
42772          # A command without a complete path is provided, search $PATH.
42773          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42774$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42775          # Extract the first word of "$tool_basename", so it can be a program name with args.
42776set dummy $tool_basename; ac_word=$2
42777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42778$as_echo_n "checking for $ac_word... " >&6; }
42779if ${ac_cv_path_OBJCOPY+:} false; then :
42780  $as_echo_n "(cached) " >&6
42781else
42782  case $OBJCOPY in
42783  [\\/]* | ?:[\\/]*)
42784  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42785  ;;
42786  *)
42787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42788for as_dir in $PATH
42789do
42790  IFS=$as_save_IFS
42791  test -z "$as_dir" && as_dir=.
42792    for ac_exec_ext in '' $ac_executable_extensions; do
42793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42794    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42796    break 2
42797  fi
42798done
42799  done
42800IFS=$as_save_IFS
42801
42802  ;;
42803esac
42804fi
42805OBJCOPY=$ac_cv_path_OBJCOPY
42806if test -n "$OBJCOPY"; then
42807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42808$as_echo "$OBJCOPY" >&6; }
42809else
42810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42811$as_echo "no" >&6; }
42812fi
42813
42814
42815          if test "x$OBJCOPY" = x; then
42816            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42817          fi
42818        else
42819          # Otherwise we believe it is a complete path. Use it as it is.
42820          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42821$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42822          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42823$as_echo_n "checking for OBJCOPY... " >&6; }
42824          if test ! -x "$tool_specified"; then
42825            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42826$as_echo "not found" >&6; }
42827            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42828          fi
42829          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42830$as_echo "$tool_specified" >&6; }
42831        fi
42832      fi
42833    fi
42834
42835  fi
42836
42837
42838    # Only call fixup if objcopy was found.
42839    if test -n "$OBJCOPY"; then
42840
42841  # Only process if variable expands to non-empty
42842
42843  if test "x$OBJCOPY" != x; then
42844    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42845
42846  # First separate the path from the arguments. This will split at the first
42847  # space.
42848  complete="$OBJCOPY"
42849  path="${complete%% *}"
42850  tmp="$complete EOL"
42851  arguments="${tmp#* }"
42852
42853  # Input might be given as Windows format, start by converting to
42854  # unix format.
42855  new_path=`$CYGPATH -u "$path"`
42856
42857  # Now try to locate executable using which
42858  new_path=`$WHICH "$new_path" 2> /dev/null`
42859  # bat and cmd files are not always considered executable in cygwin causing which
42860  # to not find them
42861  if test "x$new_path" = x \
42862      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42863      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42864    new_path=`$CYGPATH -u "$path"`
42865  fi
42866  if test "x$new_path" = x; then
42867    # Oops. Which didn't find the executable.
42868    # The splitting of arguments from the executable at a space might have been incorrect,
42869    # since paths with space are more likely in Windows. Give it another try with the whole
42870    # argument.
42871    path="$complete"
42872    arguments="EOL"
42873    new_path=`$CYGPATH -u "$path"`
42874    new_path=`$WHICH "$new_path" 2> /dev/null`
42875    # bat and cmd files are not always considered executable in cygwin causing which
42876    # to not find them
42877    if test "x$new_path" = x \
42878        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42879        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42880      new_path=`$CYGPATH -u "$path"`
42881    fi
42882    if test "x$new_path" = x; then
42883      # It's still not found. Now this is an unrecoverable error.
42884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42885$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42886      has_space=`$ECHO "$complete" | $GREP " "`
42887      if test "x$has_space" != x; then
42888        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42889$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42890      fi
42891      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42892    fi
42893  fi
42894
42895  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42896  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42897  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42898  # "foo.exe" is OK but "foo" is an error.
42899  #
42900  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42901  # It is also a way to make sure we got the proper file name for the real test later on.
42902  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42903  if test "x$test_shortpath" = x; then
42904    # Short path failed, file does not exist as specified.
42905    # Try adding .exe or .cmd
42906    if test -f "${new_path}.exe"; then
42907      input_to_shortpath="${new_path}.exe"
42908    elif test -f "${new_path}.cmd"; then
42909      input_to_shortpath="${new_path}.cmd"
42910    else
42911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42912$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42913      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42914$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42915      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42916    fi
42917  else
42918    input_to_shortpath="$new_path"
42919  fi
42920
42921  # Call helper function which possibly converts this using DOS-style short mode.
42922  # If so, the updated path is stored in $new_path.
42923  new_path="$input_to_shortpath"
42924
42925  input_path="$input_to_shortpath"
42926  # Check if we need to convert this using DOS-style short mode. If the path
42927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42928  # take no chances and rewrite it.
42929  # Note: m4 eats our [], so we need to use [ and ] instead.
42930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42931  if test "x$has_forbidden_chars" != x; then
42932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42933    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42934    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42935    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42936      # Going to short mode and back again did indeed matter. Since short mode is
42937      # case insensitive, let's make it lowercase to improve readability.
42938      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42939      # Now convert it back to Unix-style (cygpath)
42940      input_path=`$CYGPATH -u "$shortmode_path"`
42941      new_path="$input_path"
42942    fi
42943  fi
42944
42945  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42946  if test "x$test_cygdrive_prefix" = x; then
42947    # As a simple fix, exclude /usr/bin since it's not a real path.
42948    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42949      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42950      # a path prefixed by /cygdrive for fixpath to work.
42951      new_path="$CYGWIN_ROOT_PATH$input_path"
42952    fi
42953  fi
42954
42955  # remove trailing .exe if any
42956  new_path="${new_path/%.exe/}"
42957
42958    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42959
42960  # First separate the path from the arguments. This will split at the first
42961  # space.
42962  complete="$OBJCOPY"
42963  path="${complete%% *}"
42964  tmp="$complete EOL"
42965  arguments="${tmp#* }"
42966
42967  # Input might be given as Windows format, start by converting to
42968  # unix format.
42969  new_path="$path"
42970
42971  windows_path="$new_path"
42972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42973    unix_path=`$CYGPATH -u "$windows_path"`
42974    new_path="$unix_path"
42975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42977    new_path="$unix_path"
42978  fi
42979
42980
42981  # Now try to locate executable using which
42982  new_path=`$WHICH "$new_path" 2> /dev/null`
42983
42984  if test "x$new_path" = x; then
42985    # Oops. Which didn't find the executable.
42986    # The splitting of arguments from the executable at a space might have been incorrect,
42987    # since paths with space are more likely in Windows. Give it another try with the whole
42988    # argument.
42989    path="$complete"
42990    arguments="EOL"
42991    new_path="$path"
42992
42993  windows_path="$new_path"
42994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42995    unix_path=`$CYGPATH -u "$windows_path"`
42996    new_path="$unix_path"
42997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42999    new_path="$unix_path"
43000  fi
43001
43002
43003    new_path=`$WHICH "$new_path" 2> /dev/null`
43004    # bat and cmd files are not always considered executable in MSYS causing which
43005    # to not find them
43006    if test "x$new_path" = x \
43007        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43008        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43009      new_path="$path"
43010
43011  windows_path="$new_path"
43012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43013    unix_path=`$CYGPATH -u "$windows_path"`
43014    new_path="$unix_path"
43015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43017    new_path="$unix_path"
43018  fi
43019
43020    fi
43021
43022    if test "x$new_path" = x; then
43023      # It's still not found. Now this is an unrecoverable error.
43024      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43025$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43026      has_space=`$ECHO "$complete" | $GREP " "`
43027      if test "x$has_space" != x; then
43028        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43029$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43030      fi
43031      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43032    fi
43033  fi
43034
43035  # Now new_path has a complete unix path to the binary
43036  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43037    # Keep paths in /bin as-is, but remove trailing .exe if any
43038    new_path="${new_path/%.exe/}"
43039    # Do not save /bin paths to all_fixpath_prefixes!
43040  else
43041    # Not in mixed or Windows style, start by that.
43042    new_path=`cmd //c echo $new_path`
43043
43044  input_path="$new_path"
43045  # Check if we need to convert this using DOS-style short mode. If the path
43046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43047  # take no chances and rewrite it.
43048  # Note: m4 eats our [], so we need to use [ and ] instead.
43049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43050  if test "x$has_forbidden_chars" != x; then
43051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43052    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43053  fi
43054
43055    # Output is in $new_path
43056
43057  windows_path="$new_path"
43058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43059    unix_path=`$CYGPATH -u "$windows_path"`
43060    new_path="$unix_path"
43061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43063    new_path="$unix_path"
43064  fi
43065
43066    # remove trailing .exe if any
43067    new_path="${new_path/%.exe/}"
43068
43069    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43070    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43071  fi
43072
43073    else
43074      # We're on a unix platform. Hooray! :)
43075      # First separate the path from the arguments. This will split at the first
43076      # space.
43077      complete="$OBJCOPY"
43078      path="${complete%% *}"
43079      tmp="$complete EOL"
43080      arguments="${tmp#* }"
43081
43082      # Cannot rely on the command "which" here since it doesn't always work.
43083      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43084      if test -z "$is_absolute_path"; then
43085        # Path to executable is not absolute. Find it.
43086        IFS_save="$IFS"
43087        IFS=:
43088        for p in $PATH; do
43089          if test -f "$p/$path" && test -x "$p/$path"; then
43090            new_path="$p/$path"
43091            break
43092          fi
43093        done
43094        IFS="$IFS_save"
43095      else
43096        # This is an absolute path, we can use it without further modifications.
43097        new_path="$path"
43098      fi
43099
43100      if test "x$new_path" = x; then
43101        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43102$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43103        has_space=`$ECHO "$complete" | $GREP " "`
43104        if test "x$has_space" != x; then
43105          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43106$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43107        fi
43108        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43109      fi
43110    fi
43111
43112    # Now join together the path and the arguments once again
43113    if test "x$arguments" != xEOL; then
43114      new_complete="$new_path ${arguments% *}"
43115    else
43116      new_complete="$new_path"
43117    fi
43118
43119    if test "x$complete" != "x$new_complete"; then
43120      OBJCOPY="$new_complete"
43121      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43122$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43123    fi
43124  fi
43125
43126      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43127        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43128        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43129        # - version number is last blank separate word on first line
43130        # - version number formats that have been seen:
43131        #   - <major>.<minor>
43132        #   - <major>.<minor>.<micro>
43133        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43134        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43135         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43136              -e 's/.* //' \
43137              -e '/^[01]\./b bad' \
43138              -e '/^2\./{' \
43139              -e '  s/^2\.//' \
43140              -e '  /^[0-9]$/b bad' \
43141              -e '  /^[0-9]\./b bad' \
43142              -e '  /^1[0-9]$/b bad' \
43143              -e '  /^1[0-9]\./b bad' \
43144              -e '  /^20\./b bad' \
43145              -e '  /^21\.0$/b bad' \
43146              -e '  /^21\.0\./b bad' \
43147              -e '}' \
43148              -e ':good' \
43149              -e 's/.*/VALID_VERSION/p' \
43150              -e 'q' \
43151              -e ':bad' \
43152              -e 's/.*/BAD_VERSION/p' \
43153              -e 'q'`
43154        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43155          OBJCOPY=
43156          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&5
43157$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43158          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43159$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43160          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43161$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43162          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43163$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43164          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43165$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43166        fi
43167      fi
43168    fi
43169  fi
43170
43171
43172
43173  # Publish this variable in the help.
43174
43175
43176  if [ -z "${OBJDUMP+x}" ]; then
43177    # The variable is not set by user, try to locate tool using the code snippet
43178    if test -n "$ac_tool_prefix"; then
43179  for ac_prog in gobjdump objdump
43180  do
43181    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43182set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43184$as_echo_n "checking for $ac_word... " >&6; }
43185if ${ac_cv_prog_OBJDUMP+:} false; then :
43186  $as_echo_n "(cached) " >&6
43187else
43188  if test -n "$OBJDUMP"; then
43189  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43190else
43191as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43192for as_dir in $PATH
43193do
43194  IFS=$as_save_IFS
43195  test -z "$as_dir" && as_dir=.
43196    for ac_exec_ext in '' $ac_executable_extensions; do
43197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43198    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43200    break 2
43201  fi
43202done
43203  done
43204IFS=$as_save_IFS
43205
43206fi
43207fi
43208OBJDUMP=$ac_cv_prog_OBJDUMP
43209if test -n "$OBJDUMP"; then
43210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43211$as_echo "$OBJDUMP" >&6; }
43212else
43213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43214$as_echo "no" >&6; }
43215fi
43216
43217
43218    test -n "$OBJDUMP" && break
43219  done
43220fi
43221if test -z "$OBJDUMP"; then
43222  ac_ct_OBJDUMP=$OBJDUMP
43223  for ac_prog in gobjdump objdump
43224do
43225  # Extract the first word of "$ac_prog", so it can be a program name with args.
43226set dummy $ac_prog; ac_word=$2
43227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43228$as_echo_n "checking for $ac_word... " >&6; }
43229if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43230  $as_echo_n "(cached) " >&6
43231else
43232  if test -n "$ac_ct_OBJDUMP"; then
43233  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43234else
43235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43236for as_dir in $PATH
43237do
43238  IFS=$as_save_IFS
43239  test -z "$as_dir" && as_dir=.
43240    for ac_exec_ext in '' $ac_executable_extensions; do
43241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43242    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43244    break 2
43245  fi
43246done
43247  done
43248IFS=$as_save_IFS
43249
43250fi
43251fi
43252ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43253if test -n "$ac_ct_OBJDUMP"; then
43254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43255$as_echo "$ac_ct_OBJDUMP" >&6; }
43256else
43257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43258$as_echo "no" >&6; }
43259fi
43260
43261
43262  test -n "$ac_ct_OBJDUMP" && break
43263done
43264
43265  if test "x$ac_ct_OBJDUMP" = x; then
43266    OBJDUMP=""
43267  else
43268    case $cross_compiling:$ac_tool_warned in
43269yes:)
43270{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43271$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43272ac_tool_warned=yes ;;
43273esac
43274    OBJDUMP=$ac_ct_OBJDUMP
43275  fi
43276fi
43277
43278  else
43279    # The variable is set, but is it from the command line or the environment?
43280
43281    # Try to remove the string !OBJDUMP! from our list.
43282    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43283    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43284      # If it failed, the variable was not from the command line. Ignore it,
43285      # but warn the user (except for BASH, which is always set by the calling BASH).
43286      if test "xOBJDUMP" != xBASH; then
43287        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43288$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43289      fi
43290      # Try to locate tool using the code snippet
43291      if test -n "$ac_tool_prefix"; then
43292  for ac_prog in gobjdump objdump
43293  do
43294    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43295set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43297$as_echo_n "checking for $ac_word... " >&6; }
43298if ${ac_cv_prog_OBJDUMP+:} false; then :
43299  $as_echo_n "(cached) " >&6
43300else
43301  if test -n "$OBJDUMP"; then
43302  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43303else
43304as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43305for as_dir in $PATH
43306do
43307  IFS=$as_save_IFS
43308  test -z "$as_dir" && as_dir=.
43309    for ac_exec_ext in '' $ac_executable_extensions; do
43310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43311    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43313    break 2
43314  fi
43315done
43316  done
43317IFS=$as_save_IFS
43318
43319fi
43320fi
43321OBJDUMP=$ac_cv_prog_OBJDUMP
43322if test -n "$OBJDUMP"; then
43323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43324$as_echo "$OBJDUMP" >&6; }
43325else
43326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43327$as_echo "no" >&6; }
43328fi
43329
43330
43331    test -n "$OBJDUMP" && break
43332  done
43333fi
43334if test -z "$OBJDUMP"; then
43335  ac_ct_OBJDUMP=$OBJDUMP
43336  for ac_prog in gobjdump objdump
43337do
43338  # Extract the first word of "$ac_prog", so it can be a program name with args.
43339set dummy $ac_prog; ac_word=$2
43340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43341$as_echo_n "checking for $ac_word... " >&6; }
43342if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43343  $as_echo_n "(cached) " >&6
43344else
43345  if test -n "$ac_ct_OBJDUMP"; then
43346  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43347else
43348as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43349for as_dir in $PATH
43350do
43351  IFS=$as_save_IFS
43352  test -z "$as_dir" && as_dir=.
43353    for ac_exec_ext in '' $ac_executable_extensions; do
43354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43355    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43357    break 2
43358  fi
43359done
43360  done
43361IFS=$as_save_IFS
43362
43363fi
43364fi
43365ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43366if test -n "$ac_ct_OBJDUMP"; then
43367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43368$as_echo "$ac_ct_OBJDUMP" >&6; }
43369else
43370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43371$as_echo "no" >&6; }
43372fi
43373
43374
43375  test -n "$ac_ct_OBJDUMP" && break
43376done
43377
43378  if test "x$ac_ct_OBJDUMP" = x; then
43379    OBJDUMP=""
43380  else
43381    case $cross_compiling:$ac_tool_warned in
43382yes:)
43383{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43384$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43385ac_tool_warned=yes ;;
43386esac
43387    OBJDUMP=$ac_ct_OBJDUMP
43388  fi
43389fi
43390
43391    else
43392      # If it succeeded, then it was overridden by the user. We will use it
43393      # for the tool.
43394
43395      # First remove it from the list of overridden variables, so we can test
43396      # for unknown variables in the end.
43397      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43398
43399      # Check if we try to supply an empty value
43400      if test "x$OBJDUMP" = x; then
43401        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43402$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43403        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43404$as_echo_n "checking for OBJDUMP... " >&6; }
43405        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43406$as_echo "disabled" >&6; }
43407      else
43408        # Check if the provided tool contains a complete path.
43409        tool_specified="$OBJDUMP"
43410        tool_basename="${tool_specified##*/}"
43411        if test "x$tool_basename" = "x$tool_specified"; then
43412          # A command without a complete path is provided, search $PATH.
43413          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43414$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43415          # Extract the first word of "$tool_basename", so it can be a program name with args.
43416set dummy $tool_basename; ac_word=$2
43417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43418$as_echo_n "checking for $ac_word... " >&6; }
43419if ${ac_cv_path_OBJDUMP+:} false; then :
43420  $as_echo_n "(cached) " >&6
43421else
43422  case $OBJDUMP in
43423  [\\/]* | ?:[\\/]*)
43424  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43425  ;;
43426  *)
43427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43428for as_dir in $PATH
43429do
43430  IFS=$as_save_IFS
43431  test -z "$as_dir" && as_dir=.
43432    for ac_exec_ext in '' $ac_executable_extensions; do
43433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43434    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43436    break 2
43437  fi
43438done
43439  done
43440IFS=$as_save_IFS
43441
43442  ;;
43443esac
43444fi
43445OBJDUMP=$ac_cv_path_OBJDUMP
43446if test -n "$OBJDUMP"; then
43447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43448$as_echo "$OBJDUMP" >&6; }
43449else
43450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43451$as_echo "no" >&6; }
43452fi
43453
43454
43455          if test "x$OBJDUMP" = x; then
43456            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43457          fi
43458        else
43459          # Otherwise we believe it is a complete path. Use it as it is.
43460          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43461$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43462          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43463$as_echo_n "checking for OBJDUMP... " >&6; }
43464          if test ! -x "$tool_specified"; then
43465            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43466$as_echo "not found" >&6; }
43467            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43468          fi
43469          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43470$as_echo "$tool_specified" >&6; }
43471        fi
43472      fi
43473    fi
43474
43475  fi
43476
43477
43478  if test "x$OBJDUMP" != x; then
43479    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43480    # bails if argument is missing.
43481
43482  # Only process if variable expands to non-empty
43483
43484  if test "x$OBJDUMP" != x; then
43485    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43486
43487  # First separate the path from the arguments. This will split at the first
43488  # space.
43489  complete="$OBJDUMP"
43490  path="${complete%% *}"
43491  tmp="$complete EOL"
43492  arguments="${tmp#* }"
43493
43494  # Input might be given as Windows format, start by converting to
43495  # unix format.
43496  new_path=`$CYGPATH -u "$path"`
43497
43498  # Now try to locate executable using which
43499  new_path=`$WHICH "$new_path" 2> /dev/null`
43500  # bat and cmd files are not always considered executable in cygwin causing which
43501  # to not find them
43502  if test "x$new_path" = x \
43503      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43504      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43505    new_path=`$CYGPATH -u "$path"`
43506  fi
43507  if test "x$new_path" = x; then
43508    # Oops. Which didn't find the executable.
43509    # The splitting of arguments from the executable at a space might have been incorrect,
43510    # since paths with space are more likely in Windows. Give it another try with the whole
43511    # argument.
43512    path="$complete"
43513    arguments="EOL"
43514    new_path=`$CYGPATH -u "$path"`
43515    new_path=`$WHICH "$new_path" 2> /dev/null`
43516    # bat and cmd files are not always considered executable in cygwin causing which
43517    # to not find them
43518    if test "x$new_path" = x \
43519        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43520        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43521      new_path=`$CYGPATH -u "$path"`
43522    fi
43523    if test "x$new_path" = x; then
43524      # It's still not found. Now this is an unrecoverable error.
43525      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43526$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43527      has_space=`$ECHO "$complete" | $GREP " "`
43528      if test "x$has_space" != x; then
43529        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43530$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43531      fi
43532      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43533    fi
43534  fi
43535
43536  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43537  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43538  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43539  # "foo.exe" is OK but "foo" is an error.
43540  #
43541  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43542  # It is also a way to make sure we got the proper file name for the real test later on.
43543  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43544  if test "x$test_shortpath" = x; then
43545    # Short path failed, file does not exist as specified.
43546    # Try adding .exe or .cmd
43547    if test -f "${new_path}.exe"; then
43548      input_to_shortpath="${new_path}.exe"
43549    elif test -f "${new_path}.cmd"; then
43550      input_to_shortpath="${new_path}.cmd"
43551    else
43552      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43553$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43554      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43555$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43556      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43557    fi
43558  else
43559    input_to_shortpath="$new_path"
43560  fi
43561
43562  # Call helper function which possibly converts this using DOS-style short mode.
43563  # If so, the updated path is stored in $new_path.
43564  new_path="$input_to_shortpath"
43565
43566  input_path="$input_to_shortpath"
43567  # Check if we need to convert this using DOS-style short mode. If the path
43568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43569  # take no chances and rewrite it.
43570  # Note: m4 eats our [], so we need to use [ and ] instead.
43571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43572  if test "x$has_forbidden_chars" != x; then
43573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43574    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43575    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43576    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43577      # Going to short mode and back again did indeed matter. Since short mode is
43578      # case insensitive, let's make it lowercase to improve readability.
43579      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43580      # Now convert it back to Unix-style (cygpath)
43581      input_path=`$CYGPATH -u "$shortmode_path"`
43582      new_path="$input_path"
43583    fi
43584  fi
43585
43586  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43587  if test "x$test_cygdrive_prefix" = x; then
43588    # As a simple fix, exclude /usr/bin since it's not a real path.
43589    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43590      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43591      # a path prefixed by /cygdrive for fixpath to work.
43592      new_path="$CYGWIN_ROOT_PATH$input_path"
43593    fi
43594  fi
43595
43596  # remove trailing .exe if any
43597  new_path="${new_path/%.exe/}"
43598
43599    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43600
43601  # First separate the path from the arguments. This will split at the first
43602  # space.
43603  complete="$OBJDUMP"
43604  path="${complete%% *}"
43605  tmp="$complete EOL"
43606  arguments="${tmp#* }"
43607
43608  # Input might be given as Windows format, start by converting to
43609  # unix format.
43610  new_path="$path"
43611
43612  windows_path="$new_path"
43613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43614    unix_path=`$CYGPATH -u "$windows_path"`
43615    new_path="$unix_path"
43616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43618    new_path="$unix_path"
43619  fi
43620
43621
43622  # Now try to locate executable using which
43623  new_path=`$WHICH "$new_path" 2> /dev/null`
43624
43625  if test "x$new_path" = x; then
43626    # Oops. Which didn't find the executable.
43627    # The splitting of arguments from the executable at a space might have been incorrect,
43628    # since paths with space are more likely in Windows. Give it another try with the whole
43629    # argument.
43630    path="$complete"
43631    arguments="EOL"
43632    new_path="$path"
43633
43634  windows_path="$new_path"
43635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43636    unix_path=`$CYGPATH -u "$windows_path"`
43637    new_path="$unix_path"
43638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43640    new_path="$unix_path"
43641  fi
43642
43643
43644    new_path=`$WHICH "$new_path" 2> /dev/null`
43645    # bat and cmd files are not always considered executable in MSYS causing which
43646    # to not find them
43647    if test "x$new_path" = x \
43648        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43649        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43650      new_path="$path"
43651
43652  windows_path="$new_path"
43653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43654    unix_path=`$CYGPATH -u "$windows_path"`
43655    new_path="$unix_path"
43656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43658    new_path="$unix_path"
43659  fi
43660
43661    fi
43662
43663    if test "x$new_path" = x; then
43664      # It's still not found. Now this is an unrecoverable error.
43665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43666$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43667      has_space=`$ECHO "$complete" | $GREP " "`
43668      if test "x$has_space" != x; then
43669        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43670$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43671      fi
43672      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43673    fi
43674  fi
43675
43676  # Now new_path has a complete unix path to the binary
43677  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43678    # Keep paths in /bin as-is, but remove trailing .exe if any
43679    new_path="${new_path/%.exe/}"
43680    # Do not save /bin paths to all_fixpath_prefixes!
43681  else
43682    # Not in mixed or Windows style, start by that.
43683    new_path=`cmd //c echo $new_path`
43684
43685  input_path="$new_path"
43686  # Check if we need to convert this using DOS-style short mode. If the path
43687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43688  # take no chances and rewrite it.
43689  # Note: m4 eats our [], so we need to use [ and ] instead.
43690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43691  if test "x$has_forbidden_chars" != x; then
43692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43694  fi
43695
43696    # Output is in $new_path
43697
43698  windows_path="$new_path"
43699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43700    unix_path=`$CYGPATH -u "$windows_path"`
43701    new_path="$unix_path"
43702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43704    new_path="$unix_path"
43705  fi
43706
43707    # remove trailing .exe if any
43708    new_path="${new_path/%.exe/}"
43709
43710    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43711    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43712  fi
43713
43714    else
43715      # We're on a unix platform. Hooray! :)
43716      # First separate the path from the arguments. This will split at the first
43717      # space.
43718      complete="$OBJDUMP"
43719      path="${complete%% *}"
43720      tmp="$complete EOL"
43721      arguments="${tmp#* }"
43722
43723      # Cannot rely on the command "which" here since it doesn't always work.
43724      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43725      if test -z "$is_absolute_path"; then
43726        # Path to executable is not absolute. Find it.
43727        IFS_save="$IFS"
43728        IFS=:
43729        for p in $PATH; do
43730          if test -f "$p/$path" && test -x "$p/$path"; then
43731            new_path="$p/$path"
43732            break
43733          fi
43734        done
43735        IFS="$IFS_save"
43736      else
43737        # This is an absolute path, we can use it without further modifications.
43738        new_path="$path"
43739      fi
43740
43741      if test "x$new_path" = x; then
43742        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43743$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43744        has_space=`$ECHO "$complete" | $GREP " "`
43745        if test "x$has_space" != x; then
43746          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43747$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43748        fi
43749        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43750      fi
43751    fi
43752
43753    # Now join together the path and the arguments once again
43754    if test "x$arguments" != xEOL; then
43755      new_complete="$new_path ${arguments% *}"
43756    else
43757      new_complete="$new_path"
43758    fi
43759
43760    if test "x$complete" != "x$new_complete"; then
43761      OBJDUMP="$new_complete"
43762      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43763$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43764    fi
43765  fi
43766
43767  fi
43768
43769
43770  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43771  # to remain in place. Otherwise the compiler will not work in some siutations
43772  # in later configure checks.
43773  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43774    PATH="$OLD_PATH"
43775  fi
43776
43777  # Restore the flags to the user specified values.
43778  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43779  CFLAGS="$ORG_CFLAGS"
43780  CXXFLAGS="$ORG_CXXFLAGS"
43781
43782
43783# Finally do some processing after the detection phase
43784
43785  if test "x$COMPILE_TYPE" = "xcross"; then
43786    # Now we need to find a C/C++ compiler that can build executables for the
43787    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43788    # used once. Also, we need to do this without adding a tools dir to the
43789    # path, otherwise we might pick up cross-compilers which don't use standard
43790    # naming.
43791
43792    OLDPATH="$PATH"
43793
43794
43795# Check whether --with-build-devkit was given.
43796if test "${with_build_devkit+set}" = set; then :
43797  withval=$with_build_devkit;
43798fi
43799
43800    if test "x$with_build_devkit" = "xyes"; then
43801      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43802    elif test -n "$with_build_devkit"; then
43803      if test ! -d "$with_build_devkit"; then
43804        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43805      else
43806
43807  # Only process if variable expands to non-empty
43808
43809  if test "x$with_build_devkit" != x; then
43810    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43811
43812  # Input might be given as Windows format, start by converting to
43813  # unix format.
43814  path="$with_build_devkit"
43815  new_path=`$CYGPATH -u "$path"`
43816
43817  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43818  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43819  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43820  # "foo.exe" is OK but "foo" is an error.
43821  #
43822  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43823  # It is also a way to make sure we got the proper file name for the real test later on.
43824  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43825  if test "x$test_shortpath" = x; then
43826    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43827$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43828    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43829  fi
43830
43831  # Call helper function which possibly converts this using DOS-style short mode.
43832  # If so, the updated path is stored in $new_path.
43833
43834  input_path="$new_path"
43835  # Check if we need to convert this using DOS-style short mode. If the path
43836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43837  # take no chances and rewrite it.
43838  # Note: m4 eats our [], so we need to use [ and ] instead.
43839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43840  if test "x$has_forbidden_chars" != x; then
43841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43842    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43843    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43844    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43845      # Going to short mode and back again did indeed matter. Since short mode is
43846      # case insensitive, let's make it lowercase to improve readability.
43847      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43848      # Now convert it back to Unix-style (cygpath)
43849      input_path=`$CYGPATH -u "$shortmode_path"`
43850      new_path="$input_path"
43851    fi
43852  fi
43853
43854  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43855  if test "x$test_cygdrive_prefix" = x; then
43856    # As a simple fix, exclude /usr/bin since it's not a real path.
43857    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43858      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43859      # a path prefixed by /cygdrive for fixpath to work.
43860      new_path="$CYGWIN_ROOT_PATH$input_path"
43861    fi
43862  fi
43863
43864
43865  if test "x$path" != "x$new_path"; then
43866    with_build_devkit="$new_path"
43867    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43868$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43869  fi
43870
43871    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43872
43873  path="$with_build_devkit"
43874  has_colon=`$ECHO $path | $GREP ^.:`
43875  new_path="$path"
43876  if test "x$has_colon" = x; then
43877    # Not in mixed or Windows style, start by that.
43878    new_path=`cmd //c echo $path`
43879  fi
43880
43881
43882  input_path="$new_path"
43883  # Check if we need to convert this using DOS-style short mode. If the path
43884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43885  # take no chances and rewrite it.
43886  # Note: m4 eats our [], so we need to use [ and ] instead.
43887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43888  if test "x$has_forbidden_chars" != x; then
43889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43890    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43891  fi
43892
43893
43894  windows_path="$new_path"
43895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43896    unix_path=`$CYGPATH -u "$windows_path"`
43897    new_path="$unix_path"
43898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43900    new_path="$unix_path"
43901  fi
43902
43903  if test "x$path" != "x$new_path"; then
43904    with_build_devkit="$new_path"
43905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43906$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43907  fi
43908
43909  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43910  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43911
43912    else
43913      # We're on a unix platform. Hooray! :)
43914      path="$with_build_devkit"
43915      has_space=`$ECHO "$path" | $GREP " "`
43916      if test "x$has_space" != x; then
43917        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43918$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43919        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43920      fi
43921
43922      # Use eval to expand a potential ~
43923      eval path="$path"
43924      if test ! -f "$path" && test ! -d "$path"; then
43925        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43926      fi
43927
43928      if test -d "$path"; then
43929        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43930      else
43931        dir="`$DIRNAME "$path"`"
43932        base="`$BASENAME "$path"`"
43933        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43934      fi
43935    fi
43936  fi
43937
43938        BUILD_DEVKIT_ROOT="$with_build_devkit"
43939        # Check for a meta data info file in the root of the devkit
43940        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43941          # Process devkit.info so that existing devkit variables are not
43942          # modified by this
43943          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43944              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43945              -e "s/\$host/\$build/g" \
43946              $BUILD_DEVKIT_ROOT/devkit.info \
43947              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43948          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43949          # This potentially sets the following:
43950          # A descriptive name of the devkit
43951
43952  if test "x$BUILD_DEVKIT_NAME" = x; then
43953    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43954  fi
43955
43956          # Corresponds to --with-extra-path
43957
43958  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43959    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43960  fi
43961
43962          # Corresponds to --with-toolchain-path
43963
43964  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43965    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43966  fi
43967
43968          # Corresponds to --with-sysroot
43969
43970  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43971    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43972  fi
43973
43974          # Skip the Window specific parts
43975        fi
43976
43977        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43978$as_echo_n "checking for build platform devkit... " >&6; }
43979        if test "x$BUILD_DEVKIT_NAME" != x; then
43980          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43981$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43982        else
43983          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43984$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43985        fi
43986
43987        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43988
43989  if test "x$BUILD_SYSROOT" != "x"; then
43990    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43991      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43992        # Solaris Studio does not have a concept of sysroot. Instead we must
43993        # make sure the default include and lib dirs are appended to each
43994        # compile and link command line. Must also add -I-xbuiltin to enable
43995        # inlining of system functions and intrinsics.
43996        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43997        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43998            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
43999      fi
44000    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44001      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44002      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44003    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44004      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44005      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44006    fi
44007    # Propagate the sysroot args to hotspot
44008    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
44009    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44010    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44011    # The global CFLAGS and LDFLAGS variables need these for configure to function
44012    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44013    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44014    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44015    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44016  fi
44017
44018  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44019    # We also need -iframework<path>/System/Library/Frameworks
44020    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44021    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44022    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44023    # set this here so it doesn't have to be peppered throughout the forest
44024    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44025    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44026  fi
44027
44028
44029
44030
44031
44032         # Fallback default of just /bin if DEVKIT_PATH is not defined
44033        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44034          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44035        fi
44036        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44037      fi
44038    fi
44039
44040    # FIXME: we should list the discovered compilers as an exclude pattern!
44041    # If we do that, we can do this detection before POST_DETECTION, and still
44042    # find the build compilers in the tools dir, if needed.
44043
44044
44045
44046  # Publish this variable in the help.
44047
44048
44049  if [ -z "${BUILD_CC+x}" ]; then
44050    # The variable is not set by user, try to locate tool using the code snippet
44051    for ac_prog in cl cc gcc
44052do
44053  # Extract the first word of "$ac_prog", so it can be a program name with args.
44054set dummy $ac_prog; ac_word=$2
44055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44056$as_echo_n "checking for $ac_word... " >&6; }
44057if ${ac_cv_path_BUILD_CC+:} false; then :
44058  $as_echo_n "(cached) " >&6
44059else
44060  case $BUILD_CC in
44061  [\\/]* | ?:[\\/]*)
44062  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44063  ;;
44064  *)
44065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44066for as_dir in $PATH
44067do
44068  IFS=$as_save_IFS
44069  test -z "$as_dir" && as_dir=.
44070    for ac_exec_ext in '' $ac_executable_extensions; do
44071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44072    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44074    break 2
44075  fi
44076done
44077  done
44078IFS=$as_save_IFS
44079
44080  ;;
44081esac
44082fi
44083BUILD_CC=$ac_cv_path_BUILD_CC
44084if test -n "$BUILD_CC"; then
44085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44086$as_echo "$BUILD_CC" >&6; }
44087else
44088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44089$as_echo "no" >&6; }
44090fi
44091
44092
44093  test -n "$BUILD_CC" && break
44094done
44095
44096  else
44097    # The variable is set, but is it from the command line or the environment?
44098
44099    # Try to remove the string !BUILD_CC! from our list.
44100    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44101    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44102      # If it failed, the variable was not from the command line. Ignore it,
44103      # but warn the user (except for BASH, which is always set by the calling BASH).
44104      if test "xBUILD_CC" != xBASH; then
44105        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44106$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44107      fi
44108      # Try to locate tool using the code snippet
44109      for ac_prog in cl cc gcc
44110do
44111  # Extract the first word of "$ac_prog", so it can be a program name with args.
44112set dummy $ac_prog; ac_word=$2
44113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44114$as_echo_n "checking for $ac_word... " >&6; }
44115if ${ac_cv_path_BUILD_CC+:} false; then :
44116  $as_echo_n "(cached) " >&6
44117else
44118  case $BUILD_CC in
44119  [\\/]* | ?:[\\/]*)
44120  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44121  ;;
44122  *)
44123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44124for as_dir in $PATH
44125do
44126  IFS=$as_save_IFS
44127  test -z "$as_dir" && as_dir=.
44128    for ac_exec_ext in '' $ac_executable_extensions; do
44129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44130    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44132    break 2
44133  fi
44134done
44135  done
44136IFS=$as_save_IFS
44137
44138  ;;
44139esac
44140fi
44141BUILD_CC=$ac_cv_path_BUILD_CC
44142if test -n "$BUILD_CC"; then
44143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44144$as_echo "$BUILD_CC" >&6; }
44145else
44146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44147$as_echo "no" >&6; }
44148fi
44149
44150
44151  test -n "$BUILD_CC" && break
44152done
44153
44154    else
44155      # If it succeeded, then it was overridden by the user. We will use it
44156      # for the tool.
44157
44158      # First remove it from the list of overridden variables, so we can test
44159      # for unknown variables in the end.
44160      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44161
44162      # Check if we try to supply an empty value
44163      if test "x$BUILD_CC" = x; then
44164        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44165$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44166        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44167$as_echo_n "checking for BUILD_CC... " >&6; }
44168        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44169$as_echo "disabled" >&6; }
44170      else
44171        # Check if the provided tool contains a complete path.
44172        tool_specified="$BUILD_CC"
44173        tool_basename="${tool_specified##*/}"
44174        if test "x$tool_basename" = "x$tool_specified"; then
44175          # A command without a complete path is provided, search $PATH.
44176          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44177$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44178          # Extract the first word of "$tool_basename", so it can be a program name with args.
44179set dummy $tool_basename; ac_word=$2
44180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44181$as_echo_n "checking for $ac_word... " >&6; }
44182if ${ac_cv_path_BUILD_CC+:} false; then :
44183  $as_echo_n "(cached) " >&6
44184else
44185  case $BUILD_CC in
44186  [\\/]* | ?:[\\/]*)
44187  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44188  ;;
44189  *)
44190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44191for as_dir in $PATH
44192do
44193  IFS=$as_save_IFS
44194  test -z "$as_dir" && as_dir=.
44195    for ac_exec_ext in '' $ac_executable_extensions; do
44196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44197    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44199    break 2
44200  fi
44201done
44202  done
44203IFS=$as_save_IFS
44204
44205  ;;
44206esac
44207fi
44208BUILD_CC=$ac_cv_path_BUILD_CC
44209if test -n "$BUILD_CC"; then
44210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44211$as_echo "$BUILD_CC" >&6; }
44212else
44213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44214$as_echo "no" >&6; }
44215fi
44216
44217
44218          if test "x$BUILD_CC" = x; then
44219            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44220          fi
44221        else
44222          # Otherwise we believe it is a complete path. Use it as it is.
44223          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44224$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44225          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44226$as_echo_n "checking for BUILD_CC... " >&6; }
44227          if test ! -x "$tool_specified"; then
44228            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44229$as_echo "not found" >&6; }
44230            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44231          fi
44232          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44233$as_echo "$tool_specified" >&6; }
44234        fi
44235      fi
44236    fi
44237
44238  fi
44239
44240
44241
44242  if test "x$BUILD_CC" = x; then
44243    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44244  fi
44245
44246
44247
44248  # Only process if variable expands to non-empty
44249
44250  if test "x$BUILD_CC" != x; then
44251    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44252
44253  # First separate the path from the arguments. This will split at the first
44254  # space.
44255  complete="$BUILD_CC"
44256  path="${complete%% *}"
44257  tmp="$complete EOL"
44258  arguments="${tmp#* }"
44259
44260  # Input might be given as Windows format, start by converting to
44261  # unix format.
44262  new_path=`$CYGPATH -u "$path"`
44263
44264  # Now try to locate executable using which
44265  new_path=`$WHICH "$new_path" 2> /dev/null`
44266  # bat and cmd files are not always considered executable in cygwin causing which
44267  # to not find them
44268  if test "x$new_path" = x \
44269      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44270      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44271    new_path=`$CYGPATH -u "$path"`
44272  fi
44273  if test "x$new_path" = x; then
44274    # Oops. Which didn't find the executable.
44275    # The splitting of arguments from the executable at a space might have been incorrect,
44276    # since paths with space are more likely in Windows. Give it another try with the whole
44277    # argument.
44278    path="$complete"
44279    arguments="EOL"
44280    new_path=`$CYGPATH -u "$path"`
44281    new_path=`$WHICH "$new_path" 2> /dev/null`
44282    # bat and cmd files are not always considered executable in cygwin causing which
44283    # to not find them
44284    if test "x$new_path" = x \
44285        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44286        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44287      new_path=`$CYGPATH -u "$path"`
44288    fi
44289    if test "x$new_path" = x; then
44290      # It's still not found. Now this is an unrecoverable error.
44291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44292$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44293      has_space=`$ECHO "$complete" | $GREP " "`
44294      if test "x$has_space" != x; then
44295        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44296$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44297      fi
44298      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44299    fi
44300  fi
44301
44302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44305  # "foo.exe" is OK but "foo" is an error.
44306  #
44307  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44308  # It is also a way to make sure we got the proper file name for the real test later on.
44309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44310  if test "x$test_shortpath" = x; then
44311    # Short path failed, file does not exist as specified.
44312    # Try adding .exe or .cmd
44313    if test -f "${new_path}.exe"; then
44314      input_to_shortpath="${new_path}.exe"
44315    elif test -f "${new_path}.cmd"; then
44316      input_to_shortpath="${new_path}.cmd"
44317    else
44318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44319$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44320      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44321$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44322      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44323    fi
44324  else
44325    input_to_shortpath="$new_path"
44326  fi
44327
44328  # Call helper function which possibly converts this using DOS-style short mode.
44329  # If so, the updated path is stored in $new_path.
44330  new_path="$input_to_shortpath"
44331
44332  input_path="$input_to_shortpath"
44333  # Check if we need to convert this using DOS-style short mode. If the path
44334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44335  # take no chances and rewrite it.
44336  # Note: m4 eats our [], so we need to use [ and ] instead.
44337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44338  if test "x$has_forbidden_chars" != x; then
44339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44343      # Going to short mode and back again did indeed matter. Since short mode is
44344      # case insensitive, let's make it lowercase to improve readability.
44345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44346      # Now convert it back to Unix-style (cygpath)
44347      input_path=`$CYGPATH -u "$shortmode_path"`
44348      new_path="$input_path"
44349    fi
44350  fi
44351
44352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44353  if test "x$test_cygdrive_prefix" = x; then
44354    # As a simple fix, exclude /usr/bin since it's not a real path.
44355    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44357      # a path prefixed by /cygdrive for fixpath to work.
44358      new_path="$CYGWIN_ROOT_PATH$input_path"
44359    fi
44360  fi
44361
44362  # remove trailing .exe if any
44363  new_path="${new_path/%.exe/}"
44364
44365    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44366
44367  # First separate the path from the arguments. This will split at the first
44368  # space.
44369  complete="$BUILD_CC"
44370  path="${complete%% *}"
44371  tmp="$complete EOL"
44372  arguments="${tmp#* }"
44373
44374  # Input might be given as Windows format, start by converting to
44375  # unix format.
44376  new_path="$path"
44377
44378  windows_path="$new_path"
44379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44380    unix_path=`$CYGPATH -u "$windows_path"`
44381    new_path="$unix_path"
44382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44384    new_path="$unix_path"
44385  fi
44386
44387
44388  # Now try to locate executable using which
44389  new_path=`$WHICH "$new_path" 2> /dev/null`
44390
44391  if test "x$new_path" = x; then
44392    # Oops. Which didn't find the executable.
44393    # The splitting of arguments from the executable at a space might have been incorrect,
44394    # since paths with space are more likely in Windows. Give it another try with the whole
44395    # argument.
44396    path="$complete"
44397    arguments="EOL"
44398    new_path="$path"
44399
44400  windows_path="$new_path"
44401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44402    unix_path=`$CYGPATH -u "$windows_path"`
44403    new_path="$unix_path"
44404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44406    new_path="$unix_path"
44407  fi
44408
44409
44410    new_path=`$WHICH "$new_path" 2> /dev/null`
44411    # bat and cmd files are not always considered executable in MSYS causing which
44412    # to not find them
44413    if test "x$new_path" = x \
44414        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44415        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44416      new_path="$path"
44417
44418  windows_path="$new_path"
44419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44420    unix_path=`$CYGPATH -u "$windows_path"`
44421    new_path="$unix_path"
44422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44424    new_path="$unix_path"
44425  fi
44426
44427    fi
44428
44429    if test "x$new_path" = x; then
44430      # It's still not found. Now this is an unrecoverable error.
44431      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44432$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44433      has_space=`$ECHO "$complete" | $GREP " "`
44434      if test "x$has_space" != x; then
44435        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44436$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44437      fi
44438      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44439    fi
44440  fi
44441
44442  # Now new_path has a complete unix path to the binary
44443  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44444    # Keep paths in /bin as-is, but remove trailing .exe if any
44445    new_path="${new_path/%.exe/}"
44446    # Do not save /bin paths to all_fixpath_prefixes!
44447  else
44448    # Not in mixed or Windows style, start by that.
44449    new_path=`cmd //c echo $new_path`
44450
44451  input_path="$new_path"
44452  # Check if we need to convert this using DOS-style short mode. If the path
44453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44454  # take no chances and rewrite it.
44455  # Note: m4 eats our [], so we need to use [ and ] instead.
44456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44457  if test "x$has_forbidden_chars" != x; then
44458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44459    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44460  fi
44461
44462    # Output is in $new_path
44463
44464  windows_path="$new_path"
44465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44466    unix_path=`$CYGPATH -u "$windows_path"`
44467    new_path="$unix_path"
44468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44470    new_path="$unix_path"
44471  fi
44472
44473    # remove trailing .exe if any
44474    new_path="${new_path/%.exe/}"
44475
44476    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44477    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44478  fi
44479
44480    else
44481      # We're on a unix platform. Hooray! :)
44482      # First separate the path from the arguments. This will split at the first
44483      # space.
44484      complete="$BUILD_CC"
44485      path="${complete%% *}"
44486      tmp="$complete EOL"
44487      arguments="${tmp#* }"
44488
44489      # Cannot rely on the command "which" here since it doesn't always work.
44490      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44491      if test -z "$is_absolute_path"; then
44492        # Path to executable is not absolute. Find it.
44493        IFS_save="$IFS"
44494        IFS=:
44495        for p in $PATH; do
44496          if test -f "$p/$path" && test -x "$p/$path"; then
44497            new_path="$p/$path"
44498            break
44499          fi
44500        done
44501        IFS="$IFS_save"
44502      else
44503        # This is an absolute path, we can use it without further modifications.
44504        new_path="$path"
44505      fi
44506
44507      if test "x$new_path" = x; then
44508        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44509$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44510        has_space=`$ECHO "$complete" | $GREP " "`
44511        if test "x$has_space" != x; then
44512          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44513$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44514        fi
44515        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44516      fi
44517    fi
44518
44519    # Now join together the path and the arguments once again
44520    if test "x$arguments" != xEOL; then
44521      new_complete="$new_path ${arguments% *}"
44522    else
44523      new_complete="$new_path"
44524    fi
44525
44526    if test "x$complete" != "x$new_complete"; then
44527      BUILD_CC="$new_complete"
44528      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44529$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44530    fi
44531  fi
44532
44533
44534
44535
44536  # Publish this variable in the help.
44537
44538
44539  if [ -z "${BUILD_CXX+x}" ]; then
44540    # The variable is not set by user, try to locate tool using the code snippet
44541    for ac_prog in cl CC g++
44542do
44543  # Extract the first word of "$ac_prog", so it can be a program name with args.
44544set dummy $ac_prog; ac_word=$2
44545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44546$as_echo_n "checking for $ac_word... " >&6; }
44547if ${ac_cv_path_BUILD_CXX+:} false; then :
44548  $as_echo_n "(cached) " >&6
44549else
44550  case $BUILD_CXX in
44551  [\\/]* | ?:[\\/]*)
44552  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44553  ;;
44554  *)
44555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44556for as_dir in $PATH
44557do
44558  IFS=$as_save_IFS
44559  test -z "$as_dir" && as_dir=.
44560    for ac_exec_ext in '' $ac_executable_extensions; do
44561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44562    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44564    break 2
44565  fi
44566done
44567  done
44568IFS=$as_save_IFS
44569
44570  ;;
44571esac
44572fi
44573BUILD_CXX=$ac_cv_path_BUILD_CXX
44574if test -n "$BUILD_CXX"; then
44575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44576$as_echo "$BUILD_CXX" >&6; }
44577else
44578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44579$as_echo "no" >&6; }
44580fi
44581
44582
44583  test -n "$BUILD_CXX" && break
44584done
44585
44586  else
44587    # The variable is set, but is it from the command line or the environment?
44588
44589    # Try to remove the string !BUILD_CXX! from our list.
44590    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44591    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44592      # If it failed, the variable was not from the command line. Ignore it,
44593      # but warn the user (except for BASH, which is always set by the calling BASH).
44594      if test "xBUILD_CXX" != xBASH; then
44595        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44596$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44597      fi
44598      # Try to locate tool using the code snippet
44599      for ac_prog in cl CC g++
44600do
44601  # Extract the first word of "$ac_prog", so it can be a program name with args.
44602set dummy $ac_prog; ac_word=$2
44603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44604$as_echo_n "checking for $ac_word... " >&6; }
44605if ${ac_cv_path_BUILD_CXX+:} false; then :
44606  $as_echo_n "(cached) " >&6
44607else
44608  case $BUILD_CXX in
44609  [\\/]* | ?:[\\/]*)
44610  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44611  ;;
44612  *)
44613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44614for as_dir in $PATH
44615do
44616  IFS=$as_save_IFS
44617  test -z "$as_dir" && as_dir=.
44618    for ac_exec_ext in '' $ac_executable_extensions; do
44619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44620    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44622    break 2
44623  fi
44624done
44625  done
44626IFS=$as_save_IFS
44627
44628  ;;
44629esac
44630fi
44631BUILD_CXX=$ac_cv_path_BUILD_CXX
44632if test -n "$BUILD_CXX"; then
44633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44634$as_echo "$BUILD_CXX" >&6; }
44635else
44636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44637$as_echo "no" >&6; }
44638fi
44639
44640
44641  test -n "$BUILD_CXX" && break
44642done
44643
44644    else
44645      # If it succeeded, then it was overridden by the user. We will use it
44646      # for the tool.
44647
44648      # First remove it from the list of overridden variables, so we can test
44649      # for unknown variables in the end.
44650      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44651
44652      # Check if we try to supply an empty value
44653      if test "x$BUILD_CXX" = x; then
44654        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44655$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44656        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44657$as_echo_n "checking for BUILD_CXX... " >&6; }
44658        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44659$as_echo "disabled" >&6; }
44660      else
44661        # Check if the provided tool contains a complete path.
44662        tool_specified="$BUILD_CXX"
44663        tool_basename="${tool_specified##*/}"
44664        if test "x$tool_basename" = "x$tool_specified"; then
44665          # A command without a complete path is provided, search $PATH.
44666          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44667$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44668          # Extract the first word of "$tool_basename", so it can be a program name with args.
44669set dummy $tool_basename; ac_word=$2
44670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44671$as_echo_n "checking for $ac_word... " >&6; }
44672if ${ac_cv_path_BUILD_CXX+:} false; then :
44673  $as_echo_n "(cached) " >&6
44674else
44675  case $BUILD_CXX in
44676  [\\/]* | ?:[\\/]*)
44677  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44678  ;;
44679  *)
44680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44681for as_dir in $PATH
44682do
44683  IFS=$as_save_IFS
44684  test -z "$as_dir" && as_dir=.
44685    for ac_exec_ext in '' $ac_executable_extensions; do
44686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44687    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44689    break 2
44690  fi
44691done
44692  done
44693IFS=$as_save_IFS
44694
44695  ;;
44696esac
44697fi
44698BUILD_CXX=$ac_cv_path_BUILD_CXX
44699if test -n "$BUILD_CXX"; then
44700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44701$as_echo "$BUILD_CXX" >&6; }
44702else
44703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44704$as_echo "no" >&6; }
44705fi
44706
44707
44708          if test "x$BUILD_CXX" = x; then
44709            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44710          fi
44711        else
44712          # Otherwise we believe it is a complete path. Use it as it is.
44713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44714$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44715          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44716$as_echo_n "checking for BUILD_CXX... " >&6; }
44717          if test ! -x "$tool_specified"; then
44718            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44719$as_echo "not found" >&6; }
44720            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44721          fi
44722          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44723$as_echo "$tool_specified" >&6; }
44724        fi
44725      fi
44726    fi
44727
44728  fi
44729
44730
44731
44732  if test "x$BUILD_CXX" = x; then
44733    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44734  fi
44735
44736
44737
44738  # Only process if variable expands to non-empty
44739
44740  if test "x$BUILD_CXX" != x; then
44741    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44742
44743  # First separate the path from the arguments. This will split at the first
44744  # space.
44745  complete="$BUILD_CXX"
44746  path="${complete%% *}"
44747  tmp="$complete EOL"
44748  arguments="${tmp#* }"
44749
44750  # Input might be given as Windows format, start by converting to
44751  # unix format.
44752  new_path=`$CYGPATH -u "$path"`
44753
44754  # Now try to locate executable using which
44755  new_path=`$WHICH "$new_path" 2> /dev/null`
44756  # bat and cmd files are not always considered executable in cygwin causing which
44757  # to not find them
44758  if test "x$new_path" = x \
44759      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44760      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44761    new_path=`$CYGPATH -u "$path"`
44762  fi
44763  if test "x$new_path" = x; then
44764    # Oops. Which didn't find the executable.
44765    # The splitting of arguments from the executable at a space might have been incorrect,
44766    # since paths with space are more likely in Windows. Give it another try with the whole
44767    # argument.
44768    path="$complete"
44769    arguments="EOL"
44770    new_path=`$CYGPATH -u "$path"`
44771    new_path=`$WHICH "$new_path" 2> /dev/null`
44772    # bat and cmd files are not always considered executable in cygwin causing which
44773    # to not find them
44774    if test "x$new_path" = x \
44775        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44776        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44777      new_path=`$CYGPATH -u "$path"`
44778    fi
44779    if test "x$new_path" = x; then
44780      # It's still not found. Now this is an unrecoverable error.
44781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44782$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44783      has_space=`$ECHO "$complete" | $GREP " "`
44784      if test "x$has_space" != x; then
44785        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44786$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44787      fi
44788      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44789    fi
44790  fi
44791
44792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44795  # "foo.exe" is OK but "foo" is an error.
44796  #
44797  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44798  # It is also a way to make sure we got the proper file name for the real test later on.
44799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44800  if test "x$test_shortpath" = x; then
44801    # Short path failed, file does not exist as specified.
44802    # Try adding .exe or .cmd
44803    if test -f "${new_path}.exe"; then
44804      input_to_shortpath="${new_path}.exe"
44805    elif test -f "${new_path}.cmd"; then
44806      input_to_shortpath="${new_path}.cmd"
44807    else
44808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44809$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44810      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44811$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44812      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44813    fi
44814  else
44815    input_to_shortpath="$new_path"
44816  fi
44817
44818  # Call helper function which possibly converts this using DOS-style short mode.
44819  # If so, the updated path is stored in $new_path.
44820  new_path="$input_to_shortpath"
44821
44822  input_path="$input_to_shortpath"
44823  # Check if we need to convert this using DOS-style short mode. If the path
44824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44825  # take no chances and rewrite it.
44826  # Note: m4 eats our [], so we need to use [ and ] instead.
44827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44828  if test "x$has_forbidden_chars" != x; then
44829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44830    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44831    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44832    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44833      # Going to short mode and back again did indeed matter. Since short mode is
44834      # case insensitive, let's make it lowercase to improve readability.
44835      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44836      # Now convert it back to Unix-style (cygpath)
44837      input_path=`$CYGPATH -u "$shortmode_path"`
44838      new_path="$input_path"
44839    fi
44840  fi
44841
44842  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44843  if test "x$test_cygdrive_prefix" = x; then
44844    # As a simple fix, exclude /usr/bin since it's not a real path.
44845    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44846      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44847      # a path prefixed by /cygdrive for fixpath to work.
44848      new_path="$CYGWIN_ROOT_PATH$input_path"
44849    fi
44850  fi
44851
44852  # remove trailing .exe if any
44853  new_path="${new_path/%.exe/}"
44854
44855    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44856
44857  # First separate the path from the arguments. This will split at the first
44858  # space.
44859  complete="$BUILD_CXX"
44860  path="${complete%% *}"
44861  tmp="$complete EOL"
44862  arguments="${tmp#* }"
44863
44864  # Input might be given as Windows format, start by converting to
44865  # unix format.
44866  new_path="$path"
44867
44868  windows_path="$new_path"
44869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44870    unix_path=`$CYGPATH -u "$windows_path"`
44871    new_path="$unix_path"
44872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44874    new_path="$unix_path"
44875  fi
44876
44877
44878  # Now try to locate executable using which
44879  new_path=`$WHICH "$new_path" 2> /dev/null`
44880
44881  if test "x$new_path" = x; then
44882    # Oops. Which didn't find the executable.
44883    # The splitting of arguments from the executable at a space might have been incorrect,
44884    # since paths with space are more likely in Windows. Give it another try with the whole
44885    # argument.
44886    path="$complete"
44887    arguments="EOL"
44888    new_path="$path"
44889
44890  windows_path="$new_path"
44891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44892    unix_path=`$CYGPATH -u "$windows_path"`
44893    new_path="$unix_path"
44894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44896    new_path="$unix_path"
44897  fi
44898
44899
44900    new_path=`$WHICH "$new_path" 2> /dev/null`
44901    # bat and cmd files are not always considered executable in MSYS causing which
44902    # to not find them
44903    if test "x$new_path" = x \
44904        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44905        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44906      new_path="$path"
44907
44908  windows_path="$new_path"
44909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44910    unix_path=`$CYGPATH -u "$windows_path"`
44911    new_path="$unix_path"
44912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44914    new_path="$unix_path"
44915  fi
44916
44917    fi
44918
44919    if test "x$new_path" = x; then
44920      # It's still not found. Now this is an unrecoverable error.
44921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44922$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44923      has_space=`$ECHO "$complete" | $GREP " "`
44924      if test "x$has_space" != x; then
44925        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44926$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44927      fi
44928      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44929    fi
44930  fi
44931
44932  # Now new_path has a complete unix path to the binary
44933  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44934    # Keep paths in /bin as-is, but remove trailing .exe if any
44935    new_path="${new_path/%.exe/}"
44936    # Do not save /bin paths to all_fixpath_prefixes!
44937  else
44938    # Not in mixed or Windows style, start by that.
44939    new_path=`cmd //c echo $new_path`
44940
44941  input_path="$new_path"
44942  # Check if we need to convert this using DOS-style short mode. If the path
44943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44944  # take no chances and rewrite it.
44945  # Note: m4 eats our [], so we need to use [ and ] instead.
44946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44947  if test "x$has_forbidden_chars" != x; then
44948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44950  fi
44951
44952    # Output is in $new_path
44953
44954  windows_path="$new_path"
44955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44956    unix_path=`$CYGPATH -u "$windows_path"`
44957    new_path="$unix_path"
44958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44960    new_path="$unix_path"
44961  fi
44962
44963    # remove trailing .exe if any
44964    new_path="${new_path/%.exe/}"
44965
44966    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44967    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44968  fi
44969
44970    else
44971      # We're on a unix platform. Hooray! :)
44972      # First separate the path from the arguments. This will split at the first
44973      # space.
44974      complete="$BUILD_CXX"
44975      path="${complete%% *}"
44976      tmp="$complete EOL"
44977      arguments="${tmp#* }"
44978
44979      # Cannot rely on the command "which" here since it doesn't always work.
44980      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44981      if test -z "$is_absolute_path"; then
44982        # Path to executable is not absolute. Find it.
44983        IFS_save="$IFS"
44984        IFS=:
44985        for p in $PATH; do
44986          if test -f "$p/$path" && test -x "$p/$path"; then
44987            new_path="$p/$path"
44988            break
44989          fi
44990        done
44991        IFS="$IFS_save"
44992      else
44993        # This is an absolute path, we can use it without further modifications.
44994        new_path="$path"
44995      fi
44996
44997      if test "x$new_path" = x; then
44998        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44999$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45000        has_space=`$ECHO "$complete" | $GREP " "`
45001        if test "x$has_space" != x; then
45002          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45003$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45004        fi
45005        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45006      fi
45007    fi
45008
45009    # Now join together the path and the arguments once again
45010    if test "x$arguments" != xEOL; then
45011      new_complete="$new_path ${arguments% *}"
45012    else
45013      new_complete="$new_path"
45014    fi
45015
45016    if test "x$complete" != "x$new_complete"; then
45017      BUILD_CXX="$new_complete"
45018      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45019$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45020    fi
45021  fi
45022
45023
45024
45025  # Publish this variable in the help.
45026
45027
45028  if [ -z "${BUILD_NM+x}" ]; then
45029    # The variable is not set by user, try to locate tool using the code snippet
45030    for ac_prog in nm gcc-nm
45031do
45032  # Extract the first word of "$ac_prog", so it can be a program name with args.
45033set dummy $ac_prog; ac_word=$2
45034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45035$as_echo_n "checking for $ac_word... " >&6; }
45036if ${ac_cv_path_BUILD_NM+:} false; then :
45037  $as_echo_n "(cached) " >&6
45038else
45039  case $BUILD_NM in
45040  [\\/]* | ?:[\\/]*)
45041  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45042  ;;
45043  *)
45044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45045for as_dir in $PATH
45046do
45047  IFS=$as_save_IFS
45048  test -z "$as_dir" && as_dir=.
45049    for ac_exec_ext in '' $ac_executable_extensions; do
45050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45051    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45053    break 2
45054  fi
45055done
45056  done
45057IFS=$as_save_IFS
45058
45059  ;;
45060esac
45061fi
45062BUILD_NM=$ac_cv_path_BUILD_NM
45063if test -n "$BUILD_NM"; then
45064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45065$as_echo "$BUILD_NM" >&6; }
45066else
45067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45068$as_echo "no" >&6; }
45069fi
45070
45071
45072  test -n "$BUILD_NM" && break
45073done
45074
45075  else
45076    # The variable is set, but is it from the command line or the environment?
45077
45078    # Try to remove the string !BUILD_NM! from our list.
45079    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45080    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45081      # If it failed, the variable was not from the command line. Ignore it,
45082      # but warn the user (except for BASH, which is always set by the calling BASH).
45083      if test "xBUILD_NM" != xBASH; then
45084        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45085$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45086      fi
45087      # Try to locate tool using the code snippet
45088      for ac_prog in nm gcc-nm
45089do
45090  # Extract the first word of "$ac_prog", so it can be a program name with args.
45091set dummy $ac_prog; ac_word=$2
45092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45093$as_echo_n "checking for $ac_word... " >&6; }
45094if ${ac_cv_path_BUILD_NM+:} false; then :
45095  $as_echo_n "(cached) " >&6
45096else
45097  case $BUILD_NM in
45098  [\\/]* | ?:[\\/]*)
45099  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45100  ;;
45101  *)
45102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45103for as_dir in $PATH
45104do
45105  IFS=$as_save_IFS
45106  test -z "$as_dir" && as_dir=.
45107    for ac_exec_ext in '' $ac_executable_extensions; do
45108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45109    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45111    break 2
45112  fi
45113done
45114  done
45115IFS=$as_save_IFS
45116
45117  ;;
45118esac
45119fi
45120BUILD_NM=$ac_cv_path_BUILD_NM
45121if test -n "$BUILD_NM"; then
45122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45123$as_echo "$BUILD_NM" >&6; }
45124else
45125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45126$as_echo "no" >&6; }
45127fi
45128
45129
45130  test -n "$BUILD_NM" && break
45131done
45132
45133    else
45134      # If it succeeded, then it was overridden by the user. We will use it
45135      # for the tool.
45136
45137      # First remove it from the list of overridden variables, so we can test
45138      # for unknown variables in the end.
45139      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45140
45141      # Check if we try to supply an empty value
45142      if test "x$BUILD_NM" = x; then
45143        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45144$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45145        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45146$as_echo_n "checking for BUILD_NM... " >&6; }
45147        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45148$as_echo "disabled" >&6; }
45149      else
45150        # Check if the provided tool contains a complete path.
45151        tool_specified="$BUILD_NM"
45152        tool_basename="${tool_specified##*/}"
45153        if test "x$tool_basename" = "x$tool_specified"; then
45154          # A command without a complete path is provided, search $PATH.
45155          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45156$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45157          # Extract the first word of "$tool_basename", so it can be a program name with args.
45158set dummy $tool_basename; ac_word=$2
45159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45160$as_echo_n "checking for $ac_word... " >&6; }
45161if ${ac_cv_path_BUILD_NM+:} false; then :
45162  $as_echo_n "(cached) " >&6
45163else
45164  case $BUILD_NM in
45165  [\\/]* | ?:[\\/]*)
45166  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45167  ;;
45168  *)
45169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45170for as_dir in $PATH
45171do
45172  IFS=$as_save_IFS
45173  test -z "$as_dir" && as_dir=.
45174    for ac_exec_ext in '' $ac_executable_extensions; do
45175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45176    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45178    break 2
45179  fi
45180done
45181  done
45182IFS=$as_save_IFS
45183
45184  ;;
45185esac
45186fi
45187BUILD_NM=$ac_cv_path_BUILD_NM
45188if test -n "$BUILD_NM"; then
45189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45190$as_echo "$BUILD_NM" >&6; }
45191else
45192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45193$as_echo "no" >&6; }
45194fi
45195
45196
45197          if test "x$BUILD_NM" = x; then
45198            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45199          fi
45200        else
45201          # Otherwise we believe it is a complete path. Use it as it is.
45202          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45203$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45204          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45205$as_echo_n "checking for BUILD_NM... " >&6; }
45206          if test ! -x "$tool_specified"; then
45207            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45208$as_echo "not found" >&6; }
45209            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45210          fi
45211          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45212$as_echo "$tool_specified" >&6; }
45213        fi
45214      fi
45215    fi
45216
45217  fi
45218
45219
45220
45221  # Only process if variable expands to non-empty
45222
45223  if test "x$BUILD_NM" != x; then
45224    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45225
45226  # First separate the path from the arguments. This will split at the first
45227  # space.
45228  complete="$BUILD_NM"
45229  path="${complete%% *}"
45230  tmp="$complete EOL"
45231  arguments="${tmp#* }"
45232
45233  # Input might be given as Windows format, start by converting to
45234  # unix format.
45235  new_path=`$CYGPATH -u "$path"`
45236
45237  # Now try to locate executable using which
45238  new_path=`$WHICH "$new_path" 2> /dev/null`
45239  # bat and cmd files are not always considered executable in cygwin causing which
45240  # to not find them
45241  if test "x$new_path" = x \
45242      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45243      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45244    new_path=`$CYGPATH -u "$path"`
45245  fi
45246  if test "x$new_path" = x; then
45247    # Oops. Which didn't find the executable.
45248    # The splitting of arguments from the executable at a space might have been incorrect,
45249    # since paths with space are more likely in Windows. Give it another try with the whole
45250    # argument.
45251    path="$complete"
45252    arguments="EOL"
45253    new_path=`$CYGPATH -u "$path"`
45254    new_path=`$WHICH "$new_path" 2> /dev/null`
45255    # bat and cmd files are not always considered executable in cygwin causing which
45256    # to not find them
45257    if test "x$new_path" = x \
45258        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45259        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45260      new_path=`$CYGPATH -u "$path"`
45261    fi
45262    if test "x$new_path" = x; then
45263      # It's still not found. Now this is an unrecoverable error.
45264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45265$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45266      has_space=`$ECHO "$complete" | $GREP " "`
45267      if test "x$has_space" != x; then
45268        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45269$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45270      fi
45271      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45272    fi
45273  fi
45274
45275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45278  # "foo.exe" is OK but "foo" is an error.
45279  #
45280  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45281  # It is also a way to make sure we got the proper file name for the real test later on.
45282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45283  if test "x$test_shortpath" = x; then
45284    # Short path failed, file does not exist as specified.
45285    # Try adding .exe or .cmd
45286    if test -f "${new_path}.exe"; then
45287      input_to_shortpath="${new_path}.exe"
45288    elif test -f "${new_path}.cmd"; then
45289      input_to_shortpath="${new_path}.cmd"
45290    else
45291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45292$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45293      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45294$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45295      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45296    fi
45297  else
45298    input_to_shortpath="$new_path"
45299  fi
45300
45301  # Call helper function which possibly converts this using DOS-style short mode.
45302  # If so, the updated path is stored in $new_path.
45303  new_path="$input_to_shortpath"
45304
45305  input_path="$input_to_shortpath"
45306  # Check if we need to convert this using DOS-style short mode. If the path
45307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45308  # take no chances and rewrite it.
45309  # Note: m4 eats our [], so we need to use [ and ] instead.
45310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45311  if test "x$has_forbidden_chars" != x; then
45312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45313    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45314    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45315    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45316      # Going to short mode and back again did indeed matter. Since short mode is
45317      # case insensitive, let's make it lowercase to improve readability.
45318      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45319      # Now convert it back to Unix-style (cygpath)
45320      input_path=`$CYGPATH -u "$shortmode_path"`
45321      new_path="$input_path"
45322    fi
45323  fi
45324
45325  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45326  if test "x$test_cygdrive_prefix" = x; then
45327    # As a simple fix, exclude /usr/bin since it's not a real path.
45328    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45329      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45330      # a path prefixed by /cygdrive for fixpath to work.
45331      new_path="$CYGWIN_ROOT_PATH$input_path"
45332    fi
45333  fi
45334
45335  # remove trailing .exe if any
45336  new_path="${new_path/%.exe/}"
45337
45338    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45339
45340  # First separate the path from the arguments. This will split at the first
45341  # space.
45342  complete="$BUILD_NM"
45343  path="${complete%% *}"
45344  tmp="$complete EOL"
45345  arguments="${tmp#* }"
45346
45347  # Input might be given as Windows format, start by converting to
45348  # unix format.
45349  new_path="$path"
45350
45351  windows_path="$new_path"
45352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45353    unix_path=`$CYGPATH -u "$windows_path"`
45354    new_path="$unix_path"
45355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45357    new_path="$unix_path"
45358  fi
45359
45360
45361  # Now try to locate executable using which
45362  new_path=`$WHICH "$new_path" 2> /dev/null`
45363
45364  if test "x$new_path" = x; then
45365    # Oops. Which didn't find the executable.
45366    # The splitting of arguments from the executable at a space might have been incorrect,
45367    # since paths with space are more likely in Windows. Give it another try with the whole
45368    # argument.
45369    path="$complete"
45370    arguments="EOL"
45371    new_path="$path"
45372
45373  windows_path="$new_path"
45374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45375    unix_path=`$CYGPATH -u "$windows_path"`
45376    new_path="$unix_path"
45377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45379    new_path="$unix_path"
45380  fi
45381
45382
45383    new_path=`$WHICH "$new_path" 2> /dev/null`
45384    # bat and cmd files are not always considered executable in MSYS causing which
45385    # to not find them
45386    if test "x$new_path" = x \
45387        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45388        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45389      new_path="$path"
45390
45391  windows_path="$new_path"
45392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45393    unix_path=`$CYGPATH -u "$windows_path"`
45394    new_path="$unix_path"
45395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45397    new_path="$unix_path"
45398  fi
45399
45400    fi
45401
45402    if test "x$new_path" = x; then
45403      # It's still not found. Now this is an unrecoverable error.
45404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45405$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45406      has_space=`$ECHO "$complete" | $GREP " "`
45407      if test "x$has_space" != x; then
45408        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45409$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45410      fi
45411      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45412    fi
45413  fi
45414
45415  # Now new_path has a complete unix path to the binary
45416  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45417    # Keep paths in /bin as-is, but remove trailing .exe if any
45418    new_path="${new_path/%.exe/}"
45419    # Do not save /bin paths to all_fixpath_prefixes!
45420  else
45421    # Not in mixed or Windows style, start by that.
45422    new_path=`cmd //c echo $new_path`
45423
45424  input_path="$new_path"
45425  # Check if we need to convert this using DOS-style short mode. If the path
45426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45427  # take no chances and rewrite it.
45428  # Note: m4 eats our [], so we need to use [ and ] instead.
45429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45430  if test "x$has_forbidden_chars" != x; then
45431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45432    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45433  fi
45434
45435    # Output is in $new_path
45436
45437  windows_path="$new_path"
45438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45439    unix_path=`$CYGPATH -u "$windows_path"`
45440    new_path="$unix_path"
45441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45443    new_path="$unix_path"
45444  fi
45445
45446    # remove trailing .exe if any
45447    new_path="${new_path/%.exe/}"
45448
45449    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45450    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45451  fi
45452
45453    else
45454      # We're on a unix platform. Hooray! :)
45455      # First separate the path from the arguments. This will split at the first
45456      # space.
45457      complete="$BUILD_NM"
45458      path="${complete%% *}"
45459      tmp="$complete EOL"
45460      arguments="${tmp#* }"
45461
45462      # Cannot rely on the command "which" here since it doesn't always work.
45463      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45464      if test -z "$is_absolute_path"; then
45465        # Path to executable is not absolute. Find it.
45466        IFS_save="$IFS"
45467        IFS=:
45468        for p in $PATH; do
45469          if test -f "$p/$path" && test -x "$p/$path"; then
45470            new_path="$p/$path"
45471            break
45472          fi
45473        done
45474        IFS="$IFS_save"
45475      else
45476        # This is an absolute path, we can use it without further modifications.
45477        new_path="$path"
45478      fi
45479
45480      if test "x$new_path" = x; then
45481        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45482$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45483        has_space=`$ECHO "$complete" | $GREP " "`
45484        if test "x$has_space" != x; then
45485          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45486$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45487        fi
45488        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45489      fi
45490    fi
45491
45492    # Now join together the path and the arguments once again
45493    if test "x$arguments" != xEOL; then
45494      new_complete="$new_path ${arguments% *}"
45495    else
45496      new_complete="$new_path"
45497    fi
45498
45499    if test "x$complete" != "x$new_complete"; then
45500      BUILD_NM="$new_complete"
45501      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45502$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45503    fi
45504  fi
45505
45506
45507
45508  # Publish this variable in the help.
45509
45510
45511  if [ -z "${BUILD_AR+x}" ]; then
45512    # The variable is not set by user, try to locate tool using the code snippet
45513    for ac_prog in ar gcc-ar
45514do
45515  # Extract the first word of "$ac_prog", so it can be a program name with args.
45516set dummy $ac_prog; ac_word=$2
45517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45518$as_echo_n "checking for $ac_word... " >&6; }
45519if ${ac_cv_path_BUILD_AR+:} false; then :
45520  $as_echo_n "(cached) " >&6
45521else
45522  case $BUILD_AR in
45523  [\\/]* | ?:[\\/]*)
45524  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45525  ;;
45526  *)
45527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45528for as_dir in $PATH
45529do
45530  IFS=$as_save_IFS
45531  test -z "$as_dir" && as_dir=.
45532    for ac_exec_ext in '' $ac_executable_extensions; do
45533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45534    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45536    break 2
45537  fi
45538done
45539  done
45540IFS=$as_save_IFS
45541
45542  ;;
45543esac
45544fi
45545BUILD_AR=$ac_cv_path_BUILD_AR
45546if test -n "$BUILD_AR"; then
45547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45548$as_echo "$BUILD_AR" >&6; }
45549else
45550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45551$as_echo "no" >&6; }
45552fi
45553
45554
45555  test -n "$BUILD_AR" && break
45556done
45557
45558  else
45559    # The variable is set, but is it from the command line or the environment?
45560
45561    # Try to remove the string !BUILD_AR! from our list.
45562    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45563    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45564      # If it failed, the variable was not from the command line. Ignore it,
45565      # but warn the user (except for BASH, which is always set by the calling BASH).
45566      if test "xBUILD_AR" != xBASH; then
45567        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45568$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45569      fi
45570      # Try to locate tool using the code snippet
45571      for ac_prog in ar gcc-ar
45572do
45573  # Extract the first word of "$ac_prog", so it can be a program name with args.
45574set dummy $ac_prog; ac_word=$2
45575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45576$as_echo_n "checking for $ac_word... " >&6; }
45577if ${ac_cv_path_BUILD_AR+:} false; then :
45578  $as_echo_n "(cached) " >&6
45579else
45580  case $BUILD_AR in
45581  [\\/]* | ?:[\\/]*)
45582  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45583  ;;
45584  *)
45585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45586for as_dir in $PATH
45587do
45588  IFS=$as_save_IFS
45589  test -z "$as_dir" && as_dir=.
45590    for ac_exec_ext in '' $ac_executable_extensions; do
45591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45592    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45594    break 2
45595  fi
45596done
45597  done
45598IFS=$as_save_IFS
45599
45600  ;;
45601esac
45602fi
45603BUILD_AR=$ac_cv_path_BUILD_AR
45604if test -n "$BUILD_AR"; then
45605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45606$as_echo "$BUILD_AR" >&6; }
45607else
45608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45609$as_echo "no" >&6; }
45610fi
45611
45612
45613  test -n "$BUILD_AR" && break
45614done
45615
45616    else
45617      # If it succeeded, then it was overridden by the user. We will use it
45618      # for the tool.
45619
45620      # First remove it from the list of overridden variables, so we can test
45621      # for unknown variables in the end.
45622      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45623
45624      # Check if we try to supply an empty value
45625      if test "x$BUILD_AR" = x; then
45626        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45627$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45628        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45629$as_echo_n "checking for BUILD_AR... " >&6; }
45630        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45631$as_echo "disabled" >&6; }
45632      else
45633        # Check if the provided tool contains a complete path.
45634        tool_specified="$BUILD_AR"
45635        tool_basename="${tool_specified##*/}"
45636        if test "x$tool_basename" = "x$tool_specified"; then
45637          # A command without a complete path is provided, search $PATH.
45638          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45639$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45640          # Extract the first word of "$tool_basename", so it can be a program name with args.
45641set dummy $tool_basename; ac_word=$2
45642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45643$as_echo_n "checking for $ac_word... " >&6; }
45644if ${ac_cv_path_BUILD_AR+:} false; then :
45645  $as_echo_n "(cached) " >&6
45646else
45647  case $BUILD_AR in
45648  [\\/]* | ?:[\\/]*)
45649  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45650  ;;
45651  *)
45652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45653for as_dir in $PATH
45654do
45655  IFS=$as_save_IFS
45656  test -z "$as_dir" && as_dir=.
45657    for ac_exec_ext in '' $ac_executable_extensions; do
45658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45659    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45661    break 2
45662  fi
45663done
45664  done
45665IFS=$as_save_IFS
45666
45667  ;;
45668esac
45669fi
45670BUILD_AR=$ac_cv_path_BUILD_AR
45671if test -n "$BUILD_AR"; then
45672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45673$as_echo "$BUILD_AR" >&6; }
45674else
45675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45676$as_echo "no" >&6; }
45677fi
45678
45679
45680          if test "x$BUILD_AR" = x; then
45681            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45682          fi
45683        else
45684          # Otherwise we believe it is a complete path. Use it as it is.
45685          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45686$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45687          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45688$as_echo_n "checking for BUILD_AR... " >&6; }
45689          if test ! -x "$tool_specified"; then
45690            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45691$as_echo "not found" >&6; }
45692            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45693          fi
45694          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45695$as_echo "$tool_specified" >&6; }
45696        fi
45697      fi
45698    fi
45699
45700  fi
45701
45702
45703
45704  # Only process if variable expands to non-empty
45705
45706  if test "x$BUILD_AR" != x; then
45707    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45708
45709  # First separate the path from the arguments. This will split at the first
45710  # space.
45711  complete="$BUILD_AR"
45712  path="${complete%% *}"
45713  tmp="$complete EOL"
45714  arguments="${tmp#* }"
45715
45716  # Input might be given as Windows format, start by converting to
45717  # unix format.
45718  new_path=`$CYGPATH -u "$path"`
45719
45720  # Now try to locate executable using which
45721  new_path=`$WHICH "$new_path" 2> /dev/null`
45722  # bat and cmd files are not always considered executable in cygwin causing which
45723  # to not find them
45724  if test "x$new_path" = x \
45725      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45726      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45727    new_path=`$CYGPATH -u "$path"`
45728  fi
45729  if test "x$new_path" = x; then
45730    # Oops. Which didn't find the executable.
45731    # The splitting of arguments from the executable at a space might have been incorrect,
45732    # since paths with space are more likely in Windows. Give it another try with the whole
45733    # argument.
45734    path="$complete"
45735    arguments="EOL"
45736    new_path=`$CYGPATH -u "$path"`
45737    new_path=`$WHICH "$new_path" 2> /dev/null`
45738    # bat and cmd files are not always considered executable in cygwin causing which
45739    # to not find them
45740    if test "x$new_path" = x \
45741        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45742        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45743      new_path=`$CYGPATH -u "$path"`
45744    fi
45745    if test "x$new_path" = x; then
45746      # It's still not found. Now this is an unrecoverable error.
45747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45748$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45749      has_space=`$ECHO "$complete" | $GREP " "`
45750      if test "x$has_space" != x; then
45751        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45752$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45753      fi
45754      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45755    fi
45756  fi
45757
45758  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45759  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45760  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45761  # "foo.exe" is OK but "foo" is an error.
45762  #
45763  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45764  # It is also a way to make sure we got the proper file name for the real test later on.
45765  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45766  if test "x$test_shortpath" = x; then
45767    # Short path failed, file does not exist as specified.
45768    # Try adding .exe or .cmd
45769    if test -f "${new_path}.exe"; then
45770      input_to_shortpath="${new_path}.exe"
45771    elif test -f "${new_path}.cmd"; then
45772      input_to_shortpath="${new_path}.cmd"
45773    else
45774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45775$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45776      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45777$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45778      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45779    fi
45780  else
45781    input_to_shortpath="$new_path"
45782  fi
45783
45784  # Call helper function which possibly converts this using DOS-style short mode.
45785  # If so, the updated path is stored in $new_path.
45786  new_path="$input_to_shortpath"
45787
45788  input_path="$input_to_shortpath"
45789  # Check if we need to convert this using DOS-style short mode. If the path
45790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45791  # take no chances and rewrite it.
45792  # Note: m4 eats our [], so we need to use [ and ] instead.
45793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45794  if test "x$has_forbidden_chars" != x; then
45795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45796    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45797    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45798    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45799      # Going to short mode and back again did indeed matter. Since short mode is
45800      # case insensitive, let's make it lowercase to improve readability.
45801      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45802      # Now convert it back to Unix-style (cygpath)
45803      input_path=`$CYGPATH -u "$shortmode_path"`
45804      new_path="$input_path"
45805    fi
45806  fi
45807
45808  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45809  if test "x$test_cygdrive_prefix" = x; then
45810    # As a simple fix, exclude /usr/bin since it's not a real path.
45811    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45812      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45813      # a path prefixed by /cygdrive for fixpath to work.
45814      new_path="$CYGWIN_ROOT_PATH$input_path"
45815    fi
45816  fi
45817
45818  # remove trailing .exe if any
45819  new_path="${new_path/%.exe/}"
45820
45821    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45822
45823  # First separate the path from the arguments. This will split at the first
45824  # space.
45825  complete="$BUILD_AR"
45826  path="${complete%% *}"
45827  tmp="$complete EOL"
45828  arguments="${tmp#* }"
45829
45830  # Input might be given as Windows format, start by converting to
45831  # unix format.
45832  new_path="$path"
45833
45834  windows_path="$new_path"
45835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45836    unix_path=`$CYGPATH -u "$windows_path"`
45837    new_path="$unix_path"
45838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45840    new_path="$unix_path"
45841  fi
45842
45843
45844  # Now try to locate executable using which
45845  new_path=`$WHICH "$new_path" 2> /dev/null`
45846
45847  if test "x$new_path" = x; then
45848    # Oops. Which didn't find the executable.
45849    # The splitting of arguments from the executable at a space might have been incorrect,
45850    # since paths with space are more likely in Windows. Give it another try with the whole
45851    # argument.
45852    path="$complete"
45853    arguments="EOL"
45854    new_path="$path"
45855
45856  windows_path="$new_path"
45857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45858    unix_path=`$CYGPATH -u "$windows_path"`
45859    new_path="$unix_path"
45860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45862    new_path="$unix_path"
45863  fi
45864
45865
45866    new_path=`$WHICH "$new_path" 2> /dev/null`
45867    # bat and cmd files are not always considered executable in MSYS causing which
45868    # to not find them
45869    if test "x$new_path" = x \
45870        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45871        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45872      new_path="$path"
45873
45874  windows_path="$new_path"
45875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45876    unix_path=`$CYGPATH -u "$windows_path"`
45877    new_path="$unix_path"
45878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45880    new_path="$unix_path"
45881  fi
45882
45883    fi
45884
45885    if test "x$new_path" = x; then
45886      # It's still not found. Now this is an unrecoverable error.
45887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45888$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45889      has_space=`$ECHO "$complete" | $GREP " "`
45890      if test "x$has_space" != x; then
45891        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45892$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45893      fi
45894      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45895    fi
45896  fi
45897
45898  # Now new_path has a complete unix path to the binary
45899  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45900    # Keep paths in /bin as-is, but remove trailing .exe if any
45901    new_path="${new_path/%.exe/}"
45902    # Do not save /bin paths to all_fixpath_prefixes!
45903  else
45904    # Not in mixed or Windows style, start by that.
45905    new_path=`cmd //c echo $new_path`
45906
45907  input_path="$new_path"
45908  # Check if we need to convert this using DOS-style short mode. If the path
45909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45910  # take no chances and rewrite it.
45911  # Note: m4 eats our [], so we need to use [ and ] instead.
45912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45913  if test "x$has_forbidden_chars" != x; then
45914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45916  fi
45917
45918    # Output is in $new_path
45919
45920  windows_path="$new_path"
45921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45922    unix_path=`$CYGPATH -u "$windows_path"`
45923    new_path="$unix_path"
45924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45926    new_path="$unix_path"
45927  fi
45928
45929    # remove trailing .exe if any
45930    new_path="${new_path/%.exe/}"
45931
45932    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45933    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45934  fi
45935
45936    else
45937      # We're on a unix platform. Hooray! :)
45938      # First separate the path from the arguments. This will split at the first
45939      # space.
45940      complete="$BUILD_AR"
45941      path="${complete%% *}"
45942      tmp="$complete EOL"
45943      arguments="${tmp#* }"
45944
45945      # Cannot rely on the command "which" here since it doesn't always work.
45946      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45947      if test -z "$is_absolute_path"; then
45948        # Path to executable is not absolute. Find it.
45949        IFS_save="$IFS"
45950        IFS=:
45951        for p in $PATH; do
45952          if test -f "$p/$path" && test -x "$p/$path"; then
45953            new_path="$p/$path"
45954            break
45955          fi
45956        done
45957        IFS="$IFS_save"
45958      else
45959        # This is an absolute path, we can use it without further modifications.
45960        new_path="$path"
45961      fi
45962
45963      if test "x$new_path" = x; then
45964        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45965$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45966        has_space=`$ECHO "$complete" | $GREP " "`
45967        if test "x$has_space" != x; then
45968          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45969$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45970        fi
45971        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45972      fi
45973    fi
45974
45975    # Now join together the path and the arguments once again
45976    if test "x$arguments" != xEOL; then
45977      new_complete="$new_path ${arguments% *}"
45978    else
45979      new_complete="$new_path"
45980    fi
45981
45982    if test "x$complete" != "x$new_complete"; then
45983      BUILD_AR="$new_complete"
45984      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45985$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45986    fi
45987  fi
45988
45989
45990
45991  # Publish this variable in the help.
45992
45993
45994  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45995    # The variable is not set by user, try to locate tool using the code snippet
45996    for ac_prog in objcopy
45997do
45998  # Extract the first word of "$ac_prog", so it can be a program name with args.
45999set dummy $ac_prog; ac_word=$2
46000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46001$as_echo_n "checking for $ac_word... " >&6; }
46002if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46003  $as_echo_n "(cached) " >&6
46004else
46005  case $BUILD_OBJCOPY in
46006  [\\/]* | ?:[\\/]*)
46007  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46008  ;;
46009  *)
46010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46011for as_dir in $PATH
46012do
46013  IFS=$as_save_IFS
46014  test -z "$as_dir" && as_dir=.
46015    for ac_exec_ext in '' $ac_executable_extensions; do
46016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46017    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46019    break 2
46020  fi
46021done
46022  done
46023IFS=$as_save_IFS
46024
46025  ;;
46026esac
46027fi
46028BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46029if test -n "$BUILD_OBJCOPY"; then
46030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46031$as_echo "$BUILD_OBJCOPY" >&6; }
46032else
46033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46034$as_echo "no" >&6; }
46035fi
46036
46037
46038  test -n "$BUILD_OBJCOPY" && break
46039done
46040
46041  else
46042    # The variable is set, but is it from the command line or the environment?
46043
46044    # Try to remove the string !BUILD_OBJCOPY! from our list.
46045    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46046    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46047      # If it failed, the variable was not from the command line. Ignore it,
46048      # but warn the user (except for BASH, which is always set by the calling BASH).
46049      if test "xBUILD_OBJCOPY" != xBASH; then
46050        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46051$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46052      fi
46053      # Try to locate tool using the code snippet
46054      for ac_prog in objcopy
46055do
46056  # Extract the first word of "$ac_prog", so it can be a program name with args.
46057set dummy $ac_prog; ac_word=$2
46058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46059$as_echo_n "checking for $ac_word... " >&6; }
46060if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46061  $as_echo_n "(cached) " >&6
46062else
46063  case $BUILD_OBJCOPY in
46064  [\\/]* | ?:[\\/]*)
46065  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46066  ;;
46067  *)
46068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46069for as_dir in $PATH
46070do
46071  IFS=$as_save_IFS
46072  test -z "$as_dir" && as_dir=.
46073    for ac_exec_ext in '' $ac_executable_extensions; do
46074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46075    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46077    break 2
46078  fi
46079done
46080  done
46081IFS=$as_save_IFS
46082
46083  ;;
46084esac
46085fi
46086BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46087if test -n "$BUILD_OBJCOPY"; then
46088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46089$as_echo "$BUILD_OBJCOPY" >&6; }
46090else
46091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46092$as_echo "no" >&6; }
46093fi
46094
46095
46096  test -n "$BUILD_OBJCOPY" && break
46097done
46098
46099    else
46100      # If it succeeded, then it was overridden by the user. We will use it
46101      # for the tool.
46102
46103      # First remove it from the list of overridden variables, so we can test
46104      # for unknown variables in the end.
46105      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46106
46107      # Check if we try to supply an empty value
46108      if test "x$BUILD_OBJCOPY" = x; then
46109        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46110$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46111        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46112$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46113        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46114$as_echo "disabled" >&6; }
46115      else
46116        # Check if the provided tool contains a complete path.
46117        tool_specified="$BUILD_OBJCOPY"
46118        tool_basename="${tool_specified##*/}"
46119        if test "x$tool_basename" = "x$tool_specified"; then
46120          # A command without a complete path is provided, search $PATH.
46121          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46122$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46123          # Extract the first word of "$tool_basename", so it can be a program name with args.
46124set dummy $tool_basename; ac_word=$2
46125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46126$as_echo_n "checking for $ac_word... " >&6; }
46127if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46128  $as_echo_n "(cached) " >&6
46129else
46130  case $BUILD_OBJCOPY in
46131  [\\/]* | ?:[\\/]*)
46132  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46133  ;;
46134  *)
46135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46136for as_dir in $PATH
46137do
46138  IFS=$as_save_IFS
46139  test -z "$as_dir" && as_dir=.
46140    for ac_exec_ext in '' $ac_executable_extensions; do
46141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46142    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46144    break 2
46145  fi
46146done
46147  done
46148IFS=$as_save_IFS
46149
46150  ;;
46151esac
46152fi
46153BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46154if test -n "$BUILD_OBJCOPY"; then
46155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46156$as_echo "$BUILD_OBJCOPY" >&6; }
46157else
46158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46159$as_echo "no" >&6; }
46160fi
46161
46162
46163          if test "x$BUILD_OBJCOPY" = x; then
46164            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46165          fi
46166        else
46167          # Otherwise we believe it is a complete path. Use it as it is.
46168          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46169$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46170          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46171$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46172          if test ! -x "$tool_specified"; then
46173            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46174$as_echo "not found" >&6; }
46175            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46176          fi
46177          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46178$as_echo "$tool_specified" >&6; }
46179        fi
46180      fi
46181    fi
46182
46183  fi
46184
46185
46186
46187  # Only process if variable expands to non-empty
46188
46189  if test "x$BUILD_OBJCOPY" != x; then
46190    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46191
46192  # First separate the path from the arguments. This will split at the first
46193  # space.
46194  complete="$BUILD_OBJCOPY"
46195  path="${complete%% *}"
46196  tmp="$complete EOL"
46197  arguments="${tmp#* }"
46198
46199  # Input might be given as Windows format, start by converting to
46200  # unix format.
46201  new_path=`$CYGPATH -u "$path"`
46202
46203  # Now try to locate executable using which
46204  new_path=`$WHICH "$new_path" 2> /dev/null`
46205  # bat and cmd files are not always considered executable in cygwin causing which
46206  # to not find them
46207  if test "x$new_path" = x \
46208      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46209      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46210    new_path=`$CYGPATH -u "$path"`
46211  fi
46212  if test "x$new_path" = x; then
46213    # Oops. Which didn't find the executable.
46214    # The splitting of arguments from the executable at a space might have been incorrect,
46215    # since paths with space are more likely in Windows. Give it another try with the whole
46216    # argument.
46217    path="$complete"
46218    arguments="EOL"
46219    new_path=`$CYGPATH -u "$path"`
46220    new_path=`$WHICH "$new_path" 2> /dev/null`
46221    # bat and cmd files are not always considered executable in cygwin causing which
46222    # to not find them
46223    if test "x$new_path" = x \
46224        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46225        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46226      new_path=`$CYGPATH -u "$path"`
46227    fi
46228    if test "x$new_path" = x; then
46229      # It's still not found. Now this is an unrecoverable error.
46230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46231$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46232      has_space=`$ECHO "$complete" | $GREP " "`
46233      if test "x$has_space" != x; then
46234        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46235$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46236      fi
46237      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46238    fi
46239  fi
46240
46241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46244  # "foo.exe" is OK but "foo" is an error.
46245  #
46246  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46247  # It is also a way to make sure we got the proper file name for the real test later on.
46248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46249  if test "x$test_shortpath" = x; then
46250    # Short path failed, file does not exist as specified.
46251    # Try adding .exe or .cmd
46252    if test -f "${new_path}.exe"; then
46253      input_to_shortpath="${new_path}.exe"
46254    elif test -f "${new_path}.cmd"; then
46255      input_to_shortpath="${new_path}.cmd"
46256    else
46257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46258$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46259      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46260$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46261      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46262    fi
46263  else
46264    input_to_shortpath="$new_path"
46265  fi
46266
46267  # Call helper function which possibly converts this using DOS-style short mode.
46268  # If so, the updated path is stored in $new_path.
46269  new_path="$input_to_shortpath"
46270
46271  input_path="$input_to_shortpath"
46272  # Check if we need to convert this using DOS-style short mode. If the path
46273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46274  # take no chances and rewrite it.
46275  # Note: m4 eats our [], so we need to use [ and ] instead.
46276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46277  if test "x$has_forbidden_chars" != x; then
46278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46279    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46280    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46281    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46282      # Going to short mode and back again did indeed matter. Since short mode is
46283      # case insensitive, let's make it lowercase to improve readability.
46284      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46285      # Now convert it back to Unix-style (cygpath)
46286      input_path=`$CYGPATH -u "$shortmode_path"`
46287      new_path="$input_path"
46288    fi
46289  fi
46290
46291  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46292  if test "x$test_cygdrive_prefix" = x; then
46293    # As a simple fix, exclude /usr/bin since it's not a real path.
46294    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46295      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46296      # a path prefixed by /cygdrive for fixpath to work.
46297      new_path="$CYGWIN_ROOT_PATH$input_path"
46298    fi
46299  fi
46300
46301  # remove trailing .exe if any
46302  new_path="${new_path/%.exe/}"
46303
46304    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46305
46306  # First separate the path from the arguments. This will split at the first
46307  # space.
46308  complete="$BUILD_OBJCOPY"
46309  path="${complete%% *}"
46310  tmp="$complete EOL"
46311  arguments="${tmp#* }"
46312
46313  # Input might be given as Windows format, start by converting to
46314  # unix format.
46315  new_path="$path"
46316
46317  windows_path="$new_path"
46318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46319    unix_path=`$CYGPATH -u "$windows_path"`
46320    new_path="$unix_path"
46321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46323    new_path="$unix_path"
46324  fi
46325
46326
46327  # Now try to locate executable using which
46328  new_path=`$WHICH "$new_path" 2> /dev/null`
46329
46330  if test "x$new_path" = x; then
46331    # Oops. Which didn't find the executable.
46332    # The splitting of arguments from the executable at a space might have been incorrect,
46333    # since paths with space are more likely in Windows. Give it another try with the whole
46334    # argument.
46335    path="$complete"
46336    arguments="EOL"
46337    new_path="$path"
46338
46339  windows_path="$new_path"
46340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46341    unix_path=`$CYGPATH -u "$windows_path"`
46342    new_path="$unix_path"
46343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46345    new_path="$unix_path"
46346  fi
46347
46348
46349    new_path=`$WHICH "$new_path" 2> /dev/null`
46350    # bat and cmd files are not always considered executable in MSYS causing which
46351    # to not find them
46352    if test "x$new_path" = x \
46353        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46354        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46355      new_path="$path"
46356
46357  windows_path="$new_path"
46358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46359    unix_path=`$CYGPATH -u "$windows_path"`
46360    new_path="$unix_path"
46361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46363    new_path="$unix_path"
46364  fi
46365
46366    fi
46367
46368    if test "x$new_path" = x; then
46369      # It's still not found. Now this is an unrecoverable error.
46370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46371$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46372      has_space=`$ECHO "$complete" | $GREP " "`
46373      if test "x$has_space" != x; then
46374        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46375$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46376      fi
46377      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46378    fi
46379  fi
46380
46381  # Now new_path has a complete unix path to the binary
46382  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46383    # Keep paths in /bin as-is, but remove trailing .exe if any
46384    new_path="${new_path/%.exe/}"
46385    # Do not save /bin paths to all_fixpath_prefixes!
46386  else
46387    # Not in mixed or Windows style, start by that.
46388    new_path=`cmd //c echo $new_path`
46389
46390  input_path="$new_path"
46391  # Check if we need to convert this using DOS-style short mode. If the path
46392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46393  # take no chances and rewrite it.
46394  # Note: m4 eats our [], so we need to use [ and ] instead.
46395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46396  if test "x$has_forbidden_chars" != x; then
46397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46399  fi
46400
46401    # Output is in $new_path
46402
46403  windows_path="$new_path"
46404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46405    unix_path=`$CYGPATH -u "$windows_path"`
46406    new_path="$unix_path"
46407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46409    new_path="$unix_path"
46410  fi
46411
46412    # remove trailing .exe if any
46413    new_path="${new_path/%.exe/}"
46414
46415    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46416    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46417  fi
46418
46419    else
46420      # We're on a unix platform. Hooray! :)
46421      # First separate the path from the arguments. This will split at the first
46422      # space.
46423      complete="$BUILD_OBJCOPY"
46424      path="${complete%% *}"
46425      tmp="$complete EOL"
46426      arguments="${tmp#* }"
46427
46428      # Cannot rely on the command "which" here since it doesn't always work.
46429      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46430      if test -z "$is_absolute_path"; then
46431        # Path to executable is not absolute. Find it.
46432        IFS_save="$IFS"
46433        IFS=:
46434        for p in $PATH; do
46435          if test -f "$p/$path" && test -x "$p/$path"; then
46436            new_path="$p/$path"
46437            break
46438          fi
46439        done
46440        IFS="$IFS_save"
46441      else
46442        # This is an absolute path, we can use it without further modifications.
46443        new_path="$path"
46444      fi
46445
46446      if test "x$new_path" = x; then
46447        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46448$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46449        has_space=`$ECHO "$complete" | $GREP " "`
46450        if test "x$has_space" != x; then
46451          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46452$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46453        fi
46454        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46455      fi
46456    fi
46457
46458    # Now join together the path and the arguments once again
46459    if test "x$arguments" != xEOL; then
46460      new_complete="$new_path ${arguments% *}"
46461    else
46462      new_complete="$new_path"
46463    fi
46464
46465    if test "x$complete" != "x$new_complete"; then
46466      BUILD_OBJCOPY="$new_complete"
46467      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46468$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46469    fi
46470  fi
46471
46472
46473
46474  # Publish this variable in the help.
46475
46476
46477  if [ -z "${BUILD_STRIP+x}" ]; then
46478    # The variable is not set by user, try to locate tool using the code snippet
46479    for ac_prog in strip
46480do
46481  # Extract the first word of "$ac_prog", so it can be a program name with args.
46482set dummy $ac_prog; ac_word=$2
46483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46484$as_echo_n "checking for $ac_word... " >&6; }
46485if ${ac_cv_path_BUILD_STRIP+:} false; then :
46486  $as_echo_n "(cached) " >&6
46487else
46488  case $BUILD_STRIP in
46489  [\\/]* | ?:[\\/]*)
46490  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46491  ;;
46492  *)
46493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46494for as_dir in $PATH
46495do
46496  IFS=$as_save_IFS
46497  test -z "$as_dir" && as_dir=.
46498    for ac_exec_ext in '' $ac_executable_extensions; do
46499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46500    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46502    break 2
46503  fi
46504done
46505  done
46506IFS=$as_save_IFS
46507
46508  ;;
46509esac
46510fi
46511BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46512if test -n "$BUILD_STRIP"; then
46513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46514$as_echo "$BUILD_STRIP" >&6; }
46515else
46516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46517$as_echo "no" >&6; }
46518fi
46519
46520
46521  test -n "$BUILD_STRIP" && break
46522done
46523
46524  else
46525    # The variable is set, but is it from the command line or the environment?
46526
46527    # Try to remove the string !BUILD_STRIP! from our list.
46528    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46529    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46530      # If it failed, the variable was not from the command line. Ignore it,
46531      # but warn the user (except for BASH, which is always set by the calling BASH).
46532      if test "xBUILD_STRIP" != xBASH; then
46533        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46534$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46535      fi
46536      # Try to locate tool using the code snippet
46537      for ac_prog in strip
46538do
46539  # Extract the first word of "$ac_prog", so it can be a program name with args.
46540set dummy $ac_prog; ac_word=$2
46541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46542$as_echo_n "checking for $ac_word... " >&6; }
46543if ${ac_cv_path_BUILD_STRIP+:} false; then :
46544  $as_echo_n "(cached) " >&6
46545else
46546  case $BUILD_STRIP in
46547  [\\/]* | ?:[\\/]*)
46548  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46549  ;;
46550  *)
46551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46552for as_dir in $PATH
46553do
46554  IFS=$as_save_IFS
46555  test -z "$as_dir" && as_dir=.
46556    for ac_exec_ext in '' $ac_executable_extensions; do
46557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46558    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46560    break 2
46561  fi
46562done
46563  done
46564IFS=$as_save_IFS
46565
46566  ;;
46567esac
46568fi
46569BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46570if test -n "$BUILD_STRIP"; then
46571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46572$as_echo "$BUILD_STRIP" >&6; }
46573else
46574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46575$as_echo "no" >&6; }
46576fi
46577
46578
46579  test -n "$BUILD_STRIP" && break
46580done
46581
46582    else
46583      # If it succeeded, then it was overridden by the user. We will use it
46584      # for the tool.
46585
46586      # First remove it from the list of overridden variables, so we can test
46587      # for unknown variables in the end.
46588      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46589
46590      # Check if we try to supply an empty value
46591      if test "x$BUILD_STRIP" = x; then
46592        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46593$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46594        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46595$as_echo_n "checking for BUILD_STRIP... " >&6; }
46596        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46597$as_echo "disabled" >&6; }
46598      else
46599        # Check if the provided tool contains a complete path.
46600        tool_specified="$BUILD_STRIP"
46601        tool_basename="${tool_specified##*/}"
46602        if test "x$tool_basename" = "x$tool_specified"; then
46603          # A command without a complete path is provided, search $PATH.
46604          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46605$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46606          # Extract the first word of "$tool_basename", so it can be a program name with args.
46607set dummy $tool_basename; ac_word=$2
46608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46609$as_echo_n "checking for $ac_word... " >&6; }
46610if ${ac_cv_path_BUILD_STRIP+:} false; then :
46611  $as_echo_n "(cached) " >&6
46612else
46613  case $BUILD_STRIP in
46614  [\\/]* | ?:[\\/]*)
46615  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46616  ;;
46617  *)
46618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46619for as_dir in $PATH
46620do
46621  IFS=$as_save_IFS
46622  test -z "$as_dir" && as_dir=.
46623    for ac_exec_ext in '' $ac_executable_extensions; do
46624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46625    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46627    break 2
46628  fi
46629done
46630  done
46631IFS=$as_save_IFS
46632
46633  ;;
46634esac
46635fi
46636BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46637if test -n "$BUILD_STRIP"; then
46638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46639$as_echo "$BUILD_STRIP" >&6; }
46640else
46641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46642$as_echo "no" >&6; }
46643fi
46644
46645
46646          if test "x$BUILD_STRIP" = x; then
46647            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46648          fi
46649        else
46650          # Otherwise we believe it is a complete path. Use it as it is.
46651          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46652$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46653          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46654$as_echo_n "checking for BUILD_STRIP... " >&6; }
46655          if test ! -x "$tool_specified"; then
46656            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46657$as_echo "not found" >&6; }
46658            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46659          fi
46660          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46661$as_echo "$tool_specified" >&6; }
46662        fi
46663      fi
46664    fi
46665
46666  fi
46667
46668
46669
46670  # Only process if variable expands to non-empty
46671
46672  if test "x$BUILD_STRIP" != x; then
46673    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46674
46675  # First separate the path from the arguments. This will split at the first
46676  # space.
46677  complete="$BUILD_STRIP"
46678  path="${complete%% *}"
46679  tmp="$complete EOL"
46680  arguments="${tmp#* }"
46681
46682  # Input might be given as Windows format, start by converting to
46683  # unix format.
46684  new_path=`$CYGPATH -u "$path"`
46685
46686  # Now try to locate executable using which
46687  new_path=`$WHICH "$new_path" 2> /dev/null`
46688  # bat and cmd files are not always considered executable in cygwin causing which
46689  # to not find them
46690  if test "x$new_path" = x \
46691      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46692      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46693    new_path=`$CYGPATH -u "$path"`
46694  fi
46695  if test "x$new_path" = x; then
46696    # Oops. Which didn't find the executable.
46697    # The splitting of arguments from the executable at a space might have been incorrect,
46698    # since paths with space are more likely in Windows. Give it another try with the whole
46699    # argument.
46700    path="$complete"
46701    arguments="EOL"
46702    new_path=`$CYGPATH -u "$path"`
46703    new_path=`$WHICH "$new_path" 2> /dev/null`
46704    # bat and cmd files are not always considered executable in cygwin causing which
46705    # to not find them
46706    if test "x$new_path" = x \
46707        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46708        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46709      new_path=`$CYGPATH -u "$path"`
46710    fi
46711    if test "x$new_path" = x; then
46712      # It's still not found. Now this is an unrecoverable error.
46713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46714$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46715      has_space=`$ECHO "$complete" | $GREP " "`
46716      if test "x$has_space" != x; then
46717        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46718$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46719      fi
46720      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46721    fi
46722  fi
46723
46724  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46725  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46726  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46727  # "foo.exe" is OK but "foo" is an error.
46728  #
46729  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46730  # It is also a way to make sure we got the proper file name for the real test later on.
46731  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46732  if test "x$test_shortpath" = x; then
46733    # Short path failed, file does not exist as specified.
46734    # Try adding .exe or .cmd
46735    if test -f "${new_path}.exe"; then
46736      input_to_shortpath="${new_path}.exe"
46737    elif test -f "${new_path}.cmd"; then
46738      input_to_shortpath="${new_path}.cmd"
46739    else
46740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46741$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46742      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46743$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46744      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46745    fi
46746  else
46747    input_to_shortpath="$new_path"
46748  fi
46749
46750  # Call helper function which possibly converts this using DOS-style short mode.
46751  # If so, the updated path is stored in $new_path.
46752  new_path="$input_to_shortpath"
46753
46754  input_path="$input_to_shortpath"
46755  # Check if we need to convert this using DOS-style short mode. If the path
46756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46757  # take no chances and rewrite it.
46758  # Note: m4 eats our [], so we need to use [ and ] instead.
46759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46760  if test "x$has_forbidden_chars" != x; then
46761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46762    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46763    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46764    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46765      # Going to short mode and back again did indeed matter. Since short mode is
46766      # case insensitive, let's make it lowercase to improve readability.
46767      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46768      # Now convert it back to Unix-style (cygpath)
46769      input_path=`$CYGPATH -u "$shortmode_path"`
46770      new_path="$input_path"
46771    fi
46772  fi
46773
46774  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46775  if test "x$test_cygdrive_prefix" = x; then
46776    # As a simple fix, exclude /usr/bin since it's not a real path.
46777    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46778      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46779      # a path prefixed by /cygdrive for fixpath to work.
46780      new_path="$CYGWIN_ROOT_PATH$input_path"
46781    fi
46782  fi
46783
46784  # remove trailing .exe if any
46785  new_path="${new_path/%.exe/}"
46786
46787    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46788
46789  # First separate the path from the arguments. This will split at the first
46790  # space.
46791  complete="$BUILD_STRIP"
46792  path="${complete%% *}"
46793  tmp="$complete EOL"
46794  arguments="${tmp#* }"
46795
46796  # Input might be given as Windows format, start by converting to
46797  # unix format.
46798  new_path="$path"
46799
46800  windows_path="$new_path"
46801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46802    unix_path=`$CYGPATH -u "$windows_path"`
46803    new_path="$unix_path"
46804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46806    new_path="$unix_path"
46807  fi
46808
46809
46810  # Now try to locate executable using which
46811  new_path=`$WHICH "$new_path" 2> /dev/null`
46812
46813  if test "x$new_path" = x; then
46814    # Oops. Which didn't find the executable.
46815    # The splitting of arguments from the executable at a space might have been incorrect,
46816    # since paths with space are more likely in Windows. Give it another try with the whole
46817    # argument.
46818    path="$complete"
46819    arguments="EOL"
46820    new_path="$path"
46821
46822  windows_path="$new_path"
46823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46824    unix_path=`$CYGPATH -u "$windows_path"`
46825    new_path="$unix_path"
46826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46828    new_path="$unix_path"
46829  fi
46830
46831
46832    new_path=`$WHICH "$new_path" 2> /dev/null`
46833    # bat and cmd files are not always considered executable in MSYS causing which
46834    # to not find them
46835    if test "x$new_path" = x \
46836        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46837        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46838      new_path="$path"
46839
46840  windows_path="$new_path"
46841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46842    unix_path=`$CYGPATH -u "$windows_path"`
46843    new_path="$unix_path"
46844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46846    new_path="$unix_path"
46847  fi
46848
46849    fi
46850
46851    if test "x$new_path" = x; then
46852      # It's still not found. Now this is an unrecoverable error.
46853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46854$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46855      has_space=`$ECHO "$complete" | $GREP " "`
46856      if test "x$has_space" != x; then
46857        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46858$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46859      fi
46860      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46861    fi
46862  fi
46863
46864  # Now new_path has a complete unix path to the binary
46865  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46866    # Keep paths in /bin as-is, but remove trailing .exe if any
46867    new_path="${new_path/%.exe/}"
46868    # Do not save /bin paths to all_fixpath_prefixes!
46869  else
46870    # Not in mixed or Windows style, start by that.
46871    new_path=`cmd //c echo $new_path`
46872
46873  input_path="$new_path"
46874  # Check if we need to convert this using DOS-style short mode. If the path
46875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46876  # take no chances and rewrite it.
46877  # Note: m4 eats our [], so we need to use [ and ] instead.
46878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46879  if test "x$has_forbidden_chars" != x; then
46880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46882  fi
46883
46884    # Output is in $new_path
46885
46886  windows_path="$new_path"
46887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46888    unix_path=`$CYGPATH -u "$windows_path"`
46889    new_path="$unix_path"
46890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46892    new_path="$unix_path"
46893  fi
46894
46895    # remove trailing .exe if any
46896    new_path="${new_path/%.exe/}"
46897
46898    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46899    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46900  fi
46901
46902    else
46903      # We're on a unix platform. Hooray! :)
46904      # First separate the path from the arguments. This will split at the first
46905      # space.
46906      complete="$BUILD_STRIP"
46907      path="${complete%% *}"
46908      tmp="$complete EOL"
46909      arguments="${tmp#* }"
46910
46911      # Cannot rely on the command "which" here since it doesn't always work.
46912      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46913      if test -z "$is_absolute_path"; then
46914        # Path to executable is not absolute. Find it.
46915        IFS_save="$IFS"
46916        IFS=:
46917        for p in $PATH; do
46918          if test -f "$p/$path" && test -x "$p/$path"; then
46919            new_path="$p/$path"
46920            break
46921          fi
46922        done
46923        IFS="$IFS_save"
46924      else
46925        # This is an absolute path, we can use it without further modifications.
46926        new_path="$path"
46927      fi
46928
46929      if test "x$new_path" = x; then
46930        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46931$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46932        has_space=`$ECHO "$complete" | $GREP " "`
46933        if test "x$has_space" != x; then
46934          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46935$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46936        fi
46937        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46938      fi
46939    fi
46940
46941    # Now join together the path and the arguments once again
46942    if test "x$arguments" != xEOL; then
46943      new_complete="$new_path ${arguments% *}"
46944    else
46945      new_complete="$new_path"
46946    fi
46947
46948    if test "x$complete" != "x$new_complete"; then
46949      BUILD_STRIP="$new_complete"
46950      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46951$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46952    fi
46953  fi
46954
46955    # Assume the C compiler is the assembler
46956    BUILD_AS="$BUILD_CC -c"
46957    # Just like for the target compiler, use the compiler as linker
46958    BUILD_LD="$BUILD_CC"
46959    BUILD_LDCXX="$BUILD_CXX"
46960
46961    PATH="$OLDPATH"
46962
46963
46964  COMPILER=$BUILD_CC
46965  COMPILER_NAME=BuildC
46966
46967  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46968    # cc -V output typically looks like
46969    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46970    # or
46971    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
46972    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46973    # Check that this is likely to be the Solaris Studio cc.
46974    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
46975    if test $? -ne 0; then
46976      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46977      { $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
46978$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46979      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46980$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46981      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46982$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46983      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46984    fi
46985    # Remove usage instructions (if present), and
46986    # collapse compiler output into a single line
46987    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46988        $SED -e 's/ *[Uu]sage:.*//'`
46989    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46990        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46991  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46992    # xlc -qversion output typically looks like
46993    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46994    #     Version: 11.01.0000.0015
46995    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46996    # Check that this is likely to be the IBM XL C compiler.
46997    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46998    if test $? -ne 0; then
46999      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47000      { $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
47001$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47002      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47003$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47004      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47005$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47006      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47007    fi
47008    # Collapse compiler output into a single line
47009    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47010    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47011        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47012  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47013    # There is no specific version flag, but all output starts with a version string.
47014    # First line typically looks something like:
47015    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47016    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47017    # Check that this is likely to be Microsoft CL.EXE.
47018    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47019    if test $? -ne 0; then
47020      { $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
47021$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47022      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47023$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47024      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47025    fi
47026    # Collapse compiler output into a single line
47027    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47028    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47029        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47030  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47031    # gcc --version output typically looks like
47032    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47033    #     Copyright (C) 2013 Free Software Foundation, Inc.
47034    #     This is free software; see the source for copying conditions.  There is NO
47035    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47036    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47037    # Check that this is likely to be GCC.
47038    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47039    if test $? -ne 0; then
47040      { $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
47041$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47042      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47043$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47044      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47045    fi
47046    # Remove Copyright and legalese from version string, and
47047    # collapse into a single line
47048    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47049        $SED -e 's/ *Copyright .*//'`
47050    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47051        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47052  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47053    # clang --version output typically looks like
47054    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47055    #    clang version 3.3 (tags/RELEASE_33/final)
47056    # or
47057    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47058    #    Target: x86_64-pc-linux-gnu
47059    #    Thread model: posix
47060    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47061    # Check that this is likely to be clang
47062    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47063    if test $? -ne 0; then
47064      { $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
47065$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47066      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47067$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47068      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47069    fi
47070    # Collapse compiler output into a single line
47071    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47072    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47073        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47074  else
47075      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47076  fi
47077  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47078  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47079  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47080  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47081
47082  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47083$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47084
47085
47086  COMPILER=$BUILD_CXX
47087  COMPILER_NAME=BuildC++
47088
47089  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47090    # cc -V output typically looks like
47091    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47092    # or
47093    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47094    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47095    # Check that this is likely to be the Solaris Studio cc.
47096    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /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 -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47102$as_echo "$as_me: The result from running with -V 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    # Remove usage instructions (if present), and
47108    # collapse compiler output into a single line
47109    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47110        $SED -e 's/ *[Uu]sage:.*//'`
47111    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47112        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47113  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47114    # xlc -qversion output typically looks like
47115    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47116    #     Version: 11.01.0000.0015
47117    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47118    # Check that this is likely to be the IBM XL C compiler.
47119    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47120    if test $? -ne 0; then
47121      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47122      { $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
47123$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47124      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47125$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47126      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47127$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47128      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47129    fi
47130    # Collapse compiler output into a single line
47131    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47132    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47133        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47134  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47135    # There is no specific version flag, but all output starts with a version string.
47136    # First line typically looks something like:
47137    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47138    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47139    # Check that this is likely to be Microsoft CL.EXE.
47140    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47141    if test $? -ne 0; then
47142      { $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
47143$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47144      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47145$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47146      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47147    fi
47148    # Collapse compiler output into a single line
47149    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47150    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47151        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47152  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47153    # gcc --version output typically looks like
47154    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47155    #     Copyright (C) 2013 Free Software Foundation, Inc.
47156    #     This is free software; see the source for copying conditions.  There is NO
47157    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47158    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47159    # Check that this is likely to be GCC.
47160    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47161    if test $? -ne 0; then
47162      { $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
47163$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47164      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47165$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47166      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47167    fi
47168    # Remove Copyright and legalese from version string, and
47169    # collapse into a single line
47170    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47171        $SED -e 's/ *Copyright .*//'`
47172    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47173        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47174  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47175    # clang --version output typically looks like
47176    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47177    #    clang version 3.3 (tags/RELEASE_33/final)
47178    # or
47179    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47180    #    Target: x86_64-pc-linux-gnu
47181    #    Thread model: posix
47182    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47183    # Check that this is likely to be clang
47184    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47185    if test $? -ne 0; then
47186      { $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
47187$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47188      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47189$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47190      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47191    fi
47192    # Collapse compiler output into a single line
47193    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47194    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47195        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47196  else
47197      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47198  fi
47199  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47200  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47201  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47202  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47203
47204  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47205$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47206
47207
47208  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47209    { $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
47210$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47211    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47212$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47213  fi
47214
47215  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47216  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47217    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47218$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47219  fi
47220
47221  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47222    { $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
47223$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47224  fi
47225
47226  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47227
47228  else
47229    # If we are not cross compiling, use the normal target compilers for
47230    # building the build platform executables.
47231    BUILD_CC="$CC"
47232    BUILD_CXX="$CXX"
47233    BUILD_LD="$LD"
47234    BUILD_LDCXX="$LDCXX"
47235    BUILD_NM="$NM"
47236    BUILD_AS="$AS"
47237    BUILD_OBJCOPY="$OBJCOPY"
47238    BUILD_STRIP="$STRIP"
47239    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47240    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47241    BUILD_AR="$AR"
47242
47243
47244  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47245    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47246$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47247    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47248$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47249  fi
47250
47251  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47252  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47253    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47254$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47255  fi
47256
47257  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47258    { $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
47259$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47260  fi
47261
47262  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47263
47264  fi
47265
47266
47267
47268
47269
47270
47271
47272
47273
47274
47275
47276
47277
47278
47279  # The package path is used only on macosx?
47280  # FIXME: clean this up, and/or move it elsewhere.
47281  PACKAGE_PATH=/opt/local
47282
47283
47284  # Check for extra potential brokenness.
47285  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47286    # On Windows, double-check that we got the right compiler.
47287    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47288    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47289    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47290      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47291        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
47292      fi
47293    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47294      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47295        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47296      fi
47297    fi
47298  fi
47299
47300  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47301    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47302    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47303    # This is later checked when setting flags.
47304
47305    # "-Og" suppported for GCC 4.8 and later
47306    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47307
47308
47309
47310
47311
47312
47313
47314
47315
47316
47317
47318
47319
47320
47321
47322
47323
47324
47325
47326
47327
47328
47329
47330
47331
47332
47333
47334
47335
47336
47337
47338
47339
47340
47341
47342
47343
47344
47345
47346
47347
47348
47349
47350
47351
47352
47353
47354    # Execute function body
47355
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403    # Execute function body
47404
47405  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47406$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47407  supports=yes
47408
47409  saved_cflags="$CFLAGS"
47410  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47411  ac_ext=c
47412ac_cpp='$CPP $CPPFLAGS'
47413ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47414ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47415ac_compiler_gnu=$ac_cv_c_compiler_gnu
47416
47417  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47418/* end confdefs.h.  */
47419int i;
47420_ACEOF
47421if ac_fn_c_try_compile "$LINENO"; then :
47422
47423else
47424  supports=no
47425fi
47426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47427  ac_ext=cpp
47428ac_cpp='$CXXCPP $CPPFLAGS'
47429ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47430ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47431ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47432
47433  CFLAGS="$saved_cflags"
47434
47435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47436$as_echo "$supports" >&6; }
47437  if test "x$supports" = "xyes" ; then
47438    :
47439    C_COMP_SUPPORTS="yes"
47440  else
47441    :
47442    C_COMP_SUPPORTS="no"
47443  fi
47444
47445
47446
47447
47448
47449
47450
47451
47452
47453
47454
47455
47456
47457
47458
47459
47460
47461
47462
47463
47464
47465
47466
47467
47468
47469
47470
47471
47472
47473
47474
47475
47476
47477
47478
47479
47480
47481
47482
47483
47484
47485
47486
47487
47488
47489
47490
47491
47492
47493
47494
47495
47496
47497
47498
47499
47500
47501
47502
47503    # Execute function body
47504
47505  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47506$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47507  supports=yes
47508
47509  saved_cxxflags="$CXXFLAGS"
47510  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47511  ac_ext=cpp
47512ac_cpp='$CXXCPP $CPPFLAGS'
47513ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47514ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47515ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47516
47517  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47518/* end confdefs.h.  */
47519int i;
47520_ACEOF
47521if ac_fn_cxx_try_compile "$LINENO"; then :
47522
47523else
47524  supports=no
47525fi
47526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47527  ac_ext=cpp
47528ac_cpp='$CXXCPP $CPPFLAGS'
47529ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47530ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47531ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47532
47533  CXXFLAGS="$saved_cxxflags"
47534
47535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47536$as_echo "$supports" >&6; }
47537  if test "x$supports" = "xyes" ; then
47538    :
47539    CXX_COMP_SUPPORTS="yes"
47540  else
47541    :
47542    CXX_COMP_SUPPORTS="no"
47543  fi
47544
47545
47546
47547
47548
47549
47550
47551
47552
47553
47554
47555
47556
47557  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47558$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47559  supports=no
47560  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47561
47562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47563$as_echo "$supports" >&6; }
47564  if test "x$supports" = "xyes" ; then
47565    :
47566    HAS_CFLAG_OPTIMIZE_DEBUG=true
47567  else
47568    :
47569    HAS_CFLAG_OPTIMIZE_DEBUG=false
47570  fi
47571
47572
47573
47574
47575
47576
47577
47578    # "-z relro" supported in GNU binutils 2.17 and later
47579    LINKER_RELRO_FLAG="-Wl,-z,relro"
47580
47581
47582
47583
47584
47585
47586
47587
47588
47589
47590
47591
47592
47593
47594
47595
47596
47597
47598
47599
47600
47601
47602
47603
47604
47605
47606
47607
47608
47609
47610
47611
47612
47613
47614
47615
47616
47617
47618
47619
47620
47621
47622
47623
47624
47625
47626
47627    # Execute function body
47628
47629  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47630$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47631  supports=yes
47632
47633  saved_ldflags="$LDFLAGS"
47634  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47635  ac_ext=c
47636ac_cpp='$CPP $CPPFLAGS'
47637ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47638ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47639ac_compiler_gnu=$ac_cv_c_compiler_gnu
47640
47641  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47642/* end confdefs.h.  */
47643
47644int
47645main ()
47646{
47647
47648  ;
47649  return 0;
47650}
47651_ACEOF
47652if ac_fn_c_try_link "$LINENO"; then :
47653
47654else
47655  supports=no
47656fi
47657rm -f core conftest.err conftest.$ac_objext \
47658    conftest$ac_exeext conftest.$ac_ext
47659  ac_ext=cpp
47660ac_cpp='$CXXCPP $CPPFLAGS'
47661ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47662ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47663ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47664
47665  LDFLAGS="$saved_ldflags"
47666
47667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47668$as_echo "$supports" >&6; }
47669  if test "x$supports" = "xyes" ; then
47670    :
47671    HAS_LINKER_RELRO=true
47672  else
47673    :
47674    HAS_LINKER_RELRO=false
47675  fi
47676
47677
47678
47679
47680
47681
47682
47683
47684
47685
47686
47687
47688
47689    # "-z now" supported in GNU binutils 2.11 and later
47690    LINKER_NOW_FLAG="-Wl,-z,now"
47691
47692
47693
47694
47695
47696
47697
47698
47699
47700
47701
47702
47703
47704
47705
47706
47707
47708
47709
47710
47711
47712
47713
47714
47715
47716
47717
47718
47719
47720
47721
47722
47723
47724
47725
47726
47727
47728
47729
47730
47731
47732
47733
47734
47735
47736
47737
47738    # Execute function body
47739
47740  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47741$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47742  supports=yes
47743
47744  saved_ldflags="$LDFLAGS"
47745  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47746  ac_ext=c
47747ac_cpp='$CPP $CPPFLAGS'
47748ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47749ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47750ac_compiler_gnu=$ac_cv_c_compiler_gnu
47751
47752  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47753/* end confdefs.h.  */
47754
47755int
47756main ()
47757{
47758
47759  ;
47760  return 0;
47761}
47762_ACEOF
47763if ac_fn_c_try_link "$LINENO"; then :
47764
47765else
47766  supports=no
47767fi
47768rm -f core conftest.err conftest.$ac_objext \
47769    conftest$ac_exeext conftest.$ac_ext
47770  ac_ext=cpp
47771ac_cpp='$CXXCPP $CPPFLAGS'
47772ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47773ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47774ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47775
47776  LDFLAGS="$saved_ldflags"
47777
47778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47779$as_echo "$supports" >&6; }
47780  if test "x$supports" = "xyes" ; then
47781    :
47782    HAS_LINKER_NOW=true
47783  else
47784    :
47785    HAS_LINKER_NOW=false
47786  fi
47787
47788
47789
47790
47791
47792
47793
47794
47795
47796
47797
47798
47799  fi
47800
47801  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47802  # in executable.'
47803  USING_BROKEN_SUSE_LD=no
47804  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47805    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47806$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47807    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47808    $ECHO "int main() { }" > main.c
47809    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47810      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47811$as_echo "no" >&6; }
47812      USING_BROKEN_SUSE_LD=no
47813    else
47814      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47815$as_echo "yes" >&6; }
47816      USING_BROKEN_SUSE_LD=yes
47817    fi
47818    $RM version-script.map main.c a.out
47819  fi
47820
47821
47822  # Setup hotspot lecagy names for toolchains
47823  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47824  if test "x$TOOLCHAIN_TYPE" = xclang; then
47825    HOTSPOT_TOOLCHAIN_TYPE=gcc
47826  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47827    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47828  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47829    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47830  fi
47831
47832
47833
47834# Setup the JTReg Regression Test Harness.
47835
47836
47837# Check whether --with-jtreg was given.
47838if test "${with_jtreg+set}" = set; then :
47839  withval=$with_jtreg;
47840else
47841  with_jtreg=no
47842fi
47843
47844
47845  if test "x$with_jtreg" = xno; then
47846    # jtreg disabled
47847    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47848$as_echo_n "checking for jtreg... " >&6; }
47849    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47850$as_echo "no" >&6; }
47851  else
47852    if test "x$with_jtreg" != xyes; then
47853      # with path specified.
47854      JT_HOME="$with_jtreg"
47855    fi
47856
47857    if test "x$JT_HOME" != x; then
47858      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47859$as_echo_n "checking for jtreg... " >&6; }
47860
47861      # use JT_HOME enviroment var.
47862
47863  # Only process if variable expands to non-empty
47864
47865  if test "x$JT_HOME" != x; then
47866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47867
47868  # Input might be given as Windows format, start by converting to
47869  # unix format.
47870  path="$JT_HOME"
47871  new_path=`$CYGPATH -u "$path"`
47872
47873  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47874  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47875  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47876  # "foo.exe" is OK but "foo" is an error.
47877  #
47878  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47879  # It is also a way to make sure we got the proper file name for the real test later on.
47880  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47881  if test "x$test_shortpath" = x; then
47882    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47883$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47884    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47885  fi
47886
47887  # Call helper function which possibly converts this using DOS-style short mode.
47888  # If so, the updated path is stored in $new_path.
47889
47890  input_path="$new_path"
47891  # Check if we need to convert this using DOS-style short mode. If the path
47892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47893  # take no chances and rewrite it.
47894  # Note: m4 eats our [], so we need to use [ and ] instead.
47895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47896  if test "x$has_forbidden_chars" != x; then
47897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47898    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47899    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47900    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47901      # Going to short mode and back again did indeed matter. Since short mode is
47902      # case insensitive, let's make it lowercase to improve readability.
47903      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47904      # Now convert it back to Unix-style (cygpath)
47905      input_path=`$CYGPATH -u "$shortmode_path"`
47906      new_path="$input_path"
47907    fi
47908  fi
47909
47910  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47911  if test "x$test_cygdrive_prefix" = x; then
47912    # As a simple fix, exclude /usr/bin since it's not a real path.
47913    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47914      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47915      # a path prefixed by /cygdrive for fixpath to work.
47916      new_path="$CYGWIN_ROOT_PATH$input_path"
47917    fi
47918  fi
47919
47920
47921  if test "x$path" != "x$new_path"; then
47922    JT_HOME="$new_path"
47923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47924$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47925  fi
47926
47927    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47928
47929  path="$JT_HOME"
47930  has_colon=`$ECHO $path | $GREP ^.:`
47931  new_path="$path"
47932  if test "x$has_colon" = x; then
47933    # Not in mixed or Windows style, start by that.
47934    new_path=`cmd //c echo $path`
47935  fi
47936
47937
47938  input_path="$new_path"
47939  # Check if we need to convert this using DOS-style short mode. If the path
47940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47941  # take no chances and rewrite it.
47942  # Note: m4 eats our [], so we need to use [ and ] instead.
47943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47944  if test "x$has_forbidden_chars" != x; then
47945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47946    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47947  fi
47948
47949
47950  windows_path="$new_path"
47951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47952    unix_path=`$CYGPATH -u "$windows_path"`
47953    new_path="$unix_path"
47954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47956    new_path="$unix_path"
47957  fi
47958
47959  if test "x$path" != "x$new_path"; then
47960    JT_HOME="$new_path"
47961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47962$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47963  fi
47964
47965  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47966  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47967
47968    else
47969      # We're on a unix platform. Hooray! :)
47970      path="$JT_HOME"
47971      has_space=`$ECHO "$path" | $GREP " "`
47972      if test "x$has_space" != x; then
47973        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47974$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47975        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47976      fi
47977
47978      # Use eval to expand a potential ~
47979      eval path="$path"
47980      if test ! -f "$path" && test ! -d "$path"; then
47981        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
47982      fi
47983
47984      if test -d "$path"; then
47985        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
47986      else
47987        dir="`$DIRNAME "$path"`"
47988        base="`$BASENAME "$path"`"
47989        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
47990      fi
47991    fi
47992  fi
47993
47994
47995      # jtreg win32 script works for everybody
47996      JTREGEXE="$JT_HOME/bin/jtreg"
47997
47998      if test ! -f "$JTREGEXE"; then
47999        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48000      fi
48001
48002      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48003$as_echo "$JTREGEXE" >&6; }
48004    else
48005      # try to find jtreg on path
48006
48007
48008
48009  # Publish this variable in the help.
48010
48011
48012  if [ -z "${JTREGEXE+x}" ]; then
48013    # The variable is not set by user, try to locate tool using the code snippet
48014    for ac_prog in jtreg
48015do
48016  # Extract the first word of "$ac_prog", so it can be a program name with args.
48017set dummy $ac_prog; ac_word=$2
48018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48019$as_echo_n "checking for $ac_word... " >&6; }
48020if ${ac_cv_path_JTREGEXE+:} false; then :
48021  $as_echo_n "(cached) " >&6
48022else
48023  case $JTREGEXE in
48024  [\\/]* | ?:[\\/]*)
48025  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48026  ;;
48027  *)
48028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48029for as_dir in $PATH
48030do
48031  IFS=$as_save_IFS
48032  test -z "$as_dir" && as_dir=.
48033    for ac_exec_ext in '' $ac_executable_extensions; do
48034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48035    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48037    break 2
48038  fi
48039done
48040  done
48041IFS=$as_save_IFS
48042
48043  ;;
48044esac
48045fi
48046JTREGEXE=$ac_cv_path_JTREGEXE
48047if test -n "$JTREGEXE"; then
48048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48049$as_echo "$JTREGEXE" >&6; }
48050else
48051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48052$as_echo "no" >&6; }
48053fi
48054
48055
48056  test -n "$JTREGEXE" && break
48057done
48058
48059  else
48060    # The variable is set, but is it from the command line or the environment?
48061
48062    # Try to remove the string !JTREGEXE! from our list.
48063    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48064    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48065      # If it failed, the variable was not from the command line. Ignore it,
48066      # but warn the user (except for BASH, which is always set by the calling BASH).
48067      if test "xJTREGEXE" != xBASH; then
48068        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48069$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48070      fi
48071      # Try to locate tool using the code snippet
48072      for ac_prog in jtreg
48073do
48074  # Extract the first word of "$ac_prog", so it can be a program name with args.
48075set dummy $ac_prog; ac_word=$2
48076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48077$as_echo_n "checking for $ac_word... " >&6; }
48078if ${ac_cv_path_JTREGEXE+:} false; then :
48079  $as_echo_n "(cached) " >&6
48080else
48081  case $JTREGEXE in
48082  [\\/]* | ?:[\\/]*)
48083  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48084  ;;
48085  *)
48086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48087for as_dir in $PATH
48088do
48089  IFS=$as_save_IFS
48090  test -z "$as_dir" && as_dir=.
48091    for ac_exec_ext in '' $ac_executable_extensions; do
48092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48093    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48095    break 2
48096  fi
48097done
48098  done
48099IFS=$as_save_IFS
48100
48101  ;;
48102esac
48103fi
48104JTREGEXE=$ac_cv_path_JTREGEXE
48105if test -n "$JTREGEXE"; then
48106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48107$as_echo "$JTREGEXE" >&6; }
48108else
48109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48110$as_echo "no" >&6; }
48111fi
48112
48113
48114  test -n "$JTREGEXE" && break
48115done
48116
48117    else
48118      # If it succeeded, then it was overridden by the user. We will use it
48119      # for the tool.
48120
48121      # First remove it from the list of overridden variables, so we can test
48122      # for unknown variables in the end.
48123      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48124
48125      # Check if we try to supply an empty value
48126      if test "x$JTREGEXE" = x; then
48127        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48128$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48129        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48130$as_echo_n "checking for JTREGEXE... " >&6; }
48131        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48132$as_echo "disabled" >&6; }
48133      else
48134        # Check if the provided tool contains a complete path.
48135        tool_specified="$JTREGEXE"
48136        tool_basename="${tool_specified##*/}"
48137        if test "x$tool_basename" = "x$tool_specified"; then
48138          # A command without a complete path is provided, search $PATH.
48139          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48140$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48141          # Extract the first word of "$tool_basename", so it can be a program name with args.
48142set dummy $tool_basename; ac_word=$2
48143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48144$as_echo_n "checking for $ac_word... " >&6; }
48145if ${ac_cv_path_JTREGEXE+:} false; then :
48146  $as_echo_n "(cached) " >&6
48147else
48148  case $JTREGEXE in
48149  [\\/]* | ?:[\\/]*)
48150  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48151  ;;
48152  *)
48153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48154for as_dir in $PATH
48155do
48156  IFS=$as_save_IFS
48157  test -z "$as_dir" && as_dir=.
48158    for ac_exec_ext in '' $ac_executable_extensions; do
48159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48160    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48162    break 2
48163  fi
48164done
48165  done
48166IFS=$as_save_IFS
48167
48168  ;;
48169esac
48170fi
48171JTREGEXE=$ac_cv_path_JTREGEXE
48172if test -n "$JTREGEXE"; then
48173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48174$as_echo "$JTREGEXE" >&6; }
48175else
48176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48177$as_echo "no" >&6; }
48178fi
48179
48180
48181          if test "x$JTREGEXE" = x; then
48182            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48183          fi
48184        else
48185          # Otherwise we believe it is a complete path. Use it as it is.
48186          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48187$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48188          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48189$as_echo_n "checking for JTREGEXE... " >&6; }
48190          if test ! -x "$tool_specified"; then
48191            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48192$as_echo "not found" >&6; }
48193            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48194          fi
48195          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48196$as_echo "$tool_specified" >&6; }
48197        fi
48198      fi
48199    fi
48200
48201  fi
48202
48203
48204
48205  if test "x$JTREGEXE" = x; then
48206    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48207  fi
48208
48209
48210      JT_HOME="`$DIRNAME $JTREGEXE`"
48211    fi
48212  fi
48213
48214
48215
48216
48217
48218
48219  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48220  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48221  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48222  #                              commands produced by the link step (currently AIX only)
48223  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48224    COMPILER_TARGET_BITS_FLAG="-q"
48225    COMPILER_COMMAND_FILE_FLAG="-f"
48226    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48227  else
48228    COMPILER_TARGET_BITS_FLAG="-m"
48229    COMPILER_COMMAND_FILE_FLAG="@"
48230    COMPILER_BINDCMD_FILE_FLAG=""
48231
48232    # The solstudio linker does not support @-files.
48233    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48234      COMPILER_COMMAND_FILE_FLAG=
48235    fi
48236
48237    # Check if @file is supported by gcc
48238    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48239      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48240$as_echo_n "checking if @file is supported by gcc... " >&6; }
48241      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48242      $ECHO "" "--version" > command.file
48243      if $CXX @command.file 2>&5 >&5; then
48244        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48245$as_echo "yes" >&6; }
48246        COMPILER_COMMAND_FILE_FLAG="@"
48247      else
48248        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48249$as_echo "no" >&6; }
48250        COMPILER_COMMAND_FILE_FLAG=
48251      fi
48252      $RM command.file
48253    fi
48254  fi
48255
48256
48257
48258
48259  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48260  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48261    ARFLAGS="-r"
48262  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48263    ARFLAGS="-X64"
48264  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48265    # lib.exe is used as AR to create static libraries.
48266    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48267  else
48268    ARFLAGS=""
48269  fi
48270
48271
48272  ## Setup strip.
48273  # FIXME: should this really be per platform, or should it be per toolchain type?
48274  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48275  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48276  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48277    STRIPFLAGS="-g"
48278  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48279    STRIPFLAGS="-x"
48280  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48281    STRIPFLAGS="-S"
48282  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48283    STRIPFLAGS="-X32_64"
48284  fi
48285
48286
48287
48288  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48289    CC_OUT_OPTION=-Fo
48290    EXE_OUT_OPTION=-out:
48291    LD_OUT_OPTION=-out:
48292    AR_OUT_OPTION=-out:
48293  else
48294    # The option used to specify the target .o,.a or .so file.
48295    # When compiling, how to specify the to be created object file.
48296    CC_OUT_OPTION='-o$(SPACE)'
48297    # When linking, how to specify the to be created executable.
48298    EXE_OUT_OPTION='-o$(SPACE)'
48299    # When linking, how to specify the to be created dynamically linkable library.
48300    LD_OUT_OPTION='-o$(SPACE)'
48301    # When archiving, how to specify the to be create static archive for object files.
48302    AR_OUT_OPTION='rcs$(SPACE)'
48303  fi
48304
48305
48306
48307
48308
48309  # On Windows, we need to set RC flags.
48310  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48311    RC_FLAGS="-nologo -l0x409"
48312    JVM_RCFLAGS="-nologo"
48313    if test "x$DEBUG_LEVEL" = xrelease; then
48314      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48315      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48316    fi
48317
48318    # The version variables used to create RC_FLAGS may be overridden
48319    # in a custom configure script, or possibly the command line.
48320    # Let those variables be expanded at make time in spec.gmk.
48321    # The \$ are escaped to the shell, and the $(...) variables
48322    # are evaluated by make.
48323    RC_FLAGS="$RC_FLAGS \
48324        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48325        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48326        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48327        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48328        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48329        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48330        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48331
48332    JVM_RCFLAGS="$JVM_RCFLAGS \
48333        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48334        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48335        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48336        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48337        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48338        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48339        -D\"HS_FNAME=jvm.dll\" \
48340        -D\"HS_INTERNAL_NAME=jvm\""
48341  fi
48342
48343
48344
48345  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48346    # silence copyright notice and other headers.
48347    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48348  fi
48349
48350
48351# Now we can test some aspects on the target using configure macros.
48352
48353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48354$as_echo_n "checking for ANSI C header files... " >&6; }
48355if ${ac_cv_header_stdc+:} false; then :
48356  $as_echo_n "(cached) " >&6
48357else
48358  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48359/* end confdefs.h.  */
48360#include <stdlib.h>
48361#include <stdarg.h>
48362#include <string.h>
48363#include <float.h>
48364
48365int
48366main ()
48367{
48368
48369  ;
48370  return 0;
48371}
48372_ACEOF
48373if ac_fn_cxx_try_compile "$LINENO"; then :
48374  ac_cv_header_stdc=yes
48375else
48376  ac_cv_header_stdc=no
48377fi
48378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48379
48380if test $ac_cv_header_stdc = yes; then
48381  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48382  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48383/* end confdefs.h.  */
48384#include <string.h>
48385
48386_ACEOF
48387if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48388  $EGREP "memchr" >/dev/null 2>&1; then :
48389
48390else
48391  ac_cv_header_stdc=no
48392fi
48393rm -f conftest*
48394
48395fi
48396
48397if test $ac_cv_header_stdc = yes; then
48398  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48399  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48400/* end confdefs.h.  */
48401#include <stdlib.h>
48402
48403_ACEOF
48404if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48405  $EGREP "free" >/dev/null 2>&1; then :
48406
48407else
48408  ac_cv_header_stdc=no
48409fi
48410rm -f conftest*
48411
48412fi
48413
48414if test $ac_cv_header_stdc = yes; then
48415  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48416  if test "$cross_compiling" = yes; then :
48417  :
48418else
48419  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48420/* end confdefs.h.  */
48421#include <ctype.h>
48422#include <stdlib.h>
48423#if ((' ' & 0x0FF) == 0x020)
48424# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48425# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48426#else
48427# define ISLOWER(c) \
48428		   (('a' <= (c) && (c) <= 'i') \
48429		     || ('j' <= (c) && (c) <= 'r') \
48430		     || ('s' <= (c) && (c) <= 'z'))
48431# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48432#endif
48433
48434#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48435int
48436main ()
48437{
48438  int i;
48439  for (i = 0; i < 256; i++)
48440    if (XOR (islower (i), ISLOWER (i))
48441	|| toupper (i) != TOUPPER (i))
48442      return 2;
48443  return 0;
48444}
48445_ACEOF
48446if ac_fn_cxx_try_run "$LINENO"; then :
48447
48448else
48449  ac_cv_header_stdc=no
48450fi
48451rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48452  conftest.$ac_objext conftest.beam conftest.$ac_ext
48453fi
48454
48455fi
48456fi
48457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48458$as_echo "$ac_cv_header_stdc" >&6; }
48459if test $ac_cv_header_stdc = yes; then
48460
48461$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48462
48463fi
48464
48465# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48466for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48467		  inttypes.h stdint.h unistd.h
48468do :
48469  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48470ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48471"
48472if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48473  cat >>confdefs.h <<_ACEOF
48474#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48475_ACEOF
48476
48477fi
48478
48479done
48480
48481
48482
48483  ###############################################################################
48484  #
48485  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48486  # (The JVM can use 32 or 64 bit Java pointers but that decision
48487  # is made at runtime.)
48488  #
48489
48490  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48491    # Always specify -m flag on Solaris
48492    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48493
48494  # When we add flags to the "official" CFLAGS etc, we need to
48495  # keep track of these additions in ADDED_CFLAGS etc. These
48496  # will later be checked to make sure only controlled additions
48497  # have been made to CFLAGS etc.
48498  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48499  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48500  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48501
48502  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48503  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48504  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48505
48506  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48507  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48508  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48509
48510  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48511  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48512  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48513
48514  elif test "x$COMPILE_TYPE" = xreduced; then
48515    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48516      # Specify -m if running reduced on unix platforms
48517
48518  # When we add flags to the "official" CFLAGS etc, we need to
48519  # keep track of these additions in ADDED_CFLAGS etc. These
48520  # will later be checked to make sure only controlled additions
48521  # have been made to CFLAGS etc.
48522  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48523  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48524  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48525
48526  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48527  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48528  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48529
48530  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48531  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48532  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48533
48534  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48535  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48536  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48537
48538    fi
48539  fi
48540  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48541    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48542    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48543    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48544  fi
48545
48546  # Make compilation sanity check
48547  for ac_header in stdio.h
48548do :
48549  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48550if test "x$ac_cv_header_stdio_h" = xyes; then :
48551  cat >>confdefs.h <<_ACEOF
48552#define HAVE_STDIO_H 1
48553_ACEOF
48554
48555else
48556
48557    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48558$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48559    if test "x$COMPILE_TYPE" = xreduced; then
48560
48561  # Print a helpful message on how to acquire the necessary build dependency.
48562  # reduced is the help tag: freetype, cups, alsa etc
48563  MISSING_DEPENDENCY=reduced
48564
48565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48566    cygwin_help $MISSING_DEPENDENCY
48567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48568    msys_help $MISSING_DEPENDENCY
48569  else
48570    PKGHANDLER_COMMAND=
48571
48572    case $PKGHANDLER in
48573      apt-get)
48574        apt_help     $MISSING_DEPENDENCY ;;
48575      yum)
48576        yum_help     $MISSING_DEPENDENCY ;;
48577      port)
48578        port_help    $MISSING_DEPENDENCY ;;
48579      pkgutil)
48580        pkgutil_help $MISSING_DEPENDENCY ;;
48581      pkgadd)
48582        pkgadd_help  $MISSING_DEPENDENCY ;;
48583    esac
48584
48585    if test "x$PKGHANDLER_COMMAND" != x; then
48586      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48587    fi
48588  fi
48589
48590      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48591$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48592    elif test "x$COMPILE_TYPE" = xcross; then
48593      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48594$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48595    fi
48596    as_fn_error $? "Cannot continue." "$LINENO" 5
48597
48598fi
48599
48600done
48601
48602
48603  # The cast to long int works around a bug in the HP C Compiler
48604# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48605# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48606# This bug is HP SR number 8606223364.
48607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48608$as_echo_n "checking size of int *... " >&6; }
48609if ${ac_cv_sizeof_int_p+:} false; then :
48610  $as_echo_n "(cached) " >&6
48611else
48612  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48613
48614else
48615  if test "$ac_cv_type_int_p" = yes; then
48616     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48617$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48618as_fn_error 77 "cannot compute sizeof (int *)
48619See \`config.log' for more details" "$LINENO" 5; }
48620   else
48621     ac_cv_sizeof_int_p=0
48622   fi
48623fi
48624
48625fi
48626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48627$as_echo "$ac_cv_sizeof_int_p" >&6; }
48628
48629
48630
48631cat >>confdefs.h <<_ACEOF
48632#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48633_ACEOF
48634
48635
48636
48637  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48638  if test "x$ac_cv_sizeof_int_p" = x; then
48639    # The test failed, lets stick to the assumed value.
48640    { $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
48641$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48642  else
48643    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48644
48645    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48646      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48647      # Let's try to implicitely set the compilers target architecture and retry the test
48648      { $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
48649$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;}
48650      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48651$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48652
48653  # When we add flags to the "official" CFLAGS etc, we need to
48654  # keep track of these additions in ADDED_CFLAGS etc. These
48655  # will later be checked to make sure only controlled additions
48656  # have been made to CFLAGS etc.
48657  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48658  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48659  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48660
48661  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48662  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48663  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48664
48665  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48666  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48667  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48668
48669  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48670  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48671  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48672
48673
48674      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48675      unset ac_cv_sizeof_int_p
48676      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48677      cat >>confdefs.h <<_ACEOF
48678#undef SIZEOF_INT_P
48679_ACEOF
48680
48681      # The cast to long int works around a bug in the HP C Compiler
48682# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48683# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48684# This bug is HP SR number 8606223364.
48685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48686$as_echo_n "checking size of int *... " >&6; }
48687if ${ac_cv_sizeof_int_p+:} false; then :
48688  $as_echo_n "(cached) " >&6
48689else
48690  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48691
48692else
48693  if test "$ac_cv_type_int_p" = yes; then
48694     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48695$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48696as_fn_error 77 "cannot compute sizeof (int *)
48697See \`config.log' for more details" "$LINENO" 5; }
48698   else
48699     ac_cv_sizeof_int_p=0
48700   fi
48701fi
48702
48703fi
48704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48705$as_echo "$ac_cv_sizeof_int_p" >&6; }
48706
48707
48708
48709cat >>confdefs.h <<_ACEOF
48710#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48711_ACEOF
48712
48713
48714
48715      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48716
48717      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48718        { $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
48719$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;}
48720        if test "x$COMPILE_TYPE" = xreduced; then
48721
48722  # Print a helpful message on how to acquire the necessary build dependency.
48723  # reduced is the help tag: freetype, cups, alsa etc
48724  MISSING_DEPENDENCY=reduced
48725
48726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48727    cygwin_help $MISSING_DEPENDENCY
48728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48729    msys_help $MISSING_DEPENDENCY
48730  else
48731    PKGHANDLER_COMMAND=
48732
48733    case $PKGHANDLER in
48734      apt-get)
48735        apt_help     $MISSING_DEPENDENCY ;;
48736      yum)
48737        yum_help     $MISSING_DEPENDENCY ;;
48738      port)
48739        port_help    $MISSING_DEPENDENCY ;;
48740      pkgutil)
48741        pkgutil_help $MISSING_DEPENDENCY ;;
48742      pkgadd)
48743        pkgadd_help  $MISSING_DEPENDENCY ;;
48744    esac
48745
48746    if test "x$PKGHANDLER_COMMAND" != x; then
48747      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48748    fi
48749  fi
48750
48751          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48752$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48753        elif test "x$COMPILE_TYPE" = xcross; then
48754          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48755$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48756        fi
48757        as_fn_error $? "Cannot continue." "$LINENO" 5
48758      fi
48759    fi
48760  fi
48761
48762  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48763$as_echo_n "checking for target address size... " >&6; }
48764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48765$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48766
48767
48768  ###############################################################################
48769  #
48770  # Is the target little of big endian?
48771  #
48772   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48773$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48774if ${ac_cv_c_bigendian+:} false; then :
48775  $as_echo_n "(cached) " >&6
48776else
48777  ac_cv_c_bigendian=unknown
48778    # See if we're dealing with a universal compiler.
48779    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48780/* end confdefs.h.  */
48781#ifndef __APPLE_CC__
48782	       not a universal capable compiler
48783	     #endif
48784	     typedef int dummy;
48785
48786_ACEOF
48787if ac_fn_cxx_try_compile "$LINENO"; then :
48788
48789	# Check for potential -arch flags.  It is not universal unless
48790	# there are at least two -arch flags with different values.
48791	ac_arch=
48792	ac_prev=
48793	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48794	 if test -n "$ac_prev"; then
48795	   case $ac_word in
48796	     i?86 | x86_64 | ppc | ppc64)
48797	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48798		 ac_arch=$ac_word
48799	       else
48800		 ac_cv_c_bigendian=universal
48801		 break
48802	       fi
48803	       ;;
48804	   esac
48805	   ac_prev=
48806	 elif test "x$ac_word" = "x-arch"; then
48807	   ac_prev=arch
48808	 fi
48809       done
48810fi
48811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48812    if test $ac_cv_c_bigendian = unknown; then
48813      # See if sys/param.h defines the BYTE_ORDER macro.
48814      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48815/* end confdefs.h.  */
48816#include <sys/types.h>
48817	     #include <sys/param.h>
48818
48819int
48820main ()
48821{
48822#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48823		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48824		     && LITTLE_ENDIAN)
48825	      bogus endian macros
48826	     #endif
48827
48828  ;
48829  return 0;
48830}
48831_ACEOF
48832if ac_fn_cxx_try_compile "$LINENO"; then :
48833  # It does; now see whether it defined to BIG_ENDIAN or not.
48834	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48835/* end confdefs.h.  */
48836#include <sys/types.h>
48837		#include <sys/param.h>
48838
48839int
48840main ()
48841{
48842#if BYTE_ORDER != BIG_ENDIAN
48843		 not big endian
48844		#endif
48845
48846  ;
48847  return 0;
48848}
48849_ACEOF
48850if ac_fn_cxx_try_compile "$LINENO"; then :
48851  ac_cv_c_bigendian=yes
48852else
48853  ac_cv_c_bigendian=no
48854fi
48855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48856fi
48857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48858    fi
48859    if test $ac_cv_c_bigendian = unknown; then
48860      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48861      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48862/* end confdefs.h.  */
48863#include <limits.h>
48864
48865int
48866main ()
48867{
48868#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48869	      bogus endian macros
48870	     #endif
48871
48872  ;
48873  return 0;
48874}
48875_ACEOF
48876if ac_fn_cxx_try_compile "$LINENO"; then :
48877  # It does; now see whether it defined to _BIG_ENDIAN or not.
48878	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48879/* end confdefs.h.  */
48880#include <limits.h>
48881
48882int
48883main ()
48884{
48885#ifndef _BIG_ENDIAN
48886		 not big endian
48887		#endif
48888
48889  ;
48890  return 0;
48891}
48892_ACEOF
48893if ac_fn_cxx_try_compile "$LINENO"; then :
48894  ac_cv_c_bigendian=yes
48895else
48896  ac_cv_c_bigendian=no
48897fi
48898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48899fi
48900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48901    fi
48902    if test $ac_cv_c_bigendian = unknown; then
48903      # Compile a test program.
48904      if test "$cross_compiling" = yes; then :
48905  # Try to guess by grepping values from an object file.
48906	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48907/* end confdefs.h.  */
48908short int ascii_mm[] =
48909		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48910		short int ascii_ii[] =
48911		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48912		int use_ascii (int i) {
48913		  return ascii_mm[i] + ascii_ii[i];
48914		}
48915		short int ebcdic_ii[] =
48916		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48917		short int ebcdic_mm[] =
48918		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48919		int use_ebcdic (int i) {
48920		  return ebcdic_mm[i] + ebcdic_ii[i];
48921		}
48922		extern int foo;
48923
48924int
48925main ()
48926{
48927return use_ascii (foo) == use_ebcdic (foo);
48928  ;
48929  return 0;
48930}
48931_ACEOF
48932if ac_fn_cxx_try_compile "$LINENO"; then :
48933  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48934	      ac_cv_c_bigendian=yes
48935	    fi
48936	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48937	      if test "$ac_cv_c_bigendian" = unknown; then
48938		ac_cv_c_bigendian=no
48939	      else
48940		# finding both strings is unlikely to happen, but who knows?
48941		ac_cv_c_bigendian=unknown
48942	      fi
48943	    fi
48944fi
48945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48946else
48947  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48948/* end confdefs.h.  */
48949$ac_includes_default
48950int
48951main ()
48952{
48953
48954	     /* Are we little or big endian?  From Harbison&Steele.  */
48955	     union
48956	     {
48957	       long int l;
48958	       char c[sizeof (long int)];
48959	     } u;
48960	     u.l = 1;
48961	     return u.c[sizeof (long int) - 1] == 1;
48962
48963  ;
48964  return 0;
48965}
48966_ACEOF
48967if ac_fn_cxx_try_run "$LINENO"; then :
48968  ac_cv_c_bigendian=no
48969else
48970  ac_cv_c_bigendian=yes
48971fi
48972rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48973  conftest.$ac_objext conftest.beam conftest.$ac_ext
48974fi
48975
48976    fi
48977fi
48978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
48979$as_echo "$ac_cv_c_bigendian" >&6; }
48980 case $ac_cv_c_bigendian in #(
48981   yes)
48982     ENDIAN="big";; #(
48983   no)
48984     ENDIAN="little" ;; #(
48985   universal)
48986     ENDIAN="universal_endianness"
48987     ;; #(
48988   *)
48989     ENDIAN="unknown" ;;
48990 esac
48991
48992
48993  if test "x$ENDIAN" = xuniversal_endianness; then
48994    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
48995  fi
48996  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
48997    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
48998  fi
48999
49000
49001# Configure flags for the tools
49002
49003  ###############################################################################
49004  #
49005  # How to compile shared libraries.
49006  #
49007
49008  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49009    PICFLAG="-fPIC"
49010    C_FLAG_REORDER=''
49011    CXX_FLAG_REORDER=''
49012
49013    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49014      # Linking is different on MacOSX
49015      if test "x$STATIC_BUILD" = xtrue; then
49016        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49017      else
49018        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49019        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49020      fi
49021      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49022      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49023      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49024      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49025    else
49026      # Default works for linux, might work on other platforms as well.
49027      SHARED_LIBRARY_FLAGS='-shared'
49028      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49029      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49030      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49031      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49032    fi
49033  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49034    C_FLAG_REORDER=''
49035    CXX_FLAG_REORDER=''
49036
49037    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49038      # Linking is different on MacOSX
49039      PICFLAG=''
49040      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49041      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49042      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49043      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49044      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49045
49046      if test "x$STATIC_BUILD" = xfalse; then
49047        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49048      fi
49049    else
49050      # Default works for linux, might work on other platforms as well.
49051      PICFLAG='-fPIC'
49052      SHARED_LIBRARY_FLAGS='-shared'
49053      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49054      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49055      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49056      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49057    fi
49058  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49059    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49060      PICFLAG="-xcode=pic32"
49061    else
49062      PICFLAG="-KPIC"
49063    fi
49064    C_FLAG_REORDER='-xF'
49065    CXX_FLAG_REORDER='-xF'
49066    SHARED_LIBRARY_FLAGS="-G"
49067    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49068    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49069    SET_SHARED_LIBRARY_NAME='-h $1'
49070    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49071  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49072    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49073    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49074    # will have to patch this single instruction with a call to some out-of-order code which
49075    # does the load from the TOC. This is of course slow. But in that case we also would have
49076    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49077    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49078    # can be patched directly by the linker and does not require a jump to out-of-order code.
49079    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49080    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49081    # loads for accessing a global variable). But there are rumors that this may be seen as a
49082    # 'performance feature' because of improved code locality of the symbols used in a
49083    # compilation unit.
49084    PICFLAG="-qpic"
49085    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49086    C_FLAG_REORDER=''
49087    CXX_FLAG_REORDER=''
49088    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49089    SET_EXECUTABLE_ORIGIN=""
49090    SET_SHARED_LIBRARY_ORIGIN=''
49091    SET_SHARED_LIBRARY_NAME=''
49092    SET_SHARED_LIBRARY_MAPFILE=''
49093  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49094    PICFLAG=""
49095    C_FLAG_REORDER=''
49096    CXX_FLAG_REORDER=''
49097    SHARED_LIBRARY_FLAGS="-dll"
49098    SET_EXECUTABLE_ORIGIN=''
49099    SET_SHARED_LIBRARY_ORIGIN=''
49100    SET_SHARED_LIBRARY_NAME=''
49101    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49102  fi
49103
49104
49105
49106
49107
49108
49109
49110
49111
49112  # The (cross) compiler is now configured, we can now test capabilities
49113  # of the target platform.
49114
49115
49116
49117  ###############################################################################
49118  #
49119  # Setup the opt flags for different compilers
49120  # and different operating systems.
49121  #
49122
49123  # FIXME: this was indirectly the old default, but just inherited.
49124  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49125  #   C_FLAG_DEPS="-MMD -MF"
49126  # fi
49127
49128  # Generate make dependency files
49129  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49130    C_FLAG_DEPS="-MMD -MF"
49131  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49132    C_FLAG_DEPS="-MMD -MF"
49133  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49134    C_FLAG_DEPS="-xMMD -xMF"
49135  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49136    C_FLAG_DEPS="-qmakedep=gcc -MF"
49137  fi
49138  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49139
49140
49141
49142  # Debug symbols
49143  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49144    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49145      # reduce from default "-g2" option to save space
49146      CFLAGS_DEBUG_SYMBOLS="-g1"
49147      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49148    else
49149      CFLAGS_DEBUG_SYMBOLS="-g"
49150      CXXFLAGS_DEBUG_SYMBOLS="-g"
49151    fi
49152  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49153    CFLAGS_DEBUG_SYMBOLS="-g"
49154    CXXFLAGS_DEBUG_SYMBOLS="-g"
49155  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49156    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49157    # -g0 enables debug symbols without disabling inlining.
49158    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49159  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49160    CFLAGS_DEBUG_SYMBOLS="-g"
49161    CXXFLAGS_DEBUG_SYMBOLS="-g"
49162  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49163    CFLAGS_DEBUG_SYMBOLS="-Zi"
49164    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49165  fi
49166
49167
49168
49169  # Debug symbols for JVM_CFLAGS
49170  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49171    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49172    if test "x$DEBUG_LEVEL" = xslowdebug; then
49173      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49174    else
49175      # -g0 does not disable inlining, which -g does.
49176      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49177    fi
49178  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49179    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49180  else
49181    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49182  fi
49183
49184
49185  # bounds, memory and behavior checking options
49186  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49187    case $DEBUG_LEVEL in
49188    release )
49189      # no adjustment
49190      ;;
49191    fastdebug )
49192      # no adjustment
49193      ;;
49194    slowdebug )
49195      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49196      # get's added conditionally on whether we produce debug symbols or not.
49197      # This is most likely not really correct.
49198
49199      # Add runtime stack smashing and undefined behavior checks.
49200      # Not all versions of gcc support -fstack-protector
49201      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49202
49203
49204
49205
49206
49207
49208
49209
49210
49211
49212
49213
49214
49215
49216
49217
49218
49219
49220
49221
49222
49223
49224
49225
49226
49227
49228
49229
49230
49231
49232
49233
49234
49235
49236
49237
49238
49239
49240
49241
49242
49243
49244    # Execute function body
49245
49246
49247
49248
49249
49250
49251
49252
49253
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293    # Execute function body
49294
49295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49296$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49297  supports=yes
49298
49299  saved_cflags="$CFLAGS"
49300  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49301  ac_ext=c
49302ac_cpp='$CPP $CPPFLAGS'
49303ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49304ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49305ac_compiler_gnu=$ac_cv_c_compiler_gnu
49306
49307  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49308/* end confdefs.h.  */
49309int i;
49310_ACEOF
49311if ac_fn_c_try_compile "$LINENO"; then :
49312
49313else
49314  supports=no
49315fi
49316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49317  ac_ext=cpp
49318ac_cpp='$CXXCPP $CPPFLAGS'
49319ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49320ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49321ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49322
49323  CFLAGS="$saved_cflags"
49324
49325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49326$as_echo "$supports" >&6; }
49327  if test "x$supports" = "xyes" ; then
49328    :
49329    C_COMP_SUPPORTS="yes"
49330  else
49331    :
49332    C_COMP_SUPPORTS="no"
49333  fi
49334
49335
49336
49337
49338
49339
49340
49341
49342
49343
49344
49345
49346
49347
49348
49349
49350
49351
49352
49353
49354
49355
49356
49357
49358
49359
49360
49361
49362
49363
49364
49365
49366
49367
49368
49369
49370
49371
49372
49373
49374
49375
49376
49377
49378
49379
49380
49381
49382
49383
49384
49385
49386
49387
49388
49389
49390
49391
49392
49393    # Execute function body
49394
49395  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49396$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49397  supports=yes
49398
49399  saved_cxxflags="$CXXFLAGS"
49400  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49401  ac_ext=cpp
49402ac_cpp='$CXXCPP $CPPFLAGS'
49403ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49404ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49405ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49406
49407  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49408/* end confdefs.h.  */
49409int i;
49410_ACEOF
49411if ac_fn_cxx_try_compile "$LINENO"; then :
49412
49413else
49414  supports=no
49415fi
49416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49417  ac_ext=cpp
49418ac_cpp='$CXXCPP $CPPFLAGS'
49419ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49420ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49421ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49422
49423  CXXFLAGS="$saved_cxxflags"
49424
49425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49426$as_echo "$supports" >&6; }
49427  if test "x$supports" = "xyes" ; then
49428    :
49429    CXX_COMP_SUPPORTS="yes"
49430  else
49431    :
49432    CXX_COMP_SUPPORTS="no"
49433  fi
49434
49435
49436
49437
49438
49439
49440
49441
49442
49443
49444
49445
49446
49447  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49448$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49449  supports=no
49450  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49451
49452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49453$as_echo "$supports" >&6; }
49454  if test "x$supports" = "xyes" ; then
49455    :
49456
49457  else
49458    :
49459    STACK_PROTECTOR_CFLAG=""
49460  fi
49461
49462
49463
49464
49465
49466
49467
49468      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49469      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49470      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49471        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49472      fi
49473      ;;
49474    esac
49475  fi
49476
49477  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49478    if test "x$DEBUG_LEVEL" != xrelease; then
49479      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49480        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49481      fi
49482    fi
49483  fi
49484
49485  # Optimization levels
49486  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49487    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49488
49489    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49490      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49491      C_O_FLAG_HIGHEST_JVM="-xO4"
49492      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49493      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49494      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49495      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49496      C_O_FLAG_DEBUG_JVM=""
49497      C_O_FLAG_NONE="-xregs=no%frameptr"
49498      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49499      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49500      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49501      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49502      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49503      CXX_O_FLAG_DEBUG_JVM=""
49504      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49505      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49506        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49507        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49508      fi
49509    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49510      C_O_FLAG_HIGHEST_JVM="-xO4"
49511      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49512      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49513      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49514      C_O_FLAG_DEBUG=""
49515      C_O_FLAG_DEBUG_JVM=""
49516      C_O_FLAG_NONE=""
49517      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49518      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49519      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49520      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49521      CXX_O_FLAG_DEBUG=""
49522      CXX_O_FLAG_DEBUG_JVM=""
49523      CXX_O_FLAG_NONE=""
49524    fi
49525  else
49526    # The remaining toolchains share opt flags between CC and CXX;
49527    # setup for C and duplicate afterwards.
49528    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49529      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49530        # On MacOSX we optimize for size, something
49531        # we should do for all platforms?
49532        C_O_FLAG_HIGHEST_JVM="-Os"
49533        C_O_FLAG_HIGHEST="-Os"
49534        C_O_FLAG_HI="-Os"
49535        C_O_FLAG_NORM="-Os"
49536        C_O_FLAG_SIZE="-Os"
49537      else
49538        C_O_FLAG_HIGHEST_JVM="-O3"
49539        C_O_FLAG_HIGHEST="-O3"
49540        C_O_FLAG_HI="-O3"
49541        C_O_FLAG_NORM="-O2"
49542        C_O_FLAG_SIZE="-Os"
49543      fi
49544      C_O_FLAG_DEBUG="-O0"
49545      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49546        C_O_FLAG_DEBUG_JVM=""
49547      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49548        C_O_FLAG_DEBUG_JVM="-O0"
49549      fi
49550      C_O_FLAG_NONE="-O0"
49551    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49552      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49553        # On MacOSX we optimize for size, something
49554        # we should do for all platforms?
49555        C_O_FLAG_HIGHEST_JVM="-Os"
49556        C_O_FLAG_HIGHEST="-Os"
49557        C_O_FLAG_HI="-Os"
49558        C_O_FLAG_NORM="-Os"
49559        C_O_FLAG_SIZE="-Os"
49560      else
49561        C_O_FLAG_HIGHEST_JVM="-O3"
49562        C_O_FLAG_HIGHEST="-O3"
49563        C_O_FLAG_HI="-O3"
49564        C_O_FLAG_NORM="-O2"
49565        C_O_FLAG_SIZE="-Os"
49566      fi
49567      C_O_FLAG_DEBUG="-O0"
49568      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49569        C_O_FLAG_DEBUG_JVM=""
49570      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49571        C_O_FLAG_DEBUG_JVM="-O0"
49572      fi
49573      C_O_FLAG_NONE="-O0"
49574    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49575      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49576      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49577      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49578      C_O_FLAG_NORM="-O2"
49579      C_O_FLAG_DEBUG="-qnoopt"
49580      # FIXME: Value below not verified.
49581      C_O_FLAG_DEBUG_JVM=""
49582      C_O_FLAG_NONE="-qnoopt"
49583    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49584      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49585      C_O_FLAG_HIGHEST="-O2"
49586      C_O_FLAG_HI="-O1"
49587      C_O_FLAG_NORM="-O1"
49588      C_O_FLAG_DEBUG="-Od"
49589      C_O_FLAG_DEBUG_JVM=""
49590      C_O_FLAG_NONE="-Od"
49591      C_O_FLAG_SIZE="-Os"
49592    fi
49593    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49594    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49595    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49596    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49597    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49598    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49599    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49600    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49601  fi
49602
49603  # Adjust optimization flags according to debug level.
49604  case $DEBUG_LEVEL in
49605    release )
49606      # no adjustment
49607      ;;
49608    fastdebug )
49609      # Not quite so much optimization
49610      C_O_FLAG_HI="$C_O_FLAG_NORM"
49611      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49612      ;;
49613    slowdebug )
49614      # Disable optimization
49615      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49616      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49617      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49618      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49619      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49620      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49621      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49622      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49623      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49624      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49625      ;;
49626  esac
49627
49628
49629
49630
49631
49632
49633
49634
49635
49636
49637
49638
49639
49640
49641
49642
49643
49644
49645
49646  # Special extras...
49647  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49648    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49649      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49650      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49651    fi
49652    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49653    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49654  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49655    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49656    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49657  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49658    CXXSTD_CXXFLAG="-std=gnu++98"
49659
49660
49661
49662
49663
49664
49665
49666
49667
49668
49669
49670
49671
49672
49673
49674
49675
49676
49677
49678
49679
49680
49681
49682
49683
49684
49685
49686
49687
49688
49689
49690
49691
49692
49693
49694
49695
49696
49697
49698
49699
49700
49701    # Execute function body
49702
49703  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49704$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49705  supports=yes
49706
49707  saved_cxxflags="$CXXFLAGS"
49708  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49709  ac_ext=cpp
49710ac_cpp='$CXXCPP $CPPFLAGS'
49711ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49712ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49713ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49714
49715  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49716/* end confdefs.h.  */
49717int i;
49718_ACEOF
49719if ac_fn_cxx_try_compile "$LINENO"; then :
49720
49721else
49722  supports=no
49723fi
49724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49725  ac_ext=cpp
49726ac_cpp='$CXXCPP $CPPFLAGS'
49727ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49728ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49729ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49730
49731  CXXFLAGS="$saved_cxxflags"
49732
49733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49734$as_echo "$supports" >&6; }
49735  if test "x$supports" = "xyes" ; then
49736    :
49737
49738  else
49739    :
49740    CXXSTD_CXXFLAG=""
49741  fi
49742
49743
49744
49745
49746
49747
49748
49749
49750
49751
49752
49753
49754    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49755    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49756
49757  fi
49758  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49759    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49760    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49761  fi
49762
49763  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49764    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49765    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49766  fi
49767
49768  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49769  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49770  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49771
49772  ###############################################################################
49773  #
49774  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49775  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49776  #
49777
49778  # Setup compiler/platform specific flags into
49779  #    CFLAGS_JDK    - C Compiler flags
49780  #    CXXFLAGS_JDK  - C++ Compiler flags
49781  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49782  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49783    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49784    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49785    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49786    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49787      # Force compatibility with i586 on 32 bit intel platforms.
49788      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49789      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49790    fi
49791    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49792        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49793    case $OPENJDK_TARGET_CPU_ARCH in
49794      arm )
49795        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49796        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49797        ;;
49798      ppc )
49799        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49800        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49801        ;;
49802      s390 )
49803        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49804        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49805        ;;
49806      * )
49807        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49808        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49809        ;;
49810    esac
49811
49812
49813
49814
49815
49816
49817
49818
49819
49820
49821
49822
49823
49824
49825
49826
49827
49828
49829
49830
49831
49832
49833
49834
49835
49836
49837
49838
49839
49840
49841
49842
49843
49844
49845
49846
49847
49848
49849
49850
49851
49852
49853
49854
49855
49856
49857
49858
49859
49860
49861
49862
49863
49864
49865    # Execute function body
49866
49867  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49868  REFERENCE_VERSION=6
49869
49870  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
49871    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
49872  fi
49873
49874  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49875    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49876  fi
49877
49878  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49879  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
49880
49881  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49882    :
49883
49884  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49885  # runs afoul of the more aggressive versions of these optimisations.
49886  # Notably, value range propagation now assumes that the this pointer of C++
49887  # member functions is non-null.
49888  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
49889        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49890        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
49891$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
49892  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49893  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49894
49895  else
49896    :
49897
49898  fi
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908
49909
49910
49911
49912
49913  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49914    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49915
49916    # Restrict the debug information created by Clang to avoid
49917    # too big object files and speed the build up a little bit
49918    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49919    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49920    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49921      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49922        # Force compatibility with i586 on 32 bit intel platforms.
49923        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49924        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49925      fi
49926      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49927      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49928          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49929      case $OPENJDK_TARGET_CPU_ARCH in
49930        ppc )
49931          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49932          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49933          ;;
49934        * )
49935          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49936          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49937          ;;
49938      esac
49939    fi
49940  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49941    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49942    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49943    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49944      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49945    fi
49946
49947    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49948    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49949  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49950    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49951    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49952    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49953  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49954    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49955        -MD -Zc:wchar_t- -W3 -wd4800 \
49956        -DWIN32_LEAN_AND_MEAN \
49957        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49958        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49959        -DWIN32 -DIAL"
49960    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49961      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49962    else
49963      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
49964    fi
49965    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
49966    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
49967    # studio.
49968    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
49969      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
49970      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
49971      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
49972    fi
49973  fi
49974
49975  ###############################################################################
49976
49977  # Adjust flags according to debug level.
49978  case $DEBUG_LEVEL in
49979    fastdebug | slowdebug )
49980      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
49981      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
49982      ;;
49983    release )
49984      ;;
49985    * )
49986      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
49987      ;;
49988  esac
49989
49990  # Set some common defines. These works for all compilers, but assume
49991  # -D is universally accepted.
49992
49993  # Setup endianness
49994  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49995    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
49996    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
49997    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
49998    #   Note: -Dmacro         is the same as    #define macro 1
49999    #         -Dmacro=        is the same as    #define macro
50000    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50001      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50002    else
50003      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50004    fi
50005  else
50006    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50007    # are defined in the system?
50008    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50009      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50010    else
50011      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50012    fi
50013  fi
50014
50015  # Setup target OS define. Use OS target name but in upper case.
50016  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50017  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50018
50019  # Setup target CPU
50020  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50021      $OPENJDK_TARGET_ADD_LP64 \
50022      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50023
50024  # Setup debug/release defines
50025  if test "x$DEBUG_LEVEL" = xrelease; then
50026    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50027    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50028      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50029    fi
50030  else
50031    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50032  fi
50033
50034  # Set some additional per-OS defines.
50035  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50036    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50037    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50038        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50039  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50040    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50041    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50042        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50043  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50044    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50045    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50046    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50047    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50048        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50049        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50050        -fno-omit-frame-pointer"
50051  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50052    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50053    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50054    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50055        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50056        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50057  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50058    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50059  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50060    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50061    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50062  fi
50063
50064  # Set some additional per-CPU defines.
50065  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50066    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50067  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50068    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50069  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50070    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50071      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50072      # fixes `relocation truncated to fit' error for gcc 4.1.
50073      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50074      # Use ppc64 instructions, but schedule for power5
50075      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50076    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50077      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50078    fi
50079  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50080    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50081      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50082      # Little endian machine uses ELFv2 ABI.
50083      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50084      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50085      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50086    fi
50087  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50088    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50089      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50090    fi
50091  fi
50092
50093  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50094    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50095  fi
50096
50097  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50098    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50099      # Solaris does not have _LP64=1 in the old build.
50100      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50101      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50102    fi
50103  fi
50104
50105  # Set JVM_CFLAGS warning handling
50106  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50107    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50108        -Wunused-value -Woverloaded-virtual"
50109
50110    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50111
50112
50113
50114
50115
50116
50117
50118
50119
50120
50121
50122
50123
50124
50125
50126
50127
50128
50129
50130
50131
50132
50133
50134
50135
50136
50137
50138
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    # Execute function body
50166
50167  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50168  REFERENCE_VERSION=4.8
50169
50170  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50171    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50172  fi
50173
50174  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50175    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50176  fi
50177
50178  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50179  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50180
50181  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50182    :
50183
50184            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50185            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50186
50187
50188  else
50189    :
50190
50191  fi
50192
50193
50194
50195
50196
50197
50198
50199
50200
50201
50202
50203
50204
50205
50206    fi
50207    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50208      # Non-zero builds have stricter warnings
50209      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50210    else
50211      if test "x$TOOLCHAIN_TYPE" = xclang; then
50212        # Some versions of llvm do not like -Wundef
50213        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50214      fi
50215    fi
50216  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50217    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50218        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50219  fi
50220
50221  # Additional macosx handling
50222  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50223    # Setting these parameters makes it an error to link to macosx APIs that are
50224    # newer than the given OS version and makes the linked binaries compatible
50225    # even if built on a newer version of the OS.
50226    # The expected format is X.Y.Z
50227    MACOSX_VERSION_MIN=10.7.0
50228
50229
50230    # The macro takes the version with no dots, ex: 1070
50231    # Let the flags variables get resolved in make for easier override on make
50232    # command line.
50233    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50234    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50235  fi
50236
50237  # Setup some hard coded includes
50238  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50239      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50240      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50241      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50242      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50243      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50244      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50245
50246  # The shared libraries are compiled using the picflag.
50247  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50248      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50249  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50250      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50251
50252  # Executable flags
50253  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50254  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50255
50256
50257
50258
50259
50260
50261  # Setup LDFLAGS et al.
50262  #
50263
50264  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50265    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50266    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50267    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50268    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50269      LDFLAGS_SAFESH="-safeseh"
50270      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50271      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50272      # NOTE: Old build added -machine. Probably not needed.
50273      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50274    else
50275      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50276    fi
50277  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50278      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50279      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50280        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50281        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50282    fi
50283  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50284    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50285    # We have previously set HAS_GNU_HASH if this is the case
50286    if test -n "$HAS_GNU_HASH"; then
50287      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50288      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50289      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50290    fi
50291      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50292        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50293    fi
50294    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50295      # And since we now know that the linker is gnu, then add -z defs, to forbid
50296      # undefined symbols in object files.
50297      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50298      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50299      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50300      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50301      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50302      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50303        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50304      fi
50305      case $DEBUG_LEVEL in
50306        release )
50307          # tell linker to optimize libraries.
50308          # Should this be supplied to the OSS linker as well?
50309          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50310          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50311          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50312          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50313            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50314          fi
50315          ;;
50316        slowdebug )
50317          # Hotspot always let the linker optimize
50318          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50319          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50320            # do relocations at load
50321            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50322            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50323            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50324          fi
50325          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50326            # mark relocations read only
50327            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50328            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50329            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50330          fi
50331          ;;
50332        fastdebug )
50333          # Hotspot always let the linker optimize
50334          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50335          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50336            # mark relocations read only
50337            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50338            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50339            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50340          fi
50341          ;;
50342        * )
50343          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50344          ;;
50345        esac
50346    fi
50347  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50348    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50349    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50350    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50351    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50352    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50353    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50354      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50355    fi
50356  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50357    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50358    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50359    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50360  fi
50361
50362  # Customize LDFLAGS for executables
50363
50364  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50365
50366  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50367    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50368      LDFLAGS_STACK_SIZE=1048576
50369    else
50370      LDFLAGS_STACK_SIZE=327680
50371    fi
50372    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50373  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50374    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50375  fi
50376
50377  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50378
50379  # Customize LDFLAGS for libs
50380  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50381
50382  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50383  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50384    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50385        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50386    JDKLIB_LIBS=""
50387  else
50388    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50389        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50390
50391    if test "xTARGET" = "xTARGET"; then
50392      # On some platforms (mac) the linker warns about non existing -L dirs.
50393      # For any of the variants server, client or minimal, the dir matches the
50394      # variant name. The "main" variant should be used for linking. For the
50395      # rest, the dir is just server.
50396      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
50397          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50398        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50399            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/$JVM_VARIANT_MAIN"
50400      else
50401        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50402            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50403      fi
50404    elif test "xTARGET" = "xBUILD"; then
50405      # When building a buildjdk, it's always only the server variant
50406      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50407          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50408    fi
50409
50410    JDKLIB_LIBS="-ljava -ljvm"
50411    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50412      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50413    fi
50414
50415  fi
50416
50417LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50418
50419  # Set JVM_LIBS (per os)
50420  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50421    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50422  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50423    # FIXME: This hard-coded path is not really proper.
50424    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50425      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50426    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50427      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50428    fi
50429    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50430        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50431  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50432    JVM_LIBS="$JVM_LIBS -lm"
50433  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50434    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50435  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50436    JVM_LIBS="$JVM_LIBS -lm"
50437  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50438    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50439        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50440        wsock32.lib winmm.lib version.lib psapi.lib"
50441    fi
50442
50443  # Set JVM_ASFLAGS
50444  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50445    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50446      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50447    fi
50448  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50449    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50450  fi
50451
50452  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50453
50454
50455
50456
50457
50458
50459
50460
50461
50462
50463
50464
50465
50466
50467
50468  # Special extras...
50469  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50470    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50471      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50472      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50473    fi
50474    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50475    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50476  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50477    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50478    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50479  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50480    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50481
50482
50483
50484
50485
50486
50487
50488
50489
50490
50491
50492
50493
50494
50495
50496
50497
50498
50499
50500
50501
50502
50503
50504
50505
50506
50507
50508
50509
50510
50511
50512
50513
50514
50515
50516
50517
50518
50519
50520
50521
50522
50523    # Execute function body
50524
50525  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50526$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50527  supports=yes
50528
50529  saved_cxxflags="$CXXFLAGS"
50530  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50531  ac_ext=cpp
50532ac_cpp='$CXXCPP $CPPFLAGS'
50533ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50534ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50535ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50536
50537  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50538/* end confdefs.h.  */
50539int i;
50540_ACEOF
50541if ac_fn_cxx_try_compile "$LINENO"; then :
50542
50543else
50544  supports=no
50545fi
50546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50547  ac_ext=cpp
50548ac_cpp='$CXXCPP $CPPFLAGS'
50549ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50550ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50551ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50552
50553  CXXFLAGS="$saved_cxxflags"
50554
50555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50556$as_echo "$supports" >&6; }
50557  if test "x$supports" = "xyes" ; then
50558    :
50559
50560  else
50561    :
50562    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50563  fi
50564
50565
50566
50567
50568
50569
50570
50571
50572
50573
50574
50575
50576    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50577    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50578
50579  fi
50580  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50581    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50582    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50583  fi
50584
50585  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50586    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50587    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50588  fi
50589
50590  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50591  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50592  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50593
50594  ###############################################################################
50595  #
50596  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50597  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50598  #
50599
50600  # Setup compiler/platform specific flags into
50601  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50602  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50603  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50604  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50605    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50606    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50607    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50608    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50609      # Force compatibility with i586 on 32 bit intel platforms.
50610      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50611      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50612    fi
50613    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50614        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50615    case $OPENJDK_BUILD_CPU_ARCH in
50616      arm )
50617        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50618        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50619        ;;
50620      ppc )
50621        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50622        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50623        ;;
50624      s390 )
50625        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50626        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50627        ;;
50628      * )
50629        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50630        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50631        ;;
50632    esac
50633
50634
50635
50636
50637
50638
50639
50640
50641
50642
50643
50644
50645
50646
50647
50648
50649
50650
50651
50652
50653
50654
50655
50656
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    # Execute function body
50688
50689  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50690  REFERENCE_VERSION=6
50691
50692  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50693    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50694  fi
50695
50696  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50697    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50698  fi
50699
50700  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50701  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50702
50703  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50704    :
50705
50706  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50707  # runs afoul of the more aggressive versions of these optimisations.
50708  # Notably, value range propagation now assumes that the this pointer of C++
50709  # member functions is non-null.
50710  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50711        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50712        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50713$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50714  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50715  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50716
50717  else
50718    :
50719
50720  fi
50721
50722
50723
50724
50725
50726
50727
50728
50729
50730
50731
50732
50733
50734
50735  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50736    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50737
50738    # Restrict the debug information created by Clang to avoid
50739    # too big object files and speed the build up a little bit
50740    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50741    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50742    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50743      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50744        # Force compatibility with i586 on 32 bit intel platforms.
50745        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50746        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50747      fi
50748      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50749      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50750          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50751      case $OPENJDK_BUILD_CPU_ARCH in
50752        ppc )
50753          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50754          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50755          ;;
50756        * )
50757          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50758          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50759          ;;
50760      esac
50761    fi
50762  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50763    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50764    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50765    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50766      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50767    fi
50768
50769    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50770    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50771  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50772    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50773    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50774    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50775  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50776    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50777        -MD -Zc:wchar_t- -W3 -wd4800 \
50778        -DWIN32_LEAN_AND_MEAN \
50779        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50780        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50781        -DWIN32 -DIAL"
50782    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50783      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50784    else
50785      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50786    fi
50787    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50788    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50789    # studio.
50790    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50791      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50792      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50793      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50794    fi
50795  fi
50796
50797  ###############################################################################
50798
50799  # Adjust flags according to debug level.
50800  case $DEBUG_LEVEL in
50801    fastdebug | slowdebug )
50802      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50803      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50804      ;;
50805    release )
50806      ;;
50807    * )
50808      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50809      ;;
50810  esac
50811
50812  # Set some common defines. These works for all compilers, but assume
50813  # -D is universally accepted.
50814
50815  # Setup endianness
50816  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50817    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50818    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50819    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50820    #   Note: -Dmacro         is the same as    #define macro 1
50821    #         -Dmacro=        is the same as    #define macro
50822    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50823      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50824    else
50825      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50826    fi
50827  else
50828    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50829    # are defined in the system?
50830    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50831      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50832    else
50833      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50834    fi
50835  fi
50836
50837  # Setup target OS define. Use OS target name but in upper case.
50838  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50839  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50840
50841  # Setup target CPU
50842  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50843      $OPENJDK_BUILD_ADD_LP64 \
50844      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50845
50846  # Setup debug/release defines
50847  if test "x$DEBUG_LEVEL" = xrelease; then
50848    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50849    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50850      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50851    fi
50852  else
50853    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50854  fi
50855
50856  # Set some additional per-OS defines.
50857  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50858    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50859    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50860        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50861  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50862    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50863    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50864        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50865  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50866    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50867    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50868    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50869    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50870        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50871        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50872        -fno-omit-frame-pointer"
50873  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50874    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50875    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50876    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
50877        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50878        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50879  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50880    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50881  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50882    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50883    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50884  fi
50885
50886  # Set some additional per-CPU defines.
50887  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50888    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50889  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50890    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50891  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50892    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50893      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50894      # fixes `relocation truncated to fit' error for gcc 4.1.
50895      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50896      # Use ppc64 instructions, but schedule for power5
50897      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50898    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50899      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50900    fi
50901  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50902    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50903      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50904      # Little endian machine uses ELFv2 ABI.
50905      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50906      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50907      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
50908    fi
50909  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
50910    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50911      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
50912    fi
50913  fi
50914
50915  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50916    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50917  fi
50918
50919  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50920    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50921      # Solaris does not have _LP64=1 in the old build.
50922      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50923      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50924    fi
50925  fi
50926
50927  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50928  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50929    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50930        -Wunused-value -Woverloaded-virtual"
50931
50932    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50933
50934
50935
50936
50937
50938
50939
50940
50941
50942
50943
50944
50945
50946
50947
50948
50949
50950
50951
50952
50953
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    # Execute function body
50988
50989  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50990  REFERENCE_VERSION=4.8
50991
50992  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50993    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50994  fi
50995
50996  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50997    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50998  fi
50999
51000  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51001  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51002
51003  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51004    :
51005
51006            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51007            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51008
51009
51010  else
51011    :
51012
51013  fi
51014
51015
51016
51017
51018
51019
51020
51021
51022
51023
51024
51025
51026
51027
51028    fi
51029    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51030      # Non-zero builds have stricter warnings
51031      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51032    else
51033      if test "x$TOOLCHAIN_TYPE" = xclang; then
51034        # Some versions of llvm do not like -Wundef
51035        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51036      fi
51037    fi
51038  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51039    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51040        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51041  fi
51042
51043  # Additional macosx handling
51044  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51045    # Setting these parameters makes it an error to link to macosx APIs that are
51046    # newer than the given OS version and makes the linked binaries compatible
51047    # even if built on a newer version of the OS.
51048    # The expected format is X.Y.Z
51049    MACOSX_VERSION_MIN=10.7.0
51050
51051
51052    # The macro takes the version with no dots, ex: 1070
51053    # Let the flags variables get resolved in make for easier override on make
51054    # command line.
51055    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)"
51056    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51057  fi
51058
51059  # Setup some hard coded includes
51060  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51061      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51062      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51063      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51064      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51065      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51066      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51067
51068  # The shared libraries are compiled using the picflag.
51069  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51070      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51071  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51072      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51073
51074  # Executable flags
51075  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51076  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51077
51078
51079
51080
51081
51082
51083  # Setup LDFLAGS et al.
51084  #
51085
51086  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51087    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51088    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51089    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51090    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51091      LDFLAGS_SAFESH="-safeseh"
51092      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51093      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51094      # NOTE: Old build added -machine. Probably not needed.
51095      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51096    else
51097      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51098    fi
51099  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51100      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51101      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51102        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51103        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51104    fi
51105  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51106    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51107    # We have previously set HAS_GNU_HASH if this is the case
51108    if test -n "$HAS_GNU_HASH"; then
51109      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51110      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51111      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51112    fi
51113      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51114        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51115    fi
51116    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51117      # And since we now know that the linker is gnu, then add -z defs, to forbid
51118      # undefined symbols in object files.
51119      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51120      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51121      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51122      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51123      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51124      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51125        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51126      fi
51127      case $DEBUG_LEVEL in
51128        release )
51129          # tell linker to optimize libraries.
51130          # Should this be supplied to the OSS linker as well?
51131          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51132          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51133          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51134          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51135            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51136          fi
51137          ;;
51138        slowdebug )
51139          # Hotspot always let the linker optimize
51140          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51141          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51142            # do relocations at load
51143            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51144            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51145            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51146          fi
51147          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51148            # mark relocations read only
51149            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51150            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51151            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51152          fi
51153          ;;
51154        fastdebug )
51155          # Hotspot always let the linker optimize
51156          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51157          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51158            # mark relocations read only
51159            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51160            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51161            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51162          fi
51163          ;;
51164        * )
51165          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51166          ;;
51167        esac
51168    fi
51169  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51170    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51171    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51172    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51173    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51174    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51175    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51176      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51177    fi
51178  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51179    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51180    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51181    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51182  fi
51183
51184  # Customize LDFLAGS for executables
51185
51186  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51187
51188  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51189    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51190      LDFLAGS_STACK_SIZE=1048576
51191    else
51192      LDFLAGS_STACK_SIZE=327680
51193    fi
51194    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51195  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51196    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51197  fi
51198
51199  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51200
51201  # Customize LDFLAGS for libs
51202  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51203
51204  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51205  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51206    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51207        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51208    OPENJDK_BUILD_JDKLIB_LIBS=""
51209  else
51210    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51211        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51212
51213    if test "xBUILD" = "xTARGET"; then
51214      # On some platforms (mac) the linker warns about non existing -L dirs.
51215      # For any of the variants server, client or minimal, the dir matches the
51216      # variant name. The "main" variant should be used for linking. For the
51217      # rest, the dir is just server.
51218      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51219          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51220        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51221            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/$JVM_VARIANT_MAIN"
51222      else
51223        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51224            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51225      fi
51226    elif test "xBUILD" = "xBUILD"; then
51227      # When building a buildjdk, it's always only the server variant
51228      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51229          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51230    fi
51231
51232    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51233    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51234      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51235    fi
51236
51237  fi
51238
51239OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51240
51241  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51242  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51243    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51244  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51245    # FIXME: This hard-coded path is not really proper.
51246    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51247      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51248    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51249      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51250    fi
51251    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51252        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51253  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51254    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51255  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51256    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51257  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51258    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51259  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51260    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51261        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51262        wsock32.lib winmm.lib version.lib psapi.lib"
51263    fi
51264
51265  # Set OPENJDK_BUILD_JVM_ASFLAGS
51266  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51267    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51268      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51269    fi
51270  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51271    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51272  fi
51273
51274  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51275
51276
51277
51278
51279
51280
51281
51282
51283
51284
51285
51286
51287
51288
51289
51290  # Tests are only ever compiled for TARGET
51291  # Flags for compiling test libraries
51292  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51293  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51294
51295  # Flags for compiling test executables
51296  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51297  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51298
51299
51300
51301
51302
51303
51304  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51305  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51306
51307
51308
51309
51310
51311
51312  # Some Zero and Shark settings.
51313  # ZERO_ARCHFLAG tells the compiler which mode to build for
51314  case "${OPENJDK_TARGET_CPU}" in
51315    s390)
51316      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51317      ;;
51318    *)
51319      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51320  esac
51321
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336
51337
51338
51339
51340
51341
51342
51343
51344
51345
51346
51347
51348
51349
51350
51351
51352
51353
51354
51355
51356
51357
51358
51359
51360
51361
51362
51363    # Execute function body
51364
51365
51366
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382
51383
51384
51385
51386
51387
51388
51389
51390
51391
51392
51393
51394
51395
51396
51397
51398
51399
51400
51401
51402
51403
51404
51405
51406
51407
51408
51409
51410
51411
51412    # Execute function body
51413
51414  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51415$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51416  supports=yes
51417
51418  saved_cflags="$CFLAGS"
51419  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51420  ac_ext=c
51421ac_cpp='$CPP $CPPFLAGS'
51422ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51423ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51424ac_compiler_gnu=$ac_cv_c_compiler_gnu
51425
51426  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51427/* end confdefs.h.  */
51428int i;
51429_ACEOF
51430if ac_fn_c_try_compile "$LINENO"; then :
51431
51432else
51433  supports=no
51434fi
51435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51436  ac_ext=cpp
51437ac_cpp='$CXXCPP $CPPFLAGS'
51438ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51439ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51440ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51441
51442  CFLAGS="$saved_cflags"
51443
51444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51445$as_echo "$supports" >&6; }
51446  if test "x$supports" = "xyes" ; then
51447    :
51448    C_COMP_SUPPORTS="yes"
51449  else
51450    :
51451    C_COMP_SUPPORTS="no"
51452  fi
51453
51454
51455
51456
51457
51458
51459
51460
51461
51462
51463
51464
51465
51466
51467
51468
51469
51470
51471
51472
51473
51474
51475
51476
51477
51478
51479
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    # Execute function body
51513
51514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51515$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51516  supports=yes
51517
51518  saved_cxxflags="$CXXFLAGS"
51519  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51520  ac_ext=cpp
51521ac_cpp='$CXXCPP $CPPFLAGS'
51522ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51523ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51524ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51525
51526  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51527/* end confdefs.h.  */
51528int i;
51529_ACEOF
51530if ac_fn_cxx_try_compile "$LINENO"; then :
51531
51532else
51533  supports=no
51534fi
51535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51536  ac_ext=cpp
51537ac_cpp='$CXXCPP $CPPFLAGS'
51538ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51539ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51540ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51541
51542  CXXFLAGS="$saved_cxxflags"
51543
51544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51545$as_echo "$supports" >&6; }
51546  if test "x$supports" = "xyes" ; then
51547    :
51548    CXX_COMP_SUPPORTS="yes"
51549  else
51550    :
51551    CXX_COMP_SUPPORTS="no"
51552  fi
51553
51554
51555
51556
51557
51558
51559
51560
51561
51562
51563
51564
51565
51566  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51567$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51568  supports=no
51569  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51570
51571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51572$as_echo "$supports" >&6; }
51573  if test "x$supports" = "xyes" ; then
51574    :
51575
51576  else
51577    :
51578    ZERO_ARCHFLAG=""
51579  fi
51580
51581
51582
51583
51584
51585
51586
51587
51588  # Check that the compiler supports -mX (or -qX on AIX) flags
51589  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51590
51591
51592
51593
51594
51595
51596
51597
51598
51599
51600
51601
51602
51603
51604
51605
51606
51607
51608
51609
51610
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    # Execute function body
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675
51676
51677
51678
51679
51680
51681
51682
51683
51684
51685
51686    # Execute function body
51687
51688  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51689$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51690  supports=yes
51691
51692  saved_cflags="$CFLAGS"
51693  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51694  ac_ext=c
51695ac_cpp='$CPP $CPPFLAGS'
51696ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51697ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51698ac_compiler_gnu=$ac_cv_c_compiler_gnu
51699
51700  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51701/* end confdefs.h.  */
51702int i;
51703_ACEOF
51704if ac_fn_c_try_compile "$LINENO"; then :
51705
51706else
51707  supports=no
51708fi
51709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51710  ac_ext=cpp
51711ac_cpp='$CXXCPP $CPPFLAGS'
51712ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51713ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51714ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51715
51716  CFLAGS="$saved_cflags"
51717
51718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51719$as_echo "$supports" >&6; }
51720  if test "x$supports" = "xyes" ; then
51721    :
51722    C_COMP_SUPPORTS="yes"
51723  else
51724    :
51725    C_COMP_SUPPORTS="no"
51726  fi
51727
51728
51729
51730
51731
51732
51733
51734
51735
51736
51737
51738
51739
51740
51741
51742
51743
51744
51745
51746
51747
51748
51749
51750
51751
51752
51753
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    # Execute function body
51787
51788  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51789$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51790  supports=yes
51791
51792  saved_cxxflags="$CXXFLAGS"
51793  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51794  ac_ext=cpp
51795ac_cpp='$CXXCPP $CPPFLAGS'
51796ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51797ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51798ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51799
51800  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51801/* end confdefs.h.  */
51802int i;
51803_ACEOF
51804if ac_fn_cxx_try_compile "$LINENO"; then :
51805
51806else
51807  supports=no
51808fi
51809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51810  ac_ext=cpp
51811ac_cpp='$CXXCPP $CPPFLAGS'
51812ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51813ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51814ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51815
51816  CXXFLAGS="$saved_cxxflags"
51817
51818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51819$as_echo "$supports" >&6; }
51820  if test "x$supports" = "xyes" ; then
51821    :
51822    CXX_COMP_SUPPORTS="yes"
51823  else
51824    :
51825    CXX_COMP_SUPPORTS="no"
51826  fi
51827
51828
51829
51830
51831
51832
51833
51834
51835
51836
51837
51838
51839
51840  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51841$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51842  supports=no
51843  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51844
51845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51846$as_echo "$supports" >&6; }
51847  if test "x$supports" = "xyes" ; then
51848    :
51849    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51850  else
51851    :
51852    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51853  fi
51854
51855
51856
51857
51858
51859
51860
51861
51862  # Check whether --enable-warnings-as-errors was given.
51863if test "${enable_warnings_as_errors+set}" = set; then :
51864  enableval=$enable_warnings_as_errors;
51865fi
51866
51867
51868  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51869$as_echo_n "checking if native warnings are errors... " >&6; }
51870  if test "x$enable_warnings_as_errors" = "xyes"; then
51871    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
51872$as_echo "yes (explicitly set)" >&6; }
51873    WARNINGS_AS_ERRORS=true
51874  elif test "x$enable_warnings_as_errors" = "xno"; then
51875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51876$as_echo "no" >&6; }
51877    WARNINGS_AS_ERRORS=false
51878  elif test "x$enable_warnings_as_errors" = "x"; then
51879    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51880$as_echo "yes (default)" >&6; }
51881    WARNINGS_AS_ERRORS=true
51882  else
51883    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51884  fi
51885
51886  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51887    # Set legacy hotspot variable
51888    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51889  else
51890    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51891  fi
51892
51893
51894
51895
51896  case "${TOOLCHAIN_TYPE}" in
51897    microsoft)
51898      DISABLE_WARNING_PREFIX="-wd"
51899      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51900      ;;
51901    solstudio)
51902      DISABLE_WARNING_PREFIX="-erroff="
51903      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51904      ;;
51905    gcc)
51906      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946
51947
51948
51949
51950
51951
51952
51953
51954    # Execute function body
51955
51956
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975
51976
51977
51978
51979
51980
51981
51982
51983
51984
51985
51986
51987
51988
51989
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999
52000
52001
52002
52003    # Execute function body
52004
52005  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52006$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52007  supports=yes
52008
52009  saved_cflags="$CFLAGS"
52010  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52011  ac_ext=c
52012ac_cpp='$CPP $CPPFLAGS'
52013ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52014ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52015ac_compiler_gnu=$ac_cv_c_compiler_gnu
52016
52017  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52018/* end confdefs.h.  */
52019int i;
52020_ACEOF
52021if ac_fn_c_try_compile "$LINENO"; then :
52022
52023else
52024  supports=no
52025fi
52026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52027  ac_ext=cpp
52028ac_cpp='$CXXCPP $CPPFLAGS'
52029ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52030ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52031ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52032
52033  CFLAGS="$saved_cflags"
52034
52035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52036$as_echo "$supports" >&6; }
52037  if test "x$supports" = "xyes" ; then
52038    :
52039    C_COMP_SUPPORTS="yes"
52040  else
52041    :
52042    C_COMP_SUPPORTS="no"
52043  fi
52044
52045
52046
52047
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063
52064
52065
52066
52067
52068
52069
52070
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    # Execute function body
52104
52105  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52106$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52107  supports=yes
52108
52109  saved_cxxflags="$CXXFLAGS"
52110  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52111  ac_ext=cpp
52112ac_cpp='$CXXCPP $CPPFLAGS'
52113ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52114ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52115ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52116
52117  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52118/* end confdefs.h.  */
52119int i;
52120_ACEOF
52121if ac_fn_cxx_try_compile "$LINENO"; then :
52122
52123else
52124  supports=no
52125fi
52126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52127  ac_ext=cpp
52128ac_cpp='$CXXCPP $CPPFLAGS'
52129ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52130ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52131ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52132
52133  CXXFLAGS="$saved_cxxflags"
52134
52135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52136$as_echo "$supports" >&6; }
52137  if test "x$supports" = "xyes" ; then
52138    :
52139    CXX_COMP_SUPPORTS="yes"
52140  else
52141    :
52142    CXX_COMP_SUPPORTS="no"
52143  fi
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153
52154
52155
52156
52157  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52158$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52159  supports=no
52160  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52161
52162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52163$as_echo "$supports" >&6; }
52164  if test "x$supports" = "xyes" ; then
52165    :
52166    GCC_CAN_DISABLE_WARNINGS=true
52167  else
52168    :
52169    GCC_CAN_DISABLE_WARNINGS=false
52170
52171  fi
52172
52173
52174
52175
52176
52177
52178      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52179        DISABLE_WARNING_PREFIX="-Wno-"
52180      else
52181        DISABLE_WARNING_PREFIX=
52182      fi
52183      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52184      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52185      # CFLAGS since any target specific flags will likely not work with the
52186      # build compiler
52187      CC_OLD="$CC"
52188      CXX_OLD="$CXX"
52189      CC="$BUILD_CC"
52190      CXX="$BUILD_CXX"
52191      CFLAGS_OLD="$CFLAGS"
52192      CFLAGS=""
52193
52194
52195
52196
52197
52198
52199
52200
52201
52202
52203
52204
52205
52206
52207
52208
52209
52210
52211
52212
52213
52214
52215
52216
52217
52218
52219
52220
52221
52222
52223
52224
52225
52226
52227
52228
52229
52230
52231
52232
52233
52234
52235
52236
52237
52238
52239
52240    # Execute function body
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278
52279
52280
52281
52282
52283
52284
52285
52286
52287
52288
52289    # Execute function body
52290
52291  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52292$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52293  supports=yes
52294
52295  saved_cflags="$CFLAGS"
52296  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52297  ac_ext=c
52298ac_cpp='$CPP $CPPFLAGS'
52299ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52300ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52301ac_compiler_gnu=$ac_cv_c_compiler_gnu
52302
52303  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52304/* end confdefs.h.  */
52305int i;
52306_ACEOF
52307if ac_fn_c_try_compile "$LINENO"; then :
52308
52309else
52310  supports=no
52311fi
52312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52313  ac_ext=cpp
52314ac_cpp='$CXXCPP $CPPFLAGS'
52315ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52316ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52317ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52318
52319  CFLAGS="$saved_cflags"
52320
52321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52322$as_echo "$supports" >&6; }
52323  if test "x$supports" = "xyes" ; then
52324    :
52325    C_COMP_SUPPORTS="yes"
52326  else
52327    :
52328    C_COMP_SUPPORTS="no"
52329  fi
52330
52331
52332
52333
52334
52335
52336
52337
52338
52339
52340
52341
52342
52343
52344
52345
52346
52347
52348
52349
52350
52351
52352
52353
52354
52355
52356
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    # Execute function body
52390
52391  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52392$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52393  supports=yes
52394
52395  saved_cxxflags="$CXXFLAGS"
52396  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52397  ac_ext=cpp
52398ac_cpp='$CXXCPP $CPPFLAGS'
52399ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52400ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52401ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52402
52403  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52404/* end confdefs.h.  */
52405int i;
52406_ACEOF
52407if ac_fn_cxx_try_compile "$LINENO"; then :
52408
52409else
52410  supports=no
52411fi
52412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52413  ac_ext=cpp
52414ac_cpp='$CXXCPP $CPPFLAGS'
52415ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52416ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52417ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52418
52419  CXXFLAGS="$saved_cxxflags"
52420
52421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52422$as_echo "$supports" >&6; }
52423  if test "x$supports" = "xyes" ; then
52424    :
52425    CXX_COMP_SUPPORTS="yes"
52426  else
52427    :
52428    CXX_COMP_SUPPORTS="no"
52429  fi
52430
52431
52432
52433
52434
52435
52436
52437
52438
52439
52440
52441
52442
52443  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52444$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52445  supports=no
52446  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52447
52448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52449$as_echo "$supports" >&6; }
52450  if test "x$supports" = "xyes" ; then
52451    :
52452    BUILD_CC_CAN_DISABLE_WARNINGS=true
52453  else
52454    :
52455    BUILD_CC_CAN_DISABLE_WARNINGS=false
52456
52457  fi
52458
52459
52460
52461
52462
52463
52464      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52465        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52466      else
52467        BUILD_CC_DISABLE_WARNING_PREFIX=
52468      fi
52469      CC="$CC_OLD"
52470      CXX="$CXX_OLD"
52471      CFLAGS="$CFLAGS_OLD"
52472      ;;
52473    clang)
52474      DISABLE_WARNING_PREFIX="-Wno-"
52475      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52476      ;;
52477    xlc)
52478      DISABLE_WARNING_PREFIX="-qsuppress="
52479      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52480      ;;
52481  esac
52482
52483
52484
52485
52486
52487# Setup debug symbols (need objcopy from the toolchain for that)
52488
52489  #
52490  # NATIVE_DEBUG_SYMBOLS
52491  # This must be done after the toolchain is setup, since we're looking at objcopy.
52492  #
52493  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52494$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52495
52496# Check whether --with-native-debug-symbols was given.
52497if test "${with_native_debug_symbols+set}" = set; then :
52498  withval=$with_native_debug_symbols;
52499        if test "x$OPENJDK_TARGET_OS" = xaix; then
52500          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52501            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52502          fi
52503        fi
52504
52505else
52506
52507        if test "x$OPENJDK_TARGET_OS" = xaix; then
52508          # AIX doesn't support 'zipped' so use 'internal' as default
52509          with_native_debug_symbols="internal"
52510        else
52511          if test "x$STATIC_BUILD" = xtrue; then
52512            with_native_debug_symbols="none"
52513          else
52514            with_native_debug_symbols="zipped"
52515          fi
52516        fi
52517
52518fi
52519
52520  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52522$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52523
52524  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52525
52526    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52527      if test "x$OBJCOPY" = x; then
52528        # enabling of enable-debug-symbols and can't find objcopy
52529        # this is an error
52530        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52531      fi
52532    fi
52533
52534    COMPILE_WITH_DEBUG_SYMBOLS=true
52535    COPY_DEBUG_SYMBOLS=true
52536    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52537  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52538    COMPILE_WITH_DEBUG_SYMBOLS=false
52539    COPY_DEBUG_SYMBOLS=false
52540    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52541  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52542    COMPILE_WITH_DEBUG_SYMBOLS=true
52543    COPY_DEBUG_SYMBOLS=false
52544    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52545  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; 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=false
52558  else
52559    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52560  fi
52561
52562  # --enable-debug-symbols is deprecated.
52563  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52564
52565  # Check whether --enable-debug-symbols was given.
52566if test "${enable_debug_symbols+set}" = set; then :
52567  enableval=$enable_debug_symbols;
52568fi
52569
52570  if test "x$enable_debug_symbols" != x; then
52571    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52572$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52573
52574    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52575      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52576$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52577    fi
52578
52579  fi
52580
52581
52582  # --enable-zip-debug-info is deprecated.
52583  # Please use --with-native-debug-symbols=zipped .
52584
52585  # Check whether --enable-zip-debug-info was given.
52586if test "${enable_zip_debug_info+set}" = set; then :
52587  enableval=$enable_zip_debug_info;
52588fi
52589
52590  if test "x$enable_zip_debug_info" != x; then
52591    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52592$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52593
52594    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52595      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52596$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52597    fi
52598
52599  fi
52600
52601
52602
52603
52604
52605
52606
52607  # Check whether --enable-native-coverage was given.
52608if test "${enable_native_coverage+set}" = set; then :
52609  enableval=$enable_native_coverage;
52610fi
52611
52612  GCOV_ENABLED="false"
52613  if test "x$enable_native_coverage" = "xyes"; then
52614    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52615      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52616$as_echo_n "checking if native coverage is enabled... " >&6; }
52617      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52618$as_echo "yes" >&6; }
52619      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52620      GCOV_LDFLAGS="-fprofile-arcs"
52621      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52622      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52623      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52624      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52625      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52626      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52627      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52628      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52629      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52630      GCOV_ENABLED="true"
52631    else
52632      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52633    fi
52634  elif test "x$enable_native_coverage" = "xno"; then
52635    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52636$as_echo_n "checking if native coverage is enabled... " >&6; }
52637    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52638$as_echo "no" >&6; }
52639  elif test "x$enable_native_coverage" != "x"; then
52640    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52641  fi
52642
52643
52644
52645
52646# Need toolchain to setup dtrace
52647
52648  # Test for dtrace dependencies
52649  # Check whether --enable-dtrace was given.
52650if test "${enable_dtrace+set}" = set; then :
52651  enableval=$enable_dtrace;
52652fi
52653
52654
52655  DTRACE_DEP_MISSING=false
52656
52657  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52658$as_echo_n "checking for dtrace tool... " >&6; }
52659  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52660    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52661$as_echo "$DTRACE" >&6; }
52662  else
52663    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52664$as_echo "not found, cannot build dtrace" >&6; }
52665    DTRACE_DEP_MISSING=true
52666  fi
52667
52668  for ac_header in sys/sdt.h
52669do :
52670  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52671if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52672  cat >>confdefs.h <<_ACEOF
52673#define HAVE_SYS_SDT_H 1
52674_ACEOF
52675 DTRACE_HEADERS_OK=yes
52676else
52677  DTRACE_HEADERS_OK=no
52678fi
52679
52680done
52681
52682  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52683    DTRACE_DEP_MISSING=true
52684  fi
52685
52686  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52687$as_echo_n "checking if dtrace should be built... " >&6; }
52688  if test "x$enable_dtrace" = "xyes"; then
52689    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52690      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52691$as_echo "no, missing dependencies" >&6; }
52692
52693  # Print a helpful message on how to acquire the necessary build dependency.
52694  # dtrace is the help tag: freetype, cups, alsa etc
52695  MISSING_DEPENDENCY=dtrace
52696
52697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52698    cygwin_help $MISSING_DEPENDENCY
52699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52700    msys_help $MISSING_DEPENDENCY
52701  else
52702    PKGHANDLER_COMMAND=
52703
52704    case $PKGHANDLER in
52705      apt-get)
52706        apt_help     $MISSING_DEPENDENCY ;;
52707      yum)
52708        yum_help     $MISSING_DEPENDENCY ;;
52709      port)
52710        port_help    $MISSING_DEPENDENCY ;;
52711      pkgutil)
52712        pkgutil_help $MISSING_DEPENDENCY ;;
52713      pkgadd)
52714        pkgadd_help  $MISSING_DEPENDENCY ;;
52715    esac
52716
52717    if test "x$PKGHANDLER_COMMAND" != x; then
52718      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52719    fi
52720  fi
52721
52722      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52723    else
52724      INCLUDE_DTRACE=true
52725      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52726$as_echo "yes, forced" >&6; }
52727    fi
52728  elif test "x$enable_dtrace" = "xno"; then
52729    INCLUDE_DTRACE=false
52730    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52731$as_echo "no, forced" >&6; }
52732  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52733    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52734      INCLUDE_DTRACE=false
52735      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52736$as_echo "no, missing dependencies" >&6; }
52737    else
52738      INCLUDE_DTRACE=true
52739      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52740$as_echo "yes, dependencies present" >&6; }
52741    fi
52742  else
52743    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52744  fi
52745
52746
52747
52748  # The user can in some cases supply additional jvm features. For the custom
52749  # variant, this defines the entire variant.
52750
52751# Check whether --with-jvm-features was given.
52752if test "${with_jvm_features+set}" = set; then :
52753  withval=$with_jvm_features;
52754fi
52755
52756  if test "x$with_jvm_features" != x; then
52757    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52758$as_echo_n "checking additional JVM features... " >&6; }
52759    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52760    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52761$as_echo "$JVM_FEATURES" >&6; }
52762  fi
52763
52764  # Verify that dependencies are met for explicitly set features.
52765  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52766    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52767  fi
52768
52769  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52770    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52771  fi
52772
52773  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
52774    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
52775  fi
52776
52777  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52778    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52779  fi
52780
52781  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52782    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52783  fi
52784
52785  # Turn on additional features based on other parts of configure
52786  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52787    JVM_FEATURES="$JVM_FEATURES dtrace"
52788  else
52789    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52790      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52791    fi
52792  fi
52793
52794  if test "x$STATIC_BUILD" = "xtrue"; then
52795    JVM_FEATURES="$JVM_FEATURES static-build"
52796  else
52797    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52798      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52799    fi
52800  fi
52801
52802  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52803    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52804      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52805    fi
52806  fi
52807
52808  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52809    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52810      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52811    fi
52812  fi
52813
52814  # Only enable jvmci on x86_64, sparcv9 and aarch64.
52815  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52816      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52817      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52818    JVM_FEATURES_jvmci="jvmci"
52819  else
52820    JVM_FEATURES_jvmci=""
52821  fi
52822
52823  # All variants but minimal (and custom) get these features
52824  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52825
52826  # Enable features depending on variant.
52827  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52828  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52829  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52830  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52831  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52832  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52833  JVM_FEATURES_custom="$JVM_FEATURES"
52834
52835
52836
52837
52838
52839
52840
52841
52842
52843  # Used for verification of Makefiles by check-jvm-feature
52844
52845
52846  # We don't support --with-jvm-interpreter anymore, use zero instead.
52847
52848
52849# Check whether --with-jvm-interpreter was given.
52850if test "${with_jvm_interpreter+set}" = set; then :
52851  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52852$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52853fi
52854
52855
52856
52857
52858  # Check whether --enable-hotspot-gtest was given.
52859if test "${enable_hotspot_gtest+set}" = set; then :
52860  enableval=$enable_hotspot_gtest;
52861fi
52862
52863
52864  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52865    GTEST_DIR_EXISTS="true"
52866  else
52867    GTEST_DIR_EXISTS="false"
52868  fi
52869
52870  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52871$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52872  if test "x$enable_hotspot_gtest" = "xyes"; then
52873    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52874      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52875$as_echo "yes, forced" >&6; }
52876      BUILD_GTEST="true"
52877    else
52878      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52879    fi
52880  elif test "x$enable_hotspot_gtest" = "xno"; then
52881    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52882$as_echo "no, forced" >&6; }
52883    BUILD_GTEST="false"
52884  elif test "x$enable_hotspot_gtest" = "x"; then
52885    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
52886      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52887$as_echo "yes" >&6; }
52888      BUILD_GTEST="true"
52889    else
52890      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52891$as_echo "no" >&6; }
52892      BUILD_GTEST="false"
52893    fi
52894  else
52895    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52896  fi
52897
52898
52899
52900
52901###############################################################################
52902#
52903# Check dependencies for external and internal libraries.
52904#
52905###############################################################################
52906
52907# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52908
52909  # When using cygwin or msys, we need a wrapper binary that renames
52910  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52911  # @files and rewrites these too! This wrapper binary is
52912  # called fixpath.
52913  FIXPATH=
52914  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52915    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52916$as_echo_n "checking if fixpath can be created... " >&6; }
52917    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52918    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52919    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52920    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52921      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52922      FIXPATH="$FIXPATH_BIN -c"
52923    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52924      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52925      # @ was chosen as separator to minimize risk of other tools messing around with it
52926      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52927          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52928      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52929      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52930    fi
52931    FIXPATH_SRC_W="$FIXPATH_SRC"
52932    FIXPATH_BIN_W="$FIXPATH_BIN"
52933
52934  unix_path="$FIXPATH_SRC_W"
52935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52936    windows_path=`$CYGPATH -m "$unix_path"`
52937    FIXPATH_SRC_W="$windows_path"
52938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52939    windows_path=`cmd //c echo $unix_path`
52940    FIXPATH_SRC_W="$windows_path"
52941  fi
52942
52943
52944  unix_path="$FIXPATH_BIN_W"
52945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52946    windows_path=`$CYGPATH -m "$unix_path"`
52947    FIXPATH_BIN_W="$windows_path"
52948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52949    windows_path=`cmd //c echo $unix_path`
52950    FIXPATH_BIN_W="$windows_path"
52951  fi
52952
52953    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52954    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52955    cd $FIXPATH_DIR
52956    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
52957    cd $CURDIR
52958
52959    if test ! -x $FIXPATH_BIN; then
52960      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52961$as_echo "no" >&6; }
52962      cat $FIXPATH_DIR/fixpath1.log
52963      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
52964    fi
52965    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52966$as_echo "yes" >&6; }
52967    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
52968$as_echo_n "checking if fixpath.exe works... " >&6; }
52969    cd $FIXPATH_DIR
52970    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
52971        > $FIXPATH_DIR/fixpath2.log 2>&1
52972    cd $CURDIR
52973    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
52974      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52975$as_echo "no" >&6; }
52976      cat $FIXPATH_DIR/fixpath2.log
52977      as_fn_error $? "fixpath did not work!" "$LINENO" 5
52978    fi
52979    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52980$as_echo "yes" >&6; }
52981
52982    FIXPATH_DETACH_FLAG="--detach"
52983  fi
52984
52985
52986
52987
52988
52989
52990  # Check if X11 is needed
52991  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
52992    # No X11 support on windows or macosx
52993    NEEDS_LIB_X11=false
52994  else
52995    # All other instances need X11, even if building headless only, libawt still
52996    # needs X11 headers.
52997    NEEDS_LIB_X11=true
52998  fi
52999
53000  # Check if cups is needed
53001  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53002    # Windows have a separate print system
53003    NEEDS_LIB_CUPS=false
53004  else
53005    NEEDS_LIB_CUPS=true
53006  fi
53007
53008  # A custom hook may have set this already
53009  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53010    NEEDS_LIB_FREETYPE=true
53011  fi
53012
53013  # Check if alsa is needed
53014  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53015    NEEDS_LIB_ALSA=true
53016  else
53017    NEEDS_LIB_ALSA=false
53018  fi
53019
53020  # Check if ffi is needed
53021  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53022    NEEDS_LIB_FFI=true
53023  else
53024    NEEDS_LIB_FFI=false
53025  fi
53026
53027
53028  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53029  # dynamic build is configured on command line.
53030
53031# Check whether --with-stdc++lib was given.
53032if test "${with_stdc__lib+set}" = set; then :
53033  withval=$with_stdc__lib;
53034        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53035                && test "x$with_stdc__lib" != xdefault; then
53036          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53037        fi
53038
53039else
53040  with_stdc__lib=default
53041
53042fi
53043
53044
53045  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53046    # Test if stdc++ can be linked statically.
53047    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53048$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53049    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53050    ac_ext=cpp
53051ac_cpp='$CXXCPP $CPPFLAGS'
53052ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53053ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53054ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53055
53056    OLD_LIBS="$LIBS"
53057    LIBS="$STATIC_STDCXX_FLAGS"
53058    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53059/* end confdefs.h.  */
53060
53061int
53062main ()
53063{
53064return 0;
53065  ;
53066  return 0;
53067}
53068_ACEOF
53069if ac_fn_cxx_try_link "$LINENO"; then :
53070  has_static_libstdcxx=yes
53071else
53072  has_static_libstdcxx=no
53073fi
53074rm -f core conftest.err conftest.$ac_objext \
53075    conftest$ac_exeext conftest.$ac_ext
53076    LIBS="$OLD_LIBS"
53077    ac_ext=cpp
53078ac_cpp='$CXXCPP $CPPFLAGS'
53079ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53080ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53081ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53082
53083    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53084$as_echo "$has_static_libstdcxx" >&6; }
53085
53086    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53087      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53088    fi
53089
53090    # If dynamic was requested, it's available since it would fail above otherwise.
53091    # If dynamic wasn't requested, go with static unless it isn't available.
53092    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53093$as_echo_n "checking how to link with libstdc++... " >&6; }
53094    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53095        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53096      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53097$as_echo "dynamic" >&6; }
53098    else
53099      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53100      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53101      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53102      # just use the same setting as for the TARGET toolchain.
53103      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53104      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53105$as_echo "static" >&6; }
53106    fi
53107  fi
53108
53109  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53110  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53111    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53112  fi
53113
53114
53115
53116  # Setup Windows runtime dlls
53117  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53118
53119
53120# Check whether --with-msvcr-dll was given.
53121if test "${with_msvcr_dll+set}" = set; then :
53122  withval=$with_msvcr_dll;
53123fi
53124
53125
53126  if test "x$with_msvcr_dll" != x; then
53127    # If given explicitly by user, do not probe. If not present, fail directly.
53128
53129  DLL_NAME="$MSVCR_NAME"
53130  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53131  METHOD="--with-msvcr-dll"
53132  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53133    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53134$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53135
53136    # Need to check if the found msvcr is correct architecture
53137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53138$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53139    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53140    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53141      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53142      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53143      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53144        CORRECT_MSVCR_ARCH="PE32 executable"
53145      else
53146        CORRECT_MSVCR_ARCH="PE32+ executable"
53147      fi
53148    else
53149      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53150        CORRECT_MSVCR_ARCH=386
53151      else
53152        CORRECT_MSVCR_ARCH=x86-64
53153      fi
53154    fi
53155    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53156      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53157$as_echo "ok" >&6; }
53158      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53159
53160  # Only process if variable expands to non-empty
53161
53162  if test "x$MSVC_DLL" != x; then
53163    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53164
53165  # Input might be given as Windows format, start by converting to
53166  # unix format.
53167  path="$MSVC_DLL"
53168  new_path=`$CYGPATH -u "$path"`
53169
53170  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53171  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53172  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53173  # "foo.exe" is OK but "foo" is an error.
53174  #
53175  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53176  # It is also a way to make sure we got the proper file name for the real test later on.
53177  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53178  if test "x$test_shortpath" = x; then
53179    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53180$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53181    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53182  fi
53183
53184  # Call helper function which possibly converts this using DOS-style short mode.
53185  # If so, the updated path is stored in $new_path.
53186
53187  input_path="$new_path"
53188  # Check if we need to convert this using DOS-style short mode. If the path
53189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53190  # take no chances and rewrite it.
53191  # Note: m4 eats our [], so we need to use [ and ] instead.
53192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53193  if test "x$has_forbidden_chars" != x; then
53194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53195    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53196    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53197    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53198      # Going to short mode and back again did indeed matter. Since short mode is
53199      # case insensitive, let's make it lowercase to improve readability.
53200      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53201      # Now convert it back to Unix-style (cygpath)
53202      input_path=`$CYGPATH -u "$shortmode_path"`
53203      new_path="$input_path"
53204    fi
53205  fi
53206
53207  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53208  if test "x$test_cygdrive_prefix" = x; then
53209    # As a simple fix, exclude /usr/bin since it's not a real path.
53210    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53211      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53212      # a path prefixed by /cygdrive for fixpath to work.
53213      new_path="$CYGWIN_ROOT_PATH$input_path"
53214    fi
53215  fi
53216
53217
53218  if test "x$path" != "x$new_path"; then
53219    MSVC_DLL="$new_path"
53220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53221$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53222  fi
53223
53224    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53225
53226  path="$MSVC_DLL"
53227  has_colon=`$ECHO $path | $GREP ^.:`
53228  new_path="$path"
53229  if test "x$has_colon" = x; then
53230    # Not in mixed or Windows style, start by that.
53231    new_path=`cmd //c echo $path`
53232  fi
53233
53234
53235  input_path="$new_path"
53236  # Check if we need to convert this using DOS-style short mode. If the path
53237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53238  # take no chances and rewrite it.
53239  # Note: m4 eats our [], so we need to use [ and ] instead.
53240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53241  if test "x$has_forbidden_chars" != x; then
53242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53243    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53244  fi
53245
53246
53247  windows_path="$new_path"
53248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53249    unix_path=`$CYGPATH -u "$windows_path"`
53250    new_path="$unix_path"
53251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53253    new_path="$unix_path"
53254  fi
53255
53256  if test "x$path" != "x$new_path"; then
53257    MSVC_DLL="$new_path"
53258    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53259$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53260  fi
53261
53262  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53263  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53264
53265    else
53266      # We're on a unix platform. Hooray! :)
53267      path="$MSVC_DLL"
53268      has_space=`$ECHO "$path" | $GREP " "`
53269      if test "x$has_space" != x; then
53270        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53271$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53272        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53273      fi
53274
53275      # Use eval to expand a potential ~
53276      eval path="$path"
53277      if test ! -f "$path" && test ! -d "$path"; then
53278        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53279      fi
53280
53281      if test -d "$path"; then
53282        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53283      else
53284        dir="`$DIRNAME "$path"`"
53285        base="`$BASENAME "$path"`"
53286        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53287      fi
53288    fi
53289  fi
53290
53291      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53292$as_echo_n "checking for $DLL_NAME... " >&6; }
53293      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53294$as_echo "$MSVC_DLL" >&6; }
53295    else
53296      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53297$as_echo "incorrect, ignoring" >&6; }
53298      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53299$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53300    fi
53301  fi
53302
53303    if test "x$MSVC_DLL" = x; then
53304      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53305    fi
53306    MSVCR_DLL="$MSVC_DLL"
53307  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53308
53309  DLL_NAME="$MSVCR_NAME"
53310  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53311  METHOD="devkit"
53312  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53313    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53314$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53315
53316    # Need to check if the found msvcr is correct architecture
53317    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53318$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53319    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53320    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53321      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53322      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53323      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53324        CORRECT_MSVCR_ARCH="PE32 executable"
53325      else
53326        CORRECT_MSVCR_ARCH="PE32+ executable"
53327      fi
53328    else
53329      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53330        CORRECT_MSVCR_ARCH=386
53331      else
53332        CORRECT_MSVCR_ARCH=x86-64
53333      fi
53334    fi
53335    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53336      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53337$as_echo "ok" >&6; }
53338      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53339
53340  # Only process if variable expands to non-empty
53341
53342  if test "x$MSVC_DLL" != x; then
53343    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53344
53345  # Input might be given as Windows format, start by converting to
53346  # unix format.
53347  path="$MSVC_DLL"
53348  new_path=`$CYGPATH -u "$path"`
53349
53350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53353  # "foo.exe" is OK but "foo" is an error.
53354  #
53355  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53356  # It is also a way to make sure we got the proper file name for the real test later on.
53357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53358  if test "x$test_shortpath" = x; then
53359    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53360$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53361    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53362  fi
53363
53364  # Call helper function which possibly converts this using DOS-style short mode.
53365  # If so, the updated path is stored in $new_path.
53366
53367  input_path="$new_path"
53368  # Check if we need to convert this using DOS-style short mode. If the path
53369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53370  # take no chances and rewrite it.
53371  # Note: m4 eats our [], so we need to use [ and ] instead.
53372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53373  if test "x$has_forbidden_chars" != x; then
53374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53378      # Going to short mode and back again did indeed matter. Since short mode is
53379      # case insensitive, let's make it lowercase to improve readability.
53380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53381      # Now convert it back to Unix-style (cygpath)
53382      input_path=`$CYGPATH -u "$shortmode_path"`
53383      new_path="$input_path"
53384    fi
53385  fi
53386
53387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53388  if test "x$test_cygdrive_prefix" = x; then
53389    # As a simple fix, exclude /usr/bin since it's not a real path.
53390    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53392      # a path prefixed by /cygdrive for fixpath to work.
53393      new_path="$CYGWIN_ROOT_PATH$input_path"
53394    fi
53395  fi
53396
53397
53398  if test "x$path" != "x$new_path"; then
53399    MSVC_DLL="$new_path"
53400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53401$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53402  fi
53403
53404    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53405
53406  path="$MSVC_DLL"
53407  has_colon=`$ECHO $path | $GREP ^.:`
53408  new_path="$path"
53409  if test "x$has_colon" = x; then
53410    # Not in mixed or Windows style, start by that.
53411    new_path=`cmd //c echo $path`
53412  fi
53413
53414
53415  input_path="$new_path"
53416  # Check if we need to convert this using DOS-style short mode. If the path
53417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53418  # take no chances and rewrite it.
53419  # Note: m4 eats our [], so we need to use [ and ] instead.
53420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53421  if test "x$has_forbidden_chars" != x; then
53422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53424  fi
53425
53426
53427  windows_path="$new_path"
53428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53429    unix_path=`$CYGPATH -u "$windows_path"`
53430    new_path="$unix_path"
53431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53433    new_path="$unix_path"
53434  fi
53435
53436  if test "x$path" != "x$new_path"; then
53437    MSVC_DLL="$new_path"
53438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53439$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53440  fi
53441
53442  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53443  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53444
53445    else
53446      # We're on a unix platform. Hooray! :)
53447      path="$MSVC_DLL"
53448      has_space=`$ECHO "$path" | $GREP " "`
53449      if test "x$has_space" != x; then
53450        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53451$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53452        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53453      fi
53454
53455      # Use eval to expand a potential ~
53456      eval path="$path"
53457      if test ! -f "$path" && test ! -d "$path"; then
53458        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53459      fi
53460
53461      if test -d "$path"; then
53462        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53463      else
53464        dir="`$DIRNAME "$path"`"
53465        base="`$BASENAME "$path"`"
53466        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53467      fi
53468    fi
53469  fi
53470
53471      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53472$as_echo_n "checking for $DLL_NAME... " >&6; }
53473      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53474$as_echo "$MSVC_DLL" >&6; }
53475    else
53476      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53477$as_echo "incorrect, ignoring" >&6; }
53478      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53479$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53480    fi
53481  fi
53482
53483    if test "x$MSVC_DLL" = x; then
53484      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53485    fi
53486    MSVCR_DLL="$MSVC_DLL"
53487  else
53488
53489  DLL_NAME="${MSVCR_NAME}"
53490  MSVC_DLL=
53491
53492  if test "x$MSVC_DLL" = x; then
53493    # Probe: Using well-known location from Visual Studio 10.0
53494    if test "x$VCINSTALLDIR" != x; then
53495      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53496
53497  windows_path="$CYGWIN_VC_INSTALL_DIR"
53498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53499    unix_path=`$CYGPATH -u "$windows_path"`
53500    CYGWIN_VC_INSTALL_DIR="$unix_path"
53501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53503    CYGWIN_VC_INSTALL_DIR="$unix_path"
53504  fi
53505
53506      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53507        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53508      else
53509        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53510      fi
53511      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53512
53513  DLL_NAME="$DLL_NAME"
53514  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53515  METHOD="well-known location in VCINSTALLDIR"
53516  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53517    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53518$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53519
53520    # Need to check if the found msvcr is correct architecture
53521    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53522$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53523    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53524    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53525      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53526      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53527      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53528        CORRECT_MSVCR_ARCH="PE32 executable"
53529      else
53530        CORRECT_MSVCR_ARCH="PE32+ executable"
53531      fi
53532    else
53533      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53534        CORRECT_MSVCR_ARCH=386
53535      else
53536        CORRECT_MSVCR_ARCH=x86-64
53537      fi
53538    fi
53539    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53540      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53541$as_echo "ok" >&6; }
53542      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53543
53544  # Only process if variable expands to non-empty
53545
53546  if test "x$MSVC_DLL" != x; then
53547    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53548
53549  # Input might be given as Windows format, start by converting to
53550  # unix format.
53551  path="$MSVC_DLL"
53552  new_path=`$CYGPATH -u "$path"`
53553
53554  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53555  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53556  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53557  # "foo.exe" is OK but "foo" is an error.
53558  #
53559  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53560  # It is also a way to make sure we got the proper file name for the real test later on.
53561  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53562  if test "x$test_shortpath" = x; then
53563    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53564$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53565    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53566  fi
53567
53568  # Call helper function which possibly converts this using DOS-style short mode.
53569  # If so, the updated path is stored in $new_path.
53570
53571  input_path="$new_path"
53572  # Check if we need to convert this using DOS-style short mode. If the path
53573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53574  # take no chances and rewrite it.
53575  # Note: m4 eats our [], so we need to use [ and ] instead.
53576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53577  if test "x$has_forbidden_chars" != x; then
53578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53579    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53580    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53581    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53582      # Going to short mode and back again did indeed matter. Since short mode is
53583      # case insensitive, let's make it lowercase to improve readability.
53584      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53585      # Now convert it back to Unix-style (cygpath)
53586      input_path=`$CYGPATH -u "$shortmode_path"`
53587      new_path="$input_path"
53588    fi
53589  fi
53590
53591  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53592  if test "x$test_cygdrive_prefix" = x; then
53593    # As a simple fix, exclude /usr/bin since it's not a real path.
53594    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53595      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53596      # a path prefixed by /cygdrive for fixpath to work.
53597      new_path="$CYGWIN_ROOT_PATH$input_path"
53598    fi
53599  fi
53600
53601
53602  if test "x$path" != "x$new_path"; then
53603    MSVC_DLL="$new_path"
53604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53605$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53606  fi
53607
53608    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53609
53610  path="$MSVC_DLL"
53611  has_colon=`$ECHO $path | $GREP ^.:`
53612  new_path="$path"
53613  if test "x$has_colon" = x; then
53614    # Not in mixed or Windows style, start by that.
53615    new_path=`cmd //c echo $path`
53616  fi
53617
53618
53619  input_path="$new_path"
53620  # Check if we need to convert this using DOS-style short mode. If the path
53621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53622  # take no chances and rewrite it.
53623  # Note: m4 eats our [], so we need to use [ and ] instead.
53624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53625  if test "x$has_forbidden_chars" != x; then
53626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53628  fi
53629
53630
53631  windows_path="$new_path"
53632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53633    unix_path=`$CYGPATH -u "$windows_path"`
53634    new_path="$unix_path"
53635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53637    new_path="$unix_path"
53638  fi
53639
53640  if test "x$path" != "x$new_path"; then
53641    MSVC_DLL="$new_path"
53642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53643$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53644  fi
53645
53646  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53647  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53648
53649    else
53650      # We're on a unix platform. Hooray! :)
53651      path="$MSVC_DLL"
53652      has_space=`$ECHO "$path" | $GREP " "`
53653      if test "x$has_space" != x; then
53654        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53655$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53656        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53657      fi
53658
53659      # Use eval to expand a potential ~
53660      eval path="$path"
53661      if test ! -f "$path" && test ! -d "$path"; then
53662        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53663      fi
53664
53665      if test -d "$path"; then
53666        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53667      else
53668        dir="`$DIRNAME "$path"`"
53669        base="`$BASENAME "$path"`"
53670        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53671      fi
53672    fi
53673  fi
53674
53675      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53676$as_echo_n "checking for $DLL_NAME... " >&6; }
53677      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53678$as_echo "$MSVC_DLL" >&6; }
53679    else
53680      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53681$as_echo "incorrect, ignoring" >&6; }
53682      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53683$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53684    fi
53685  fi
53686
53687    fi
53688  fi
53689
53690  if test "x$MSVC_DLL" = x; then
53691    # Probe: Check in the Boot JDK directory.
53692    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53693
53694  DLL_NAME="$DLL_NAME"
53695  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53696  METHOD="well-known location in Boot JDK"
53697  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53698    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53699$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53700
53701    # Need to check if the found msvcr is correct architecture
53702    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53703$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53704    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53705    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53706      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53707      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53708      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53709        CORRECT_MSVCR_ARCH="PE32 executable"
53710      else
53711        CORRECT_MSVCR_ARCH="PE32+ executable"
53712      fi
53713    else
53714      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53715        CORRECT_MSVCR_ARCH=386
53716      else
53717        CORRECT_MSVCR_ARCH=x86-64
53718      fi
53719    fi
53720    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53721      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53722$as_echo "ok" >&6; }
53723      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53724
53725  # Only process if variable expands to non-empty
53726
53727  if test "x$MSVC_DLL" != x; then
53728    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53729
53730  # Input might be given as Windows format, start by converting to
53731  # unix format.
53732  path="$MSVC_DLL"
53733  new_path=`$CYGPATH -u "$path"`
53734
53735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53738  # "foo.exe" is OK but "foo" is an error.
53739  #
53740  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53741  # It is also a way to make sure we got the proper file name for the real test later on.
53742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53743  if test "x$test_shortpath" = x; then
53744    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53745$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53746    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53747  fi
53748
53749  # Call helper function which possibly converts this using DOS-style short mode.
53750  # If so, the updated path is stored in $new_path.
53751
53752  input_path="$new_path"
53753  # Check if we need to convert this using DOS-style short mode. If the path
53754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53755  # take no chances and rewrite it.
53756  # Note: m4 eats our [], so we need to use [ and ] instead.
53757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53758  if test "x$has_forbidden_chars" != x; then
53759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53760    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53761    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53762    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53763      # Going to short mode and back again did indeed matter. Since short mode is
53764      # case insensitive, let's make it lowercase to improve readability.
53765      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53766      # Now convert it back to Unix-style (cygpath)
53767      input_path=`$CYGPATH -u "$shortmode_path"`
53768      new_path="$input_path"
53769    fi
53770  fi
53771
53772  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53773  if test "x$test_cygdrive_prefix" = x; then
53774    # As a simple fix, exclude /usr/bin since it's not a real path.
53775    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53776      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53777      # a path prefixed by /cygdrive for fixpath to work.
53778      new_path="$CYGWIN_ROOT_PATH$input_path"
53779    fi
53780  fi
53781
53782
53783  if test "x$path" != "x$new_path"; then
53784    MSVC_DLL="$new_path"
53785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53786$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53787  fi
53788
53789    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53790
53791  path="$MSVC_DLL"
53792  has_colon=`$ECHO $path | $GREP ^.:`
53793  new_path="$path"
53794  if test "x$has_colon" = x; then
53795    # Not in mixed or Windows style, start by that.
53796    new_path=`cmd //c echo $path`
53797  fi
53798
53799
53800  input_path="$new_path"
53801  # Check if we need to convert this using DOS-style short mode. If the path
53802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53803  # take no chances and rewrite it.
53804  # Note: m4 eats our [], so we need to use [ and ] instead.
53805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53806  if test "x$has_forbidden_chars" != x; then
53807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53808    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53809  fi
53810
53811
53812  windows_path="$new_path"
53813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53814    unix_path=`$CYGPATH -u "$windows_path"`
53815    new_path="$unix_path"
53816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53818    new_path="$unix_path"
53819  fi
53820
53821  if test "x$path" != "x$new_path"; then
53822    MSVC_DLL="$new_path"
53823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53824$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53825  fi
53826
53827  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53828  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53829
53830    else
53831      # We're on a unix platform. Hooray! :)
53832      path="$MSVC_DLL"
53833      has_space=`$ECHO "$path" | $GREP " "`
53834      if test "x$has_space" != x; then
53835        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53836$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53837        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53838      fi
53839
53840      # Use eval to expand a potential ~
53841      eval path="$path"
53842      if test ! -f "$path" && test ! -d "$path"; then
53843        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53844      fi
53845
53846      if test -d "$path"; then
53847        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53848      else
53849        dir="`$DIRNAME "$path"`"
53850        base="`$BASENAME "$path"`"
53851        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53852      fi
53853    fi
53854  fi
53855
53856      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53857$as_echo_n "checking for $DLL_NAME... " >&6; }
53858      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53859$as_echo "$MSVC_DLL" >&6; }
53860    else
53861      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53862$as_echo "incorrect, ignoring" >&6; }
53863      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53864$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53865    fi
53866  fi
53867
53868  fi
53869
53870  if test "x$MSVC_DLL" = x; then
53871    # Probe: Look in the Windows system32 directory
53872    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53873
53874  windows_path="$CYGWIN_SYSTEMROOT"
53875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53876    unix_path=`$CYGPATH -u "$windows_path"`
53877    CYGWIN_SYSTEMROOT="$unix_path"
53878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53880    CYGWIN_SYSTEMROOT="$unix_path"
53881  fi
53882
53883    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53884
53885  DLL_NAME="$DLL_NAME"
53886  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53887  METHOD="well-known location in SYSTEMROOT"
53888  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53889    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53890$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53891
53892    # Need to check if the found msvcr is correct architecture
53893    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53894$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53895    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53896    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53897      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53898      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53899      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53900        CORRECT_MSVCR_ARCH="PE32 executable"
53901      else
53902        CORRECT_MSVCR_ARCH="PE32+ executable"
53903      fi
53904    else
53905      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53906        CORRECT_MSVCR_ARCH=386
53907      else
53908        CORRECT_MSVCR_ARCH=x86-64
53909      fi
53910    fi
53911    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53912      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53913$as_echo "ok" >&6; }
53914      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53915
53916  # Only process if variable expands to non-empty
53917
53918  if test "x$MSVC_DLL" != x; then
53919    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53920
53921  # Input might be given as Windows format, start by converting to
53922  # unix format.
53923  path="$MSVC_DLL"
53924  new_path=`$CYGPATH -u "$path"`
53925
53926  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53927  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53928  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53929  # "foo.exe" is OK but "foo" is an error.
53930  #
53931  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53932  # It is also a way to make sure we got the proper file name for the real test later on.
53933  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53934  if test "x$test_shortpath" = x; then
53935    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53936$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53937    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53938  fi
53939
53940  # Call helper function which possibly converts this using DOS-style short mode.
53941  # If so, the updated path is stored in $new_path.
53942
53943  input_path="$new_path"
53944  # Check if we need to convert this using DOS-style short mode. If the path
53945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53946  # take no chances and rewrite it.
53947  # Note: m4 eats our [], so we need to use [ and ] instead.
53948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53949  if test "x$has_forbidden_chars" != x; then
53950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53951    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53952    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53953    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53954      # Going to short mode and back again did indeed matter. Since short mode is
53955      # case insensitive, let's make it lowercase to improve readability.
53956      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53957      # Now convert it back to Unix-style (cygpath)
53958      input_path=`$CYGPATH -u "$shortmode_path"`
53959      new_path="$input_path"
53960    fi
53961  fi
53962
53963  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53964  if test "x$test_cygdrive_prefix" = x; then
53965    # As a simple fix, exclude /usr/bin since it's not a real path.
53966    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53967      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53968      # a path prefixed by /cygdrive for fixpath to work.
53969      new_path="$CYGWIN_ROOT_PATH$input_path"
53970    fi
53971  fi
53972
53973
53974  if test "x$path" != "x$new_path"; then
53975    MSVC_DLL="$new_path"
53976    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53977$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53978  fi
53979
53980    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53981
53982  path="$MSVC_DLL"
53983  has_colon=`$ECHO $path | $GREP ^.:`
53984  new_path="$path"
53985  if test "x$has_colon" = x; then
53986    # Not in mixed or Windows style, start by that.
53987    new_path=`cmd //c echo $path`
53988  fi
53989
53990
53991  input_path="$new_path"
53992  # Check if we need to convert this using DOS-style short mode. If the path
53993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53994  # take no chances and rewrite it.
53995  # Note: m4 eats our [], so we need to use [ and ] instead.
53996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53997  if test "x$has_forbidden_chars" != x; then
53998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53999    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54000  fi
54001
54002
54003  windows_path="$new_path"
54004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54005    unix_path=`$CYGPATH -u "$windows_path"`
54006    new_path="$unix_path"
54007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54009    new_path="$unix_path"
54010  fi
54011
54012  if test "x$path" != "x$new_path"; then
54013    MSVC_DLL="$new_path"
54014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54015$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54016  fi
54017
54018  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54019  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54020
54021    else
54022      # We're on a unix platform. Hooray! :)
54023      path="$MSVC_DLL"
54024      has_space=`$ECHO "$path" | $GREP " "`
54025      if test "x$has_space" != x; then
54026        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54027$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54028        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54029      fi
54030
54031      # Use eval to expand a potential ~
54032      eval path="$path"
54033      if test ! -f "$path" && test ! -d "$path"; then
54034        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54035      fi
54036
54037      if test -d "$path"; then
54038        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54039      else
54040        dir="`$DIRNAME "$path"`"
54041        base="`$BASENAME "$path"`"
54042        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54043      fi
54044    fi
54045  fi
54046
54047      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54048$as_echo_n "checking for $DLL_NAME... " >&6; }
54049      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54050$as_echo "$MSVC_DLL" >&6; }
54051    else
54052      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54053$as_echo "incorrect, ignoring" >&6; }
54054      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54055$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54056    fi
54057  fi
54058
54059  fi
54060
54061  if test "x$MSVC_DLL" = x; then
54062    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54063    if test "x$VS100COMNTOOLS" != x; then
54064      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54065
54066  windows_path="$CYGWIN_VS_TOOLS_DIR"
54067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54068    unix_path=`$CYGPATH -u "$windows_path"`
54069    CYGWIN_VS_TOOLS_DIR="$unix_path"
54070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54072    CYGWIN_VS_TOOLS_DIR="$unix_path"
54073  fi
54074
54075      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54076        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54077	    | $GREP -i /x64/ | $HEAD --lines 1`
54078      else
54079        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54080	    | $GREP -i /x86/ | $HEAD --lines 1`
54081      fi
54082
54083  DLL_NAME="$DLL_NAME"
54084  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54085  METHOD="search of VS100COMNTOOLS"
54086  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54087    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54088$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54089
54090    # Need to check if the found msvcr is correct architecture
54091    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54092$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54093    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54094    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54095      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54096      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54097      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54098        CORRECT_MSVCR_ARCH="PE32 executable"
54099      else
54100        CORRECT_MSVCR_ARCH="PE32+ executable"
54101      fi
54102    else
54103      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54104        CORRECT_MSVCR_ARCH=386
54105      else
54106        CORRECT_MSVCR_ARCH=x86-64
54107      fi
54108    fi
54109    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54110      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54111$as_echo "ok" >&6; }
54112      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54113
54114  # Only process if variable expands to non-empty
54115
54116  if test "x$MSVC_DLL" != x; then
54117    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54118
54119  # Input might be given as Windows format, start by converting to
54120  # unix format.
54121  path="$MSVC_DLL"
54122  new_path=`$CYGPATH -u "$path"`
54123
54124  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54125  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54126  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54127  # "foo.exe" is OK but "foo" is an error.
54128  #
54129  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54130  # It is also a way to make sure we got the proper file name for the real test later on.
54131  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54132  if test "x$test_shortpath" = x; then
54133    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54134$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54135    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54136  fi
54137
54138  # Call helper function which possibly converts this using DOS-style short mode.
54139  # If so, the updated path is stored in $new_path.
54140
54141  input_path="$new_path"
54142  # Check if we need to convert this using DOS-style short mode. If the path
54143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54144  # take no chances and rewrite it.
54145  # Note: m4 eats our [], so we need to use [ and ] instead.
54146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54147  if test "x$has_forbidden_chars" != x; then
54148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54149    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54150    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54151    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54152      # Going to short mode and back again did indeed matter. Since short mode is
54153      # case insensitive, let's make it lowercase to improve readability.
54154      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54155      # Now convert it back to Unix-style (cygpath)
54156      input_path=`$CYGPATH -u "$shortmode_path"`
54157      new_path="$input_path"
54158    fi
54159  fi
54160
54161  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54162  if test "x$test_cygdrive_prefix" = x; then
54163    # As a simple fix, exclude /usr/bin since it's not a real path.
54164    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54165      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54166      # a path prefixed by /cygdrive for fixpath to work.
54167      new_path="$CYGWIN_ROOT_PATH$input_path"
54168    fi
54169  fi
54170
54171
54172  if test "x$path" != "x$new_path"; then
54173    MSVC_DLL="$new_path"
54174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54175$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54176  fi
54177
54178    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54179
54180  path="$MSVC_DLL"
54181  has_colon=`$ECHO $path | $GREP ^.:`
54182  new_path="$path"
54183  if test "x$has_colon" = x; then
54184    # Not in mixed or Windows style, start by that.
54185    new_path=`cmd //c echo $path`
54186  fi
54187
54188
54189  input_path="$new_path"
54190  # Check if we need to convert this using DOS-style short mode. If the path
54191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54192  # take no chances and rewrite it.
54193  # Note: m4 eats our [], so we need to use [ and ] instead.
54194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54195  if test "x$has_forbidden_chars" != x; then
54196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54197    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54198  fi
54199
54200
54201  windows_path="$new_path"
54202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54203    unix_path=`$CYGPATH -u "$windows_path"`
54204    new_path="$unix_path"
54205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54207    new_path="$unix_path"
54208  fi
54209
54210  if test "x$path" != "x$new_path"; then
54211    MSVC_DLL="$new_path"
54212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54213$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54214  fi
54215
54216  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54217  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54218
54219    else
54220      # We're on a unix platform. Hooray! :)
54221      path="$MSVC_DLL"
54222      has_space=`$ECHO "$path" | $GREP " "`
54223      if test "x$has_space" != x; then
54224        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54225$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54226        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54227      fi
54228
54229      # Use eval to expand a potential ~
54230      eval path="$path"
54231      if test ! -f "$path" && test ! -d "$path"; then
54232        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54233      fi
54234
54235      if test -d "$path"; then
54236        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54237      else
54238        dir="`$DIRNAME "$path"`"
54239        base="`$BASENAME "$path"`"
54240        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54241      fi
54242    fi
54243  fi
54244
54245      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54246$as_echo_n "checking for $DLL_NAME... " >&6; }
54247      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54248$as_echo "$MSVC_DLL" >&6; }
54249    else
54250      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54251$as_echo "incorrect, ignoring" >&6; }
54252      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54253$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54254    fi
54255  fi
54256
54257    fi
54258  fi
54259
54260  if test "x$MSVC_DLL" = x; then
54261    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54262    # (This was the original behaviour; kept since it might turn something up)
54263    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54264      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54265        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54266	    | $GREP x64 | $HEAD --lines 1`
54267      else
54268        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54269	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54270        if test "x$POSSIBLE_MSVC_DLL" = x; then
54271          # We're grasping at straws now...
54272          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54273	      | $HEAD --lines 1`
54274        fi
54275      fi
54276
54277
54278  DLL_NAME="$DLL_NAME"
54279  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54280  METHOD="search of VCINSTALLDIR"
54281  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54282    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54283$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54284
54285    # Need to check if the found msvcr is correct architecture
54286    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54287$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54288    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54289    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54290      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54291      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54292      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54293        CORRECT_MSVCR_ARCH="PE32 executable"
54294      else
54295        CORRECT_MSVCR_ARCH="PE32+ executable"
54296      fi
54297    else
54298      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54299        CORRECT_MSVCR_ARCH=386
54300      else
54301        CORRECT_MSVCR_ARCH=x86-64
54302      fi
54303    fi
54304    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54305      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54306$as_echo "ok" >&6; }
54307      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54308
54309  # Only process if variable expands to non-empty
54310
54311  if test "x$MSVC_DLL" != x; then
54312    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54313
54314  # Input might be given as Windows format, start by converting to
54315  # unix format.
54316  path="$MSVC_DLL"
54317  new_path=`$CYGPATH -u "$path"`
54318
54319  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54320  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54321  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54322  # "foo.exe" is OK but "foo" is an error.
54323  #
54324  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54325  # It is also a way to make sure we got the proper file name for the real test later on.
54326  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54327  if test "x$test_shortpath" = x; then
54328    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54329$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54330    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54331  fi
54332
54333  # Call helper function which possibly converts this using DOS-style short mode.
54334  # If so, the updated path is stored in $new_path.
54335
54336  input_path="$new_path"
54337  # Check if we need to convert this using DOS-style short mode. If the path
54338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54339  # take no chances and rewrite it.
54340  # Note: m4 eats our [], so we need to use [ and ] instead.
54341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54342  if test "x$has_forbidden_chars" != x; then
54343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54347      # Going to short mode and back again did indeed matter. Since short mode is
54348      # case insensitive, let's make it lowercase to improve readability.
54349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54350      # Now convert it back to Unix-style (cygpath)
54351      input_path=`$CYGPATH -u "$shortmode_path"`
54352      new_path="$input_path"
54353    fi
54354  fi
54355
54356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54357  if test "x$test_cygdrive_prefix" = x; then
54358    # As a simple fix, exclude /usr/bin since it's not a real path.
54359    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54361      # a path prefixed by /cygdrive for fixpath to work.
54362      new_path="$CYGWIN_ROOT_PATH$input_path"
54363    fi
54364  fi
54365
54366
54367  if test "x$path" != "x$new_path"; then
54368    MSVC_DLL="$new_path"
54369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54370$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54371  fi
54372
54373    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54374
54375  path="$MSVC_DLL"
54376  has_colon=`$ECHO $path | $GREP ^.:`
54377  new_path="$path"
54378  if test "x$has_colon" = x; then
54379    # Not in mixed or Windows style, start by that.
54380    new_path=`cmd //c echo $path`
54381  fi
54382
54383
54384  input_path="$new_path"
54385  # Check if we need to convert this using DOS-style short mode. If the path
54386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54387  # take no chances and rewrite it.
54388  # Note: m4 eats our [], so we need to use [ and ] instead.
54389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54390  if test "x$has_forbidden_chars" != x; then
54391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54393  fi
54394
54395
54396  windows_path="$new_path"
54397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54398    unix_path=`$CYGPATH -u "$windows_path"`
54399    new_path="$unix_path"
54400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54402    new_path="$unix_path"
54403  fi
54404
54405  if test "x$path" != "x$new_path"; then
54406    MSVC_DLL="$new_path"
54407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54408$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54409  fi
54410
54411  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54412  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54413
54414    else
54415      # We're on a unix platform. Hooray! :)
54416      path="$MSVC_DLL"
54417      has_space=`$ECHO "$path" | $GREP " "`
54418      if test "x$has_space" != x; then
54419        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54420$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54421        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54422      fi
54423
54424      # Use eval to expand a potential ~
54425      eval path="$path"
54426      if test ! -f "$path" && test ! -d "$path"; then
54427        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54428      fi
54429
54430      if test -d "$path"; then
54431        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54432      else
54433        dir="`$DIRNAME "$path"`"
54434        base="`$BASENAME "$path"`"
54435        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54436      fi
54437    fi
54438  fi
54439
54440      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54441$as_echo_n "checking for $DLL_NAME... " >&6; }
54442      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54443$as_echo "$MSVC_DLL" >&6; }
54444    else
54445      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54446$as_echo "incorrect, ignoring" >&6; }
54447      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54448$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54449    fi
54450  fi
54451
54452    fi
54453  fi
54454
54455  if test "x$MSVC_DLL" = x; then
54456    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54457$as_echo_n "checking for $DLL_NAME... " >&6; }
54458    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54459$as_echo "no" >&6; }
54460    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54461  fi
54462
54463    MSVCR_DLL="$MSVC_DLL"
54464  fi
54465
54466
54467
54468# Check whether --with-msvcp-dll was given.
54469if test "${with_msvcp_dll+set}" = set; then :
54470  withval=$with_msvcp_dll;
54471fi
54472
54473
54474  if test "x$MSVCP_NAME" != "x"; then
54475    if test "x$with_msvcp_dll" != x; then
54476      # If given explicitly by user, do not probe. If not present, fail directly.
54477
54478  DLL_NAME="$MSVCP_NAME"
54479  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54480  METHOD="--with-msvcp-dll"
54481  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54482    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54483$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54484
54485    # Need to check if the found msvcr is correct architecture
54486    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54487$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54488    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54489    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54490      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54491      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54492      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54493        CORRECT_MSVCR_ARCH="PE32 executable"
54494      else
54495        CORRECT_MSVCR_ARCH="PE32+ executable"
54496      fi
54497    else
54498      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54499        CORRECT_MSVCR_ARCH=386
54500      else
54501        CORRECT_MSVCR_ARCH=x86-64
54502      fi
54503    fi
54504    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54505      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54506$as_echo "ok" >&6; }
54507      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54508
54509  # Only process if variable expands to non-empty
54510
54511  if test "x$MSVC_DLL" != x; then
54512    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54513
54514  # Input might be given as Windows format, start by converting to
54515  # unix format.
54516  path="$MSVC_DLL"
54517  new_path=`$CYGPATH -u "$path"`
54518
54519  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54520  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54521  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54522  # "foo.exe" is OK but "foo" is an error.
54523  #
54524  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54525  # It is also a way to make sure we got the proper file name for the real test later on.
54526  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54527  if test "x$test_shortpath" = x; then
54528    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54529$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54530    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54531  fi
54532
54533  # Call helper function which possibly converts this using DOS-style short mode.
54534  # If so, the updated path is stored in $new_path.
54535
54536  input_path="$new_path"
54537  # Check if we need to convert this using DOS-style short mode. If the path
54538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54539  # take no chances and rewrite it.
54540  # Note: m4 eats our [], so we need to use [ and ] instead.
54541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54542  if test "x$has_forbidden_chars" != x; then
54543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54544    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54545    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54546    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54547      # Going to short mode and back again did indeed matter. Since short mode is
54548      # case insensitive, let's make it lowercase to improve readability.
54549      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54550      # Now convert it back to Unix-style (cygpath)
54551      input_path=`$CYGPATH -u "$shortmode_path"`
54552      new_path="$input_path"
54553    fi
54554  fi
54555
54556  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54557  if test "x$test_cygdrive_prefix" = x; then
54558    # As a simple fix, exclude /usr/bin since it's not a real path.
54559    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54560      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54561      # a path prefixed by /cygdrive for fixpath to work.
54562      new_path="$CYGWIN_ROOT_PATH$input_path"
54563    fi
54564  fi
54565
54566
54567  if test "x$path" != "x$new_path"; then
54568    MSVC_DLL="$new_path"
54569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54570$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54571  fi
54572
54573    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54574
54575  path="$MSVC_DLL"
54576  has_colon=`$ECHO $path | $GREP ^.:`
54577  new_path="$path"
54578  if test "x$has_colon" = x; then
54579    # Not in mixed or Windows style, start by that.
54580    new_path=`cmd //c echo $path`
54581  fi
54582
54583
54584  input_path="$new_path"
54585  # Check if we need to convert this using DOS-style short mode. If the path
54586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54587  # take no chances and rewrite it.
54588  # Note: m4 eats our [], so we need to use [ and ] instead.
54589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54590  if test "x$has_forbidden_chars" != x; then
54591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54592    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54593  fi
54594
54595
54596  windows_path="$new_path"
54597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54598    unix_path=`$CYGPATH -u "$windows_path"`
54599    new_path="$unix_path"
54600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54602    new_path="$unix_path"
54603  fi
54604
54605  if test "x$path" != "x$new_path"; then
54606    MSVC_DLL="$new_path"
54607    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54608$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54609  fi
54610
54611  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54612  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54613
54614    else
54615      # We're on a unix platform. Hooray! :)
54616      path="$MSVC_DLL"
54617      has_space=`$ECHO "$path" | $GREP " "`
54618      if test "x$has_space" != x; then
54619        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54620$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54621        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54622      fi
54623
54624      # Use eval to expand a potential ~
54625      eval path="$path"
54626      if test ! -f "$path" && test ! -d "$path"; then
54627        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54628      fi
54629
54630      if test -d "$path"; then
54631        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54632      else
54633        dir="`$DIRNAME "$path"`"
54634        base="`$BASENAME "$path"`"
54635        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54636      fi
54637    fi
54638  fi
54639
54640      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54641$as_echo_n "checking for $DLL_NAME... " >&6; }
54642      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54643$as_echo "$MSVC_DLL" >&6; }
54644    else
54645      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54646$as_echo "incorrect, ignoring" >&6; }
54647      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54648$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54649    fi
54650  fi
54651
54652      if test "x$MSVC_DLL" = x; then
54653        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54654      fi
54655      MSVCP_DLL="$MSVC_DLL"
54656    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54657
54658  DLL_NAME="$MSVCP_NAME"
54659  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54660  METHOD="devkit"
54661  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54662    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54663$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54664
54665    # Need to check if the found msvcr is correct architecture
54666    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54667$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54668    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54669    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54670      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54671      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54672      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54673        CORRECT_MSVCR_ARCH="PE32 executable"
54674      else
54675        CORRECT_MSVCR_ARCH="PE32+ executable"
54676      fi
54677    else
54678      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54679        CORRECT_MSVCR_ARCH=386
54680      else
54681        CORRECT_MSVCR_ARCH=x86-64
54682      fi
54683    fi
54684    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54685      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54686$as_echo "ok" >&6; }
54687      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54688
54689  # Only process if variable expands to non-empty
54690
54691  if test "x$MSVC_DLL" != x; then
54692    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54693
54694  # Input might be given as Windows format, start by converting to
54695  # unix format.
54696  path="$MSVC_DLL"
54697  new_path=`$CYGPATH -u "$path"`
54698
54699  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54700  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54701  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54702  # "foo.exe" is OK but "foo" is an error.
54703  #
54704  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54705  # It is also a way to make sure we got the proper file name for the real test later on.
54706  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54707  if test "x$test_shortpath" = x; then
54708    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54709$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54710    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54711  fi
54712
54713  # Call helper function which possibly converts this using DOS-style short mode.
54714  # If so, the updated path is stored in $new_path.
54715
54716  input_path="$new_path"
54717  # Check if we need to convert this using DOS-style short mode. If the path
54718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54719  # take no chances and rewrite it.
54720  # Note: m4 eats our [], so we need to use [ and ] instead.
54721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54722  if test "x$has_forbidden_chars" != x; then
54723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54724    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54725    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54726    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54727      # Going to short mode and back again did indeed matter. Since short mode is
54728      # case insensitive, let's make it lowercase to improve readability.
54729      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54730      # Now convert it back to Unix-style (cygpath)
54731      input_path=`$CYGPATH -u "$shortmode_path"`
54732      new_path="$input_path"
54733    fi
54734  fi
54735
54736  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54737  if test "x$test_cygdrive_prefix" = x; then
54738    # As a simple fix, exclude /usr/bin since it's not a real path.
54739    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54740      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54741      # a path prefixed by /cygdrive for fixpath to work.
54742      new_path="$CYGWIN_ROOT_PATH$input_path"
54743    fi
54744  fi
54745
54746
54747  if test "x$path" != "x$new_path"; then
54748    MSVC_DLL="$new_path"
54749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54750$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54751  fi
54752
54753    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54754
54755  path="$MSVC_DLL"
54756  has_colon=`$ECHO $path | $GREP ^.:`
54757  new_path="$path"
54758  if test "x$has_colon" = x; then
54759    # Not in mixed or Windows style, start by that.
54760    new_path=`cmd //c echo $path`
54761  fi
54762
54763
54764  input_path="$new_path"
54765  # Check if we need to convert this using DOS-style short mode. If the path
54766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54767  # take no chances and rewrite it.
54768  # Note: m4 eats our [], so we need to use [ and ] instead.
54769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54770  if test "x$has_forbidden_chars" != x; then
54771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54773  fi
54774
54775
54776  windows_path="$new_path"
54777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54778    unix_path=`$CYGPATH -u "$windows_path"`
54779    new_path="$unix_path"
54780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54782    new_path="$unix_path"
54783  fi
54784
54785  if test "x$path" != "x$new_path"; then
54786    MSVC_DLL="$new_path"
54787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54788$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54789  fi
54790
54791  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54792  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54793
54794    else
54795      # We're on a unix platform. Hooray! :)
54796      path="$MSVC_DLL"
54797      has_space=`$ECHO "$path" | $GREP " "`
54798      if test "x$has_space" != x; then
54799        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54800$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54801        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54802      fi
54803
54804      # Use eval to expand a potential ~
54805      eval path="$path"
54806      if test ! -f "$path" && test ! -d "$path"; then
54807        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54808      fi
54809
54810      if test -d "$path"; then
54811        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54812      else
54813        dir="`$DIRNAME "$path"`"
54814        base="`$BASENAME "$path"`"
54815        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54816      fi
54817    fi
54818  fi
54819
54820      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54821$as_echo_n "checking for $DLL_NAME... " >&6; }
54822      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54823$as_echo "$MSVC_DLL" >&6; }
54824    else
54825      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54826$as_echo "incorrect, ignoring" >&6; }
54827      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54828$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54829    fi
54830  fi
54831
54832      if test "x$MSVC_DLL" = x; then
54833        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54834      fi
54835      MSVCP_DLL="$MSVC_DLL"
54836    else
54837
54838  DLL_NAME="${MSVCP_NAME}"
54839  MSVC_DLL=
54840
54841  if test "x$MSVC_DLL" = x; then
54842    # Probe: Using well-known location from Visual Studio 10.0
54843    if test "x$VCINSTALLDIR" != x; then
54844      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54845
54846  windows_path="$CYGWIN_VC_INSTALL_DIR"
54847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54848    unix_path=`$CYGPATH -u "$windows_path"`
54849    CYGWIN_VC_INSTALL_DIR="$unix_path"
54850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54852    CYGWIN_VC_INSTALL_DIR="$unix_path"
54853  fi
54854
54855      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54856        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54857      else
54858        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54859      fi
54860      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54861
54862  DLL_NAME="$DLL_NAME"
54863  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54864  METHOD="well-known location in VCINSTALLDIR"
54865  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54866    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54867$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54868
54869    # Need to check if the found msvcr is correct architecture
54870    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54871$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54872    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54873    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54874      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54875      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54876      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54877        CORRECT_MSVCR_ARCH="PE32 executable"
54878      else
54879        CORRECT_MSVCR_ARCH="PE32+ executable"
54880      fi
54881    else
54882      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54883        CORRECT_MSVCR_ARCH=386
54884      else
54885        CORRECT_MSVCR_ARCH=x86-64
54886      fi
54887    fi
54888    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54889      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54890$as_echo "ok" >&6; }
54891      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54892
54893  # Only process if variable expands to non-empty
54894
54895  if test "x$MSVC_DLL" != x; then
54896    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54897
54898  # Input might be given as Windows format, start by converting to
54899  # unix format.
54900  path="$MSVC_DLL"
54901  new_path=`$CYGPATH -u "$path"`
54902
54903  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54904  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54905  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54906  # "foo.exe" is OK but "foo" is an error.
54907  #
54908  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54909  # It is also a way to make sure we got the proper file name for the real test later on.
54910  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54911  if test "x$test_shortpath" = x; then
54912    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54913$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54914    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54915  fi
54916
54917  # Call helper function which possibly converts this using DOS-style short mode.
54918  # If so, the updated path is stored in $new_path.
54919
54920  input_path="$new_path"
54921  # Check if we need to convert this using DOS-style short mode. If the path
54922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54923  # take no chances and rewrite it.
54924  # Note: m4 eats our [], so we need to use [ and ] instead.
54925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54926  if test "x$has_forbidden_chars" != x; then
54927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54931      # Going to short mode and back again did indeed matter. Since short mode is
54932      # case insensitive, let's make it lowercase to improve readability.
54933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54934      # Now convert it back to Unix-style (cygpath)
54935      input_path=`$CYGPATH -u "$shortmode_path"`
54936      new_path="$input_path"
54937    fi
54938  fi
54939
54940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54941  if test "x$test_cygdrive_prefix" = x; then
54942    # As a simple fix, exclude /usr/bin since it's not a real path.
54943    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54945      # a path prefixed by /cygdrive for fixpath to work.
54946      new_path="$CYGWIN_ROOT_PATH$input_path"
54947    fi
54948  fi
54949
54950
54951  if test "x$path" != "x$new_path"; then
54952    MSVC_DLL="$new_path"
54953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54954$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54955  fi
54956
54957    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54958
54959  path="$MSVC_DLL"
54960  has_colon=`$ECHO $path | $GREP ^.:`
54961  new_path="$path"
54962  if test "x$has_colon" = x; then
54963    # Not in mixed or Windows style, start by that.
54964    new_path=`cmd //c echo $path`
54965  fi
54966
54967
54968  input_path="$new_path"
54969  # Check if we need to convert this using DOS-style short mode. If the path
54970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54971  # take no chances and rewrite it.
54972  # Note: m4 eats our [], so we need to use [ and ] instead.
54973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54974  if test "x$has_forbidden_chars" != x; then
54975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54976    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54977  fi
54978
54979
54980  windows_path="$new_path"
54981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54982    unix_path=`$CYGPATH -u "$windows_path"`
54983    new_path="$unix_path"
54984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54986    new_path="$unix_path"
54987  fi
54988
54989  if test "x$path" != "x$new_path"; then
54990    MSVC_DLL="$new_path"
54991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54992$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54993  fi
54994
54995  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54996  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54997
54998    else
54999      # We're on a unix platform. Hooray! :)
55000      path="$MSVC_DLL"
55001      has_space=`$ECHO "$path" | $GREP " "`
55002      if test "x$has_space" != x; then
55003        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55004$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55005        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55006      fi
55007
55008      # Use eval to expand a potential ~
55009      eval path="$path"
55010      if test ! -f "$path" && test ! -d "$path"; then
55011        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55012      fi
55013
55014      if test -d "$path"; then
55015        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55016      else
55017        dir="`$DIRNAME "$path"`"
55018        base="`$BASENAME "$path"`"
55019        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55020      fi
55021    fi
55022  fi
55023
55024      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55025$as_echo_n "checking for $DLL_NAME... " >&6; }
55026      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55027$as_echo "$MSVC_DLL" >&6; }
55028    else
55029      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55030$as_echo "incorrect, ignoring" >&6; }
55031      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55032$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55033    fi
55034  fi
55035
55036    fi
55037  fi
55038
55039  if test "x$MSVC_DLL" = x; then
55040    # Probe: Check in the Boot JDK directory.
55041    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55042
55043  DLL_NAME="$DLL_NAME"
55044  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55045  METHOD="well-known location in Boot JDK"
55046  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55047    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55048$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55049
55050    # Need to check if the found msvcr is correct architecture
55051    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55052$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55053    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55054    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55055      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55056      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55057      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55058        CORRECT_MSVCR_ARCH="PE32 executable"
55059      else
55060        CORRECT_MSVCR_ARCH="PE32+ executable"
55061      fi
55062    else
55063      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55064        CORRECT_MSVCR_ARCH=386
55065      else
55066        CORRECT_MSVCR_ARCH=x86-64
55067      fi
55068    fi
55069    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55070      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55071$as_echo "ok" >&6; }
55072      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55073
55074  # Only process if variable expands to non-empty
55075
55076  if test "x$MSVC_DLL" != x; then
55077    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55078
55079  # Input might be given as Windows format, start by converting to
55080  # unix format.
55081  path="$MSVC_DLL"
55082  new_path=`$CYGPATH -u "$path"`
55083
55084  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55085  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55086  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55087  # "foo.exe" is OK but "foo" is an error.
55088  #
55089  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55090  # It is also a way to make sure we got the proper file name for the real test later on.
55091  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55092  if test "x$test_shortpath" = x; then
55093    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55094$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55095    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55096  fi
55097
55098  # Call helper function which possibly converts this using DOS-style short mode.
55099  # If so, the updated path is stored in $new_path.
55100
55101  input_path="$new_path"
55102  # Check if we need to convert this using DOS-style short mode. If the path
55103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55104  # take no chances and rewrite it.
55105  # Note: m4 eats our [], so we need to use [ and ] instead.
55106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55107  if test "x$has_forbidden_chars" != x; then
55108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55112      # Going to short mode and back again did indeed matter. Since short mode is
55113      # case insensitive, let's make it lowercase to improve readability.
55114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55115      # Now convert it back to Unix-style (cygpath)
55116      input_path=`$CYGPATH -u "$shortmode_path"`
55117      new_path="$input_path"
55118    fi
55119  fi
55120
55121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55122  if test "x$test_cygdrive_prefix" = x; then
55123    # As a simple fix, exclude /usr/bin since it's not a real path.
55124    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55126      # a path prefixed by /cygdrive for fixpath to work.
55127      new_path="$CYGWIN_ROOT_PATH$input_path"
55128    fi
55129  fi
55130
55131
55132  if test "x$path" != "x$new_path"; then
55133    MSVC_DLL="$new_path"
55134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55135$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55136  fi
55137
55138    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55139
55140  path="$MSVC_DLL"
55141  has_colon=`$ECHO $path | $GREP ^.:`
55142  new_path="$path"
55143  if test "x$has_colon" = x; then
55144    # Not in mixed or Windows style, start by that.
55145    new_path=`cmd //c echo $path`
55146  fi
55147
55148
55149  input_path="$new_path"
55150  # Check if we need to convert this using DOS-style short mode. If the path
55151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55152  # take no chances and rewrite it.
55153  # Note: m4 eats our [], so we need to use [ and ] instead.
55154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55155  if test "x$has_forbidden_chars" != x; then
55156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55157    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55158  fi
55159
55160
55161  windows_path="$new_path"
55162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55163    unix_path=`$CYGPATH -u "$windows_path"`
55164    new_path="$unix_path"
55165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55167    new_path="$unix_path"
55168  fi
55169
55170  if test "x$path" != "x$new_path"; then
55171    MSVC_DLL="$new_path"
55172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55173$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55174  fi
55175
55176  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55177  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55178
55179    else
55180      # We're on a unix platform. Hooray! :)
55181      path="$MSVC_DLL"
55182      has_space=`$ECHO "$path" | $GREP " "`
55183      if test "x$has_space" != x; then
55184        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55185$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55186        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55187      fi
55188
55189      # Use eval to expand a potential ~
55190      eval path="$path"
55191      if test ! -f "$path" && test ! -d "$path"; then
55192        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55193      fi
55194
55195      if test -d "$path"; then
55196        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55197      else
55198        dir="`$DIRNAME "$path"`"
55199        base="`$BASENAME "$path"`"
55200        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55201      fi
55202    fi
55203  fi
55204
55205      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55206$as_echo_n "checking for $DLL_NAME... " >&6; }
55207      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55208$as_echo "$MSVC_DLL" >&6; }
55209    else
55210      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55211$as_echo "incorrect, ignoring" >&6; }
55212      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55213$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55214    fi
55215  fi
55216
55217  fi
55218
55219  if test "x$MSVC_DLL" = x; then
55220    # Probe: Look in the Windows system32 directory
55221    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55222
55223  windows_path="$CYGWIN_SYSTEMROOT"
55224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55225    unix_path=`$CYGPATH -u "$windows_path"`
55226    CYGWIN_SYSTEMROOT="$unix_path"
55227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55229    CYGWIN_SYSTEMROOT="$unix_path"
55230  fi
55231
55232    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55233
55234  DLL_NAME="$DLL_NAME"
55235  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55236  METHOD="well-known location in SYSTEMROOT"
55237  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55238    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55239$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55240
55241    # Need to check if the found msvcr is correct architecture
55242    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55243$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55244    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55245    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55246      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55247      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55248      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55249        CORRECT_MSVCR_ARCH="PE32 executable"
55250      else
55251        CORRECT_MSVCR_ARCH="PE32+ executable"
55252      fi
55253    else
55254      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55255        CORRECT_MSVCR_ARCH=386
55256      else
55257        CORRECT_MSVCR_ARCH=x86-64
55258      fi
55259    fi
55260    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55261      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55262$as_echo "ok" >&6; }
55263      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55264
55265  # Only process if variable expands to non-empty
55266
55267  if test "x$MSVC_DLL" != x; then
55268    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55269
55270  # Input might be given as Windows format, start by converting to
55271  # unix format.
55272  path="$MSVC_DLL"
55273  new_path=`$CYGPATH -u "$path"`
55274
55275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55278  # "foo.exe" is OK but "foo" is an error.
55279  #
55280  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55281  # It is also a way to make sure we got the proper file name for the real test later on.
55282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55283  if test "x$test_shortpath" = x; then
55284    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55285$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55286    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55287  fi
55288
55289  # Call helper function which possibly converts this using DOS-style short mode.
55290  # If so, the updated path is stored in $new_path.
55291
55292  input_path="$new_path"
55293  # Check if we need to convert this using DOS-style short mode. If the path
55294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55295  # take no chances and rewrite it.
55296  # Note: m4 eats our [], so we need to use [ and ] instead.
55297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55298  if test "x$has_forbidden_chars" != x; then
55299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55303      # Going to short mode and back again did indeed matter. Since short mode is
55304      # case insensitive, let's make it lowercase to improve readability.
55305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55306      # Now convert it back to Unix-style (cygpath)
55307      input_path=`$CYGPATH -u "$shortmode_path"`
55308      new_path="$input_path"
55309    fi
55310  fi
55311
55312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55313  if test "x$test_cygdrive_prefix" = x; then
55314    # As a simple fix, exclude /usr/bin since it's not a real path.
55315    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55317      # a path prefixed by /cygdrive for fixpath to work.
55318      new_path="$CYGWIN_ROOT_PATH$input_path"
55319    fi
55320  fi
55321
55322
55323  if test "x$path" != "x$new_path"; then
55324    MSVC_DLL="$new_path"
55325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55326$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55327  fi
55328
55329    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55330
55331  path="$MSVC_DLL"
55332  has_colon=`$ECHO $path | $GREP ^.:`
55333  new_path="$path"
55334  if test "x$has_colon" = x; then
55335    # Not in mixed or Windows style, start by that.
55336    new_path=`cmd //c echo $path`
55337  fi
55338
55339
55340  input_path="$new_path"
55341  # Check if we need to convert this using DOS-style short mode. If the path
55342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55343  # take no chances and rewrite it.
55344  # Note: m4 eats our [], so we need to use [ and ] instead.
55345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55346  if test "x$has_forbidden_chars" != x; then
55347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55348    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55349  fi
55350
55351
55352  windows_path="$new_path"
55353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55354    unix_path=`$CYGPATH -u "$windows_path"`
55355    new_path="$unix_path"
55356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55358    new_path="$unix_path"
55359  fi
55360
55361  if test "x$path" != "x$new_path"; then
55362    MSVC_DLL="$new_path"
55363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55364$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55365  fi
55366
55367  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55368  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55369
55370    else
55371      # We're on a unix platform. Hooray! :)
55372      path="$MSVC_DLL"
55373      has_space=`$ECHO "$path" | $GREP " "`
55374      if test "x$has_space" != x; then
55375        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55376$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55377        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55378      fi
55379
55380      # Use eval to expand a potential ~
55381      eval path="$path"
55382      if test ! -f "$path" && test ! -d "$path"; then
55383        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55384      fi
55385
55386      if test -d "$path"; then
55387        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55388      else
55389        dir="`$DIRNAME "$path"`"
55390        base="`$BASENAME "$path"`"
55391        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55392      fi
55393    fi
55394  fi
55395
55396      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55397$as_echo_n "checking for $DLL_NAME... " >&6; }
55398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55399$as_echo "$MSVC_DLL" >&6; }
55400    else
55401      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55402$as_echo "incorrect, ignoring" >&6; }
55403      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55404$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55405    fi
55406  fi
55407
55408  fi
55409
55410  if test "x$MSVC_DLL" = x; then
55411    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55412    if test "x$VS100COMNTOOLS" != x; then
55413      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55414
55415  windows_path="$CYGWIN_VS_TOOLS_DIR"
55416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55417    unix_path=`$CYGPATH -u "$windows_path"`
55418    CYGWIN_VS_TOOLS_DIR="$unix_path"
55419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55421    CYGWIN_VS_TOOLS_DIR="$unix_path"
55422  fi
55423
55424      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55425        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55426	    | $GREP -i /x64/ | $HEAD --lines 1`
55427      else
55428        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55429	    | $GREP -i /x86/ | $HEAD --lines 1`
55430      fi
55431
55432  DLL_NAME="$DLL_NAME"
55433  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55434  METHOD="search of VS100COMNTOOLS"
55435  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55436    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55437$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55438
55439    # Need to check if the found msvcr is correct architecture
55440    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55441$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55442    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55443    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55444      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55445      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55446      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55447        CORRECT_MSVCR_ARCH="PE32 executable"
55448      else
55449        CORRECT_MSVCR_ARCH="PE32+ executable"
55450      fi
55451    else
55452      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55453        CORRECT_MSVCR_ARCH=386
55454      else
55455        CORRECT_MSVCR_ARCH=x86-64
55456      fi
55457    fi
55458    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55459      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55460$as_echo "ok" >&6; }
55461      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55462
55463  # Only process if variable expands to non-empty
55464
55465  if test "x$MSVC_DLL" != x; then
55466    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55467
55468  # Input might be given as Windows format, start by converting to
55469  # unix format.
55470  path="$MSVC_DLL"
55471  new_path=`$CYGPATH -u "$path"`
55472
55473  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55474  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55475  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55476  # "foo.exe" is OK but "foo" is an error.
55477  #
55478  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55479  # It is also a way to make sure we got the proper file name for the real test later on.
55480  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55481  if test "x$test_shortpath" = x; then
55482    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55483$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55484    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55485  fi
55486
55487  # Call helper function which possibly converts this using DOS-style short mode.
55488  # If so, the updated path is stored in $new_path.
55489
55490  input_path="$new_path"
55491  # Check if we need to convert this using DOS-style short mode. If the path
55492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55493  # take no chances and rewrite it.
55494  # Note: m4 eats our [], so we need to use [ and ] instead.
55495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55496  if test "x$has_forbidden_chars" != x; then
55497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55498    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55499    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55500    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55501      # Going to short mode and back again did indeed matter. Since short mode is
55502      # case insensitive, let's make it lowercase to improve readability.
55503      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55504      # Now convert it back to Unix-style (cygpath)
55505      input_path=`$CYGPATH -u "$shortmode_path"`
55506      new_path="$input_path"
55507    fi
55508  fi
55509
55510  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55511  if test "x$test_cygdrive_prefix" = x; then
55512    # As a simple fix, exclude /usr/bin since it's not a real path.
55513    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55514      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55515      # a path prefixed by /cygdrive for fixpath to work.
55516      new_path="$CYGWIN_ROOT_PATH$input_path"
55517    fi
55518  fi
55519
55520
55521  if test "x$path" != "x$new_path"; then
55522    MSVC_DLL="$new_path"
55523    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55524$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55525  fi
55526
55527    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55528
55529  path="$MSVC_DLL"
55530  has_colon=`$ECHO $path | $GREP ^.:`
55531  new_path="$path"
55532  if test "x$has_colon" = x; then
55533    # Not in mixed or Windows style, start by that.
55534    new_path=`cmd //c echo $path`
55535  fi
55536
55537
55538  input_path="$new_path"
55539  # Check if we need to convert this using DOS-style short mode. If the path
55540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55541  # take no chances and rewrite it.
55542  # Note: m4 eats our [], so we need to use [ and ] instead.
55543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55544  if test "x$has_forbidden_chars" != x; then
55545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55546    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55547  fi
55548
55549
55550  windows_path="$new_path"
55551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55552    unix_path=`$CYGPATH -u "$windows_path"`
55553    new_path="$unix_path"
55554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55556    new_path="$unix_path"
55557  fi
55558
55559  if test "x$path" != "x$new_path"; then
55560    MSVC_DLL="$new_path"
55561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55562$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55563  fi
55564
55565  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55566  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55567
55568    else
55569      # We're on a unix platform. Hooray! :)
55570      path="$MSVC_DLL"
55571      has_space=`$ECHO "$path" | $GREP " "`
55572      if test "x$has_space" != x; then
55573        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55574$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55575        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55576      fi
55577
55578      # Use eval to expand a potential ~
55579      eval path="$path"
55580      if test ! -f "$path" && test ! -d "$path"; then
55581        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55582      fi
55583
55584      if test -d "$path"; then
55585        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55586      else
55587        dir="`$DIRNAME "$path"`"
55588        base="`$BASENAME "$path"`"
55589        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55590      fi
55591    fi
55592  fi
55593
55594      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55595$as_echo_n "checking for $DLL_NAME... " >&6; }
55596      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55597$as_echo "$MSVC_DLL" >&6; }
55598    else
55599      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55600$as_echo "incorrect, ignoring" >&6; }
55601      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55602$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55603    fi
55604  fi
55605
55606    fi
55607  fi
55608
55609  if test "x$MSVC_DLL" = x; then
55610    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55611    # (This was the original behaviour; kept since it might turn something up)
55612    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55613      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55614        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55615	    | $GREP x64 | $HEAD --lines 1`
55616      else
55617        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55618	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55619        if test "x$POSSIBLE_MSVC_DLL" = x; then
55620          # We're grasping at straws now...
55621          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55622	      | $HEAD --lines 1`
55623        fi
55624      fi
55625
55626
55627  DLL_NAME="$DLL_NAME"
55628  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55629  METHOD="search of VCINSTALLDIR"
55630  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55631    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55632$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55633
55634    # Need to check if the found msvcr is correct architecture
55635    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55636$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55637    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55638    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55639      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55640      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55641      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55642        CORRECT_MSVCR_ARCH="PE32 executable"
55643      else
55644        CORRECT_MSVCR_ARCH="PE32+ executable"
55645      fi
55646    else
55647      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55648        CORRECT_MSVCR_ARCH=386
55649      else
55650        CORRECT_MSVCR_ARCH=x86-64
55651      fi
55652    fi
55653    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55654      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55655$as_echo "ok" >&6; }
55656      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55657
55658  # Only process if variable expands to non-empty
55659
55660  if test "x$MSVC_DLL" != x; then
55661    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55662
55663  # Input might be given as Windows format, start by converting to
55664  # unix format.
55665  path="$MSVC_DLL"
55666  new_path=`$CYGPATH -u "$path"`
55667
55668  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55669  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55670  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55671  # "foo.exe" is OK but "foo" is an error.
55672  #
55673  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55674  # It is also a way to make sure we got the proper file name for the real test later on.
55675  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55676  if test "x$test_shortpath" = x; then
55677    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55678$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55679    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55680  fi
55681
55682  # Call helper function which possibly converts this using DOS-style short mode.
55683  # If so, the updated path is stored in $new_path.
55684
55685  input_path="$new_path"
55686  # Check if we need to convert this using DOS-style short mode. If the path
55687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55688  # take no chances and rewrite it.
55689  # Note: m4 eats our [], so we need to use [ and ] instead.
55690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55691  if test "x$has_forbidden_chars" != x; then
55692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55696      # Going to short mode and back again did indeed matter. Since short mode is
55697      # case insensitive, let's make it lowercase to improve readability.
55698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55699      # Now convert it back to Unix-style (cygpath)
55700      input_path=`$CYGPATH -u "$shortmode_path"`
55701      new_path="$input_path"
55702    fi
55703  fi
55704
55705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55706  if test "x$test_cygdrive_prefix" = x; then
55707    # As a simple fix, exclude /usr/bin since it's not a real path.
55708    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55710      # a path prefixed by /cygdrive for fixpath to work.
55711      new_path="$CYGWIN_ROOT_PATH$input_path"
55712    fi
55713  fi
55714
55715
55716  if test "x$path" != "x$new_path"; then
55717    MSVC_DLL="$new_path"
55718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55719$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55720  fi
55721
55722    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55723
55724  path="$MSVC_DLL"
55725  has_colon=`$ECHO $path | $GREP ^.:`
55726  new_path="$path"
55727  if test "x$has_colon" = x; then
55728    # Not in mixed or Windows style, start by that.
55729    new_path=`cmd //c echo $path`
55730  fi
55731
55732
55733  input_path="$new_path"
55734  # Check if we need to convert this using DOS-style short mode. If the path
55735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55736  # take no chances and rewrite it.
55737  # Note: m4 eats our [], so we need to use [ and ] instead.
55738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55739  if test "x$has_forbidden_chars" != x; then
55740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55742  fi
55743
55744
55745  windows_path="$new_path"
55746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55747    unix_path=`$CYGPATH -u "$windows_path"`
55748    new_path="$unix_path"
55749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55751    new_path="$unix_path"
55752  fi
55753
55754  if test "x$path" != "x$new_path"; then
55755    MSVC_DLL="$new_path"
55756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55757$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55758  fi
55759
55760  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55761  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55762
55763    else
55764      # We're on a unix platform. Hooray! :)
55765      path="$MSVC_DLL"
55766      has_space=`$ECHO "$path" | $GREP " "`
55767      if test "x$has_space" != x; then
55768        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55769$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55770        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55771      fi
55772
55773      # Use eval to expand a potential ~
55774      eval path="$path"
55775      if test ! -f "$path" && test ! -d "$path"; then
55776        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55777      fi
55778
55779      if test -d "$path"; then
55780        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55781      else
55782        dir="`$DIRNAME "$path"`"
55783        base="`$BASENAME "$path"`"
55784        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55785      fi
55786    fi
55787  fi
55788
55789      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55790$as_echo_n "checking for $DLL_NAME... " >&6; }
55791      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55792$as_echo "$MSVC_DLL" >&6; }
55793    else
55794      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55795$as_echo "incorrect, ignoring" >&6; }
55796      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55797$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55798    fi
55799  fi
55800
55801    fi
55802  fi
55803
55804  if test "x$MSVC_DLL" = x; then
55805    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55806$as_echo_n "checking for $DLL_NAME... " >&6; }
55807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55808$as_echo "no" >&6; }
55809    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55810  fi
55811
55812      MSVCP_DLL="$MSVC_DLL"
55813    fi
55814
55815  fi
55816
55817  fi
55818
55819
55820  if test "x$NEEDS_LIB_X11" = xfalse; then
55821    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55822      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55823$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55824    fi
55825    X_CFLAGS=
55826    X_LIBS=
55827  else
55828
55829    if test "x${with_x}" = xno; then
55830      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55831    fi
55832
55833    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55834      # The user has specified a X11 base directory. Use it for includes and
55835      # libraries, unless explicitly overridden.
55836      if test "x$x_includes" = xNONE; then
55837        x_includes="${with_x}/include"
55838      fi
55839      if test "x$x_libraries" = xNONE; then
55840        x_libraries="${with_x}/lib"
55841      fi
55842    else
55843      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55844      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55845      # --x-libraries for the sysroot, if that seems to be correct.
55846      if test "x$SYSROOT" != "x"; then
55847        if test "x$x_includes" = xNONE; then
55848          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55849            x_includes="$SYSROOT/usr/X11R6/include"
55850          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55851            x_includes="$SYSROOT/usr/include"
55852          fi
55853        fi
55854        if test "x$x_libraries" = xNONE; then
55855          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55856            x_libraries="$SYSROOT/usr/X11R6/lib"
55857          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55858            x_libraries="$SYSROOT/usr/lib64"
55859          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55860            x_libraries="$SYSROOT/usr/lib"
55861          fi
55862        fi
55863      fi
55864    fi
55865
55866    # Now let autoconf do it's magic
55867    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55868$as_echo_n "checking for X... " >&6; }
55869
55870
55871# Check whether --with-x was given.
55872if test "${with_x+set}" = set; then :
55873  withval=$with_x;
55874fi
55875
55876# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55877if test "x$with_x" = xno; then
55878  # The user explicitly disabled X.
55879  have_x=disabled
55880else
55881  case $x_includes,$x_libraries in #(
55882    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55883    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55884  $as_echo_n "(cached) " >&6
55885else
55886  # One or both of the vars are not set, and there is no cached value.
55887ac_x_includes=no ac_x_libraries=no
55888rm -f -r conftest.dir
55889if mkdir conftest.dir; then
55890  cd conftest.dir
55891  cat >Imakefile <<'_ACEOF'
55892incroot:
55893	@echo incroot='${INCROOT}'
55894usrlibdir:
55895	@echo usrlibdir='${USRLIBDIR}'
55896libdir:
55897	@echo libdir='${LIBDIR}'
55898_ACEOF
55899  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55900    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55901    for ac_var in incroot usrlibdir libdir; do
55902      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55903    done
55904    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55905    for ac_extension in a so sl dylib la dll; do
55906      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55907	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55908	ac_im_usrlibdir=$ac_im_libdir; break
55909      fi
55910    done
55911    # Screen out bogus values from the imake configuration.  They are
55912    # bogus both because they are the default anyway, and because
55913    # using them would break gcc on systems where it needs fixed includes.
55914    case $ac_im_incroot in
55915	/usr/include) ac_x_includes= ;;
55916	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55917    esac
55918    case $ac_im_usrlibdir in
55919	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55920	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55921    esac
55922  fi
55923  cd ..
55924  rm -f -r conftest.dir
55925fi
55926
55927# Standard set of common directories for X headers.
55928# Check X11 before X11Rn because it is often a symlink to the current release.
55929ac_x_header_dirs='
55930/usr/X11/include
55931/usr/X11R7/include
55932/usr/X11R6/include
55933/usr/X11R5/include
55934/usr/X11R4/include
55935
55936/usr/include/X11
55937/usr/include/X11R7
55938/usr/include/X11R6
55939/usr/include/X11R5
55940/usr/include/X11R4
55941
55942/usr/local/X11/include
55943/usr/local/X11R7/include
55944/usr/local/X11R6/include
55945/usr/local/X11R5/include
55946/usr/local/X11R4/include
55947
55948/usr/local/include/X11
55949/usr/local/include/X11R7
55950/usr/local/include/X11R6
55951/usr/local/include/X11R5
55952/usr/local/include/X11R4
55953
55954/usr/X386/include
55955/usr/x386/include
55956/usr/XFree86/include/X11
55957
55958/usr/include
55959/usr/local/include
55960/usr/unsupported/include
55961/usr/athena/include
55962/usr/local/x11r5/include
55963/usr/lpp/Xamples/include
55964
55965/usr/openwin/include
55966/usr/openwin/share/include'
55967
55968if test "$ac_x_includes" = no; then
55969  # Guess where to find include files, by looking for Xlib.h.
55970  # First, try using that file with no special directory specified.
55971  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55972/* end confdefs.h.  */
55973#include <X11/Xlib.h>
55974_ACEOF
55975if ac_fn_cxx_try_cpp "$LINENO"; then :
55976  # We can compile using X headers with no special include directory.
55977ac_x_includes=
55978else
55979  for ac_dir in $ac_x_header_dirs; do
55980  if test -r "$ac_dir/X11/Xlib.h"; then
55981    ac_x_includes=$ac_dir
55982    break
55983  fi
55984done
55985fi
55986rm -f conftest.err conftest.i conftest.$ac_ext
55987fi # $ac_x_includes = no
55988
55989if test "$ac_x_libraries" = no; then
55990  # Check for the libraries.
55991  # See if we find them without any special options.
55992  # Don't add to $LIBS permanently.
55993  ac_save_LIBS=$LIBS
55994  LIBS="-lX11 $LIBS"
55995  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55996/* end confdefs.h.  */
55997#include <X11/Xlib.h>
55998int
55999main ()
56000{
56001XrmInitialize ()
56002  ;
56003  return 0;
56004}
56005_ACEOF
56006if ac_fn_cxx_try_link "$LINENO"; then :
56007  LIBS=$ac_save_LIBS
56008# We can link X programs with no special library path.
56009ac_x_libraries=
56010else
56011  LIBS=$ac_save_LIBS
56012for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56013do
56014  # Don't even attempt the hair of trying to link an X program!
56015  for ac_extension in a so sl dylib la dll; do
56016    if test -r "$ac_dir/libX11.$ac_extension"; then
56017      ac_x_libraries=$ac_dir
56018      break 2
56019    fi
56020  done
56021done
56022fi
56023rm -f core conftest.err conftest.$ac_objext \
56024    conftest$ac_exeext conftest.$ac_ext
56025fi # $ac_x_libraries = no
56026
56027case $ac_x_includes,$ac_x_libraries in #(
56028  no,* | *,no | *\'*)
56029    # Didn't find X, or a directory has "'" in its name.
56030    ac_cv_have_x="have_x=no";; #(
56031  *)
56032    # Record where we found X for the cache.
56033    ac_cv_have_x="have_x=yes\
56034	ac_x_includes='$ac_x_includes'\
56035	ac_x_libraries='$ac_x_libraries'"
56036esac
56037fi
56038;; #(
56039    *) have_x=yes;;
56040  esac
56041  eval "$ac_cv_have_x"
56042fi # $with_x != no
56043
56044if test "$have_x" != yes; then
56045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56046$as_echo "$have_x" >&6; }
56047  no_x=yes
56048else
56049  # If each of the values was on the command line, it overrides each guess.
56050  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56051  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56052  # Update the cache value to reflect the command line values.
56053  ac_cv_have_x="have_x=yes\
56054	ac_x_includes='$x_includes'\
56055	ac_x_libraries='$x_libraries'"
56056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56057$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56058fi
56059
56060    if test "$no_x" = yes; then
56061  # Not all programs may use this symbol, but it does not hurt to define it.
56062
56063$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56064
56065  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56066else
56067  if test -n "$x_includes"; then
56068    X_CFLAGS="$X_CFLAGS -I$x_includes"
56069  fi
56070
56071  # It would also be nice to do this for all -L options, not just this one.
56072  if test -n "$x_libraries"; then
56073    X_LIBS="$X_LIBS -L$x_libraries"
56074    # For Solaris; some versions of Sun CC require a space after -R and
56075    # others require no space.  Words are not sufficient . . . .
56076    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56077$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56078    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56079    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56080    ac_cxx_werror_flag=yes
56081    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56082/* end confdefs.h.  */
56083
56084int
56085main ()
56086{
56087
56088  ;
56089  return 0;
56090}
56091_ACEOF
56092if ac_fn_cxx_try_link "$LINENO"; then :
56093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56094$as_echo "no" >&6; }
56095       X_LIBS="$X_LIBS -R$x_libraries"
56096else
56097  LIBS="$ac_xsave_LIBS -R $x_libraries"
56098       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56099/* end confdefs.h.  */
56100
56101int
56102main ()
56103{
56104
56105  ;
56106  return 0;
56107}
56108_ACEOF
56109if ac_fn_cxx_try_link "$LINENO"; then :
56110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56111$as_echo "yes" >&6; }
56112	  X_LIBS="$X_LIBS -R $x_libraries"
56113else
56114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56115$as_echo "neither works" >&6; }
56116fi
56117rm -f core conftest.err conftest.$ac_objext \
56118    conftest$ac_exeext conftest.$ac_ext
56119fi
56120rm -f core conftest.err conftest.$ac_objext \
56121    conftest$ac_exeext conftest.$ac_ext
56122    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56123    LIBS=$ac_xsave_LIBS
56124  fi
56125
56126  # Check for system-dependent libraries X programs must link with.
56127  # Do this before checking for the system-independent R6 libraries
56128  # (-lICE), since we may need -lsocket or whatever for X linking.
56129
56130  if test "$ISC" = yes; then
56131    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56132  else
56133    # Martyn Johnson says this is needed for Ultrix, if the X
56134    # libraries were built with DECnet support.  And Karl Berry says
56135    # the Alpha needs dnet_stub (dnet does not exist).
56136    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56137    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56138/* end confdefs.h.  */
56139
56140/* Override any GCC internal prototype to avoid an error.
56141   Use char because int might match the return type of a GCC
56142   builtin and then its argument prototype would still apply.  */
56143#ifdef __cplusplus
56144extern "C"
56145#endif
56146char XOpenDisplay ();
56147int
56148main ()
56149{
56150return XOpenDisplay ();
56151  ;
56152  return 0;
56153}
56154_ACEOF
56155if ac_fn_cxx_try_link "$LINENO"; then :
56156
56157else
56158  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56159$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56160if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56161  $as_echo_n "(cached) " >&6
56162else
56163  ac_check_lib_save_LIBS=$LIBS
56164LIBS="-ldnet  $LIBS"
56165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56166/* end confdefs.h.  */
56167
56168/* Override any GCC internal prototype to avoid an error.
56169   Use char because int might match the return type of a GCC
56170   builtin and then its argument prototype would still apply.  */
56171#ifdef __cplusplus
56172extern "C"
56173#endif
56174char dnet_ntoa ();
56175int
56176main ()
56177{
56178return dnet_ntoa ();
56179  ;
56180  return 0;
56181}
56182_ACEOF
56183if ac_fn_cxx_try_link "$LINENO"; then :
56184  ac_cv_lib_dnet_dnet_ntoa=yes
56185else
56186  ac_cv_lib_dnet_dnet_ntoa=no
56187fi
56188rm -f core conftest.err conftest.$ac_objext \
56189    conftest$ac_exeext conftest.$ac_ext
56190LIBS=$ac_check_lib_save_LIBS
56191fi
56192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56193$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56194if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56195  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56196fi
56197
56198    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56199      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56200$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56201if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56202  $as_echo_n "(cached) " >&6
56203else
56204  ac_check_lib_save_LIBS=$LIBS
56205LIBS="-ldnet_stub  $LIBS"
56206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56207/* end confdefs.h.  */
56208
56209/* Override any GCC internal prototype to avoid an error.
56210   Use char because int might match the return type of a GCC
56211   builtin and then its argument prototype would still apply.  */
56212#ifdef __cplusplus
56213extern "C"
56214#endif
56215char dnet_ntoa ();
56216int
56217main ()
56218{
56219return dnet_ntoa ();
56220  ;
56221  return 0;
56222}
56223_ACEOF
56224if ac_fn_cxx_try_link "$LINENO"; then :
56225  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56226else
56227  ac_cv_lib_dnet_stub_dnet_ntoa=no
56228fi
56229rm -f core conftest.err conftest.$ac_objext \
56230    conftest$ac_exeext conftest.$ac_ext
56231LIBS=$ac_check_lib_save_LIBS
56232fi
56233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56234$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56235if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56236  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56237fi
56238
56239    fi
56240fi
56241rm -f core conftest.err conftest.$ac_objext \
56242    conftest$ac_exeext conftest.$ac_ext
56243    LIBS="$ac_xsave_LIBS"
56244
56245    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56246    # to get the SysV transport functions.
56247    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56248    # needs -lnsl.
56249    # The nsl library prevents programs from opening the X display
56250    # on Irix 5.2, according to T.E. Dickey.
56251    # The functions gethostbyname, getservbyname, and inet_addr are
56252    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56253    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56254if test "x$ac_cv_func_gethostbyname" = xyes; then :
56255
56256fi
56257
56258    if test $ac_cv_func_gethostbyname = no; then
56259      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56260$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56261if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56262  $as_echo_n "(cached) " >&6
56263else
56264  ac_check_lib_save_LIBS=$LIBS
56265LIBS="-lnsl  $LIBS"
56266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56267/* end confdefs.h.  */
56268
56269/* Override any GCC internal prototype to avoid an error.
56270   Use char because int might match the return type of a GCC
56271   builtin and then its argument prototype would still apply.  */
56272#ifdef __cplusplus
56273extern "C"
56274#endif
56275char gethostbyname ();
56276int
56277main ()
56278{
56279return gethostbyname ();
56280  ;
56281  return 0;
56282}
56283_ACEOF
56284if ac_fn_cxx_try_link "$LINENO"; then :
56285  ac_cv_lib_nsl_gethostbyname=yes
56286else
56287  ac_cv_lib_nsl_gethostbyname=no
56288fi
56289rm -f core conftest.err conftest.$ac_objext \
56290    conftest$ac_exeext conftest.$ac_ext
56291LIBS=$ac_check_lib_save_LIBS
56292fi
56293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56294$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56295if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56296  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56297fi
56298
56299      if test $ac_cv_lib_nsl_gethostbyname = no; then
56300	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56301$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56302if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56303  $as_echo_n "(cached) " >&6
56304else
56305  ac_check_lib_save_LIBS=$LIBS
56306LIBS="-lbsd  $LIBS"
56307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56308/* end confdefs.h.  */
56309
56310/* Override any GCC internal prototype to avoid an error.
56311   Use char because int might match the return type of a GCC
56312   builtin and then its argument prototype would still apply.  */
56313#ifdef __cplusplus
56314extern "C"
56315#endif
56316char gethostbyname ();
56317int
56318main ()
56319{
56320return gethostbyname ();
56321  ;
56322  return 0;
56323}
56324_ACEOF
56325if ac_fn_cxx_try_link "$LINENO"; then :
56326  ac_cv_lib_bsd_gethostbyname=yes
56327else
56328  ac_cv_lib_bsd_gethostbyname=no
56329fi
56330rm -f core conftest.err conftest.$ac_objext \
56331    conftest$ac_exeext conftest.$ac_ext
56332LIBS=$ac_check_lib_save_LIBS
56333fi
56334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56335$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56336if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56337  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56338fi
56339
56340      fi
56341    fi
56342
56343    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56344    # socket/setsockopt and other routines are undefined under SCO ODT
56345    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56346    # on later versions), says Simon Leinen: it contains gethostby*
56347    # variants that don't use the name server (or something).  -lsocket
56348    # must be given before -lnsl if both are needed.  We assume that
56349    # if connect needs -lnsl, so does gethostbyname.
56350    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56351if test "x$ac_cv_func_connect" = xyes; then :
56352
56353fi
56354
56355    if test $ac_cv_func_connect = no; then
56356      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56357$as_echo_n "checking for connect in -lsocket... " >&6; }
56358if ${ac_cv_lib_socket_connect+:} false; then :
56359  $as_echo_n "(cached) " >&6
56360else
56361  ac_check_lib_save_LIBS=$LIBS
56362LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56364/* end confdefs.h.  */
56365
56366/* Override any GCC internal prototype to avoid an error.
56367   Use char because int might match the return type of a GCC
56368   builtin and then its argument prototype would still apply.  */
56369#ifdef __cplusplus
56370extern "C"
56371#endif
56372char connect ();
56373int
56374main ()
56375{
56376return connect ();
56377  ;
56378  return 0;
56379}
56380_ACEOF
56381if ac_fn_cxx_try_link "$LINENO"; then :
56382  ac_cv_lib_socket_connect=yes
56383else
56384  ac_cv_lib_socket_connect=no
56385fi
56386rm -f core conftest.err conftest.$ac_objext \
56387    conftest$ac_exeext conftest.$ac_ext
56388LIBS=$ac_check_lib_save_LIBS
56389fi
56390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56391$as_echo "$ac_cv_lib_socket_connect" >&6; }
56392if test "x$ac_cv_lib_socket_connect" = xyes; then :
56393  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56394fi
56395
56396    fi
56397
56398    # Guillermo Gomez says -lposix is necessary on A/UX.
56399    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56400if test "x$ac_cv_func_remove" = xyes; then :
56401
56402fi
56403
56404    if test $ac_cv_func_remove = no; then
56405      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56406$as_echo_n "checking for remove in -lposix... " >&6; }
56407if ${ac_cv_lib_posix_remove+:} false; then :
56408  $as_echo_n "(cached) " >&6
56409else
56410  ac_check_lib_save_LIBS=$LIBS
56411LIBS="-lposix  $LIBS"
56412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56413/* end confdefs.h.  */
56414
56415/* Override any GCC internal prototype to avoid an error.
56416   Use char because int might match the return type of a GCC
56417   builtin and then its argument prototype would still apply.  */
56418#ifdef __cplusplus
56419extern "C"
56420#endif
56421char remove ();
56422int
56423main ()
56424{
56425return remove ();
56426  ;
56427  return 0;
56428}
56429_ACEOF
56430if ac_fn_cxx_try_link "$LINENO"; then :
56431  ac_cv_lib_posix_remove=yes
56432else
56433  ac_cv_lib_posix_remove=no
56434fi
56435rm -f core conftest.err conftest.$ac_objext \
56436    conftest$ac_exeext conftest.$ac_ext
56437LIBS=$ac_check_lib_save_LIBS
56438fi
56439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56440$as_echo "$ac_cv_lib_posix_remove" >&6; }
56441if test "x$ac_cv_lib_posix_remove" = xyes; then :
56442  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56443fi
56444
56445    fi
56446
56447    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56448    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56449if test "x$ac_cv_func_shmat" = xyes; then :
56450
56451fi
56452
56453    if test $ac_cv_func_shmat = no; then
56454      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56455$as_echo_n "checking for shmat in -lipc... " >&6; }
56456if ${ac_cv_lib_ipc_shmat+:} false; then :
56457  $as_echo_n "(cached) " >&6
56458else
56459  ac_check_lib_save_LIBS=$LIBS
56460LIBS="-lipc  $LIBS"
56461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56462/* end confdefs.h.  */
56463
56464/* Override any GCC internal prototype to avoid an error.
56465   Use char because int might match the return type of a GCC
56466   builtin and then its argument prototype would still apply.  */
56467#ifdef __cplusplus
56468extern "C"
56469#endif
56470char shmat ();
56471int
56472main ()
56473{
56474return shmat ();
56475  ;
56476  return 0;
56477}
56478_ACEOF
56479if ac_fn_cxx_try_link "$LINENO"; then :
56480  ac_cv_lib_ipc_shmat=yes
56481else
56482  ac_cv_lib_ipc_shmat=no
56483fi
56484rm -f core conftest.err conftest.$ac_objext \
56485    conftest$ac_exeext conftest.$ac_ext
56486LIBS=$ac_check_lib_save_LIBS
56487fi
56488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56489$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56490if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56491  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56492fi
56493
56494    fi
56495  fi
56496
56497  # Check for libraries that X11R6 Xt/Xaw programs need.
56498  ac_save_LDFLAGS=$LDFLAGS
56499  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56500  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56501  # check for ICE first), but we must link in the order -lSM -lICE or
56502  # we get undefined symbols.  So assume we have SM if we have ICE.
56503  # These have to be linked with before -lX11, unlike the other
56504  # libraries we check for below, so use a different variable.
56505  # John Interrante, Karl Berry
56506  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56507$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56508if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56509  $as_echo_n "(cached) " >&6
56510else
56511  ac_check_lib_save_LIBS=$LIBS
56512LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56514/* end confdefs.h.  */
56515
56516/* Override any GCC internal prototype to avoid an error.
56517   Use char because int might match the return type of a GCC
56518   builtin and then its argument prototype would still apply.  */
56519#ifdef __cplusplus
56520extern "C"
56521#endif
56522char IceConnectionNumber ();
56523int
56524main ()
56525{
56526return IceConnectionNumber ();
56527  ;
56528  return 0;
56529}
56530_ACEOF
56531if ac_fn_cxx_try_link "$LINENO"; then :
56532  ac_cv_lib_ICE_IceConnectionNumber=yes
56533else
56534  ac_cv_lib_ICE_IceConnectionNumber=no
56535fi
56536rm -f core conftest.err conftest.$ac_objext \
56537    conftest$ac_exeext conftest.$ac_ext
56538LIBS=$ac_check_lib_save_LIBS
56539fi
56540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56541$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56542if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56543  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56544fi
56545
56546  LDFLAGS=$ac_save_LDFLAGS
56547
56548fi
56549
56550
56551    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56552    # this doesn't make sense so we remove it.
56553    if test "x$COMPILE_TYPE" = xcross; then
56554      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56555    fi
56556
56557    if test "x$no_x" = xyes; then
56558
56559  # Print a helpful message on how to acquire the necessary build dependency.
56560  # x11 is the help tag: freetype, cups, alsa etc
56561  MISSING_DEPENDENCY=x11
56562
56563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56564    cygwin_help $MISSING_DEPENDENCY
56565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56566    msys_help $MISSING_DEPENDENCY
56567  else
56568    PKGHANDLER_COMMAND=
56569
56570    case $PKGHANDLER in
56571      apt-get)
56572        apt_help     $MISSING_DEPENDENCY ;;
56573      yum)
56574        yum_help     $MISSING_DEPENDENCY ;;
56575      port)
56576        port_help    $MISSING_DEPENDENCY ;;
56577      pkgutil)
56578        pkgutil_help $MISSING_DEPENDENCY ;;
56579      pkgadd)
56580        pkgadd_help  $MISSING_DEPENDENCY ;;
56581    esac
56582
56583    if test "x$PKGHANDLER_COMMAND" != x; then
56584      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56585    fi
56586  fi
56587
56588      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56589    fi
56590
56591    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56592      OPENWIN_HOME="/usr/openwin"
56593      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56594      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56595          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56596    fi
56597
56598    ac_ext=c
56599ac_cpp='$CPP $CPPFLAGS'
56600ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56601ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56602ac_compiler_gnu=$ac_cv_c_compiler_gnu
56603
56604    OLD_CFLAGS="$CFLAGS"
56605    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56606
56607    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56608    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56609do :
56610  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56611ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56612          # include <X11/Xlib.h>
56613          # include <X11/Xutil.h>
56614
56615
56616"
56617if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56618  cat >>confdefs.h <<_ACEOF
56619#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56620_ACEOF
56621 X11_HEADERS_OK=yes
56622else
56623  X11_HEADERS_OK=no; break
56624fi
56625
56626done
56627
56628
56629    if test "x$X11_HEADERS_OK" = xno; then
56630
56631  # Print a helpful message on how to acquire the necessary build dependency.
56632  # x11 is the help tag: freetype, cups, alsa etc
56633  MISSING_DEPENDENCY=x11
56634
56635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56636    cygwin_help $MISSING_DEPENDENCY
56637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56638    msys_help $MISSING_DEPENDENCY
56639  else
56640    PKGHANDLER_COMMAND=
56641
56642    case $PKGHANDLER in
56643      apt-get)
56644        apt_help     $MISSING_DEPENDENCY ;;
56645      yum)
56646        yum_help     $MISSING_DEPENDENCY ;;
56647      port)
56648        port_help    $MISSING_DEPENDENCY ;;
56649      pkgutil)
56650        pkgutil_help $MISSING_DEPENDENCY ;;
56651      pkgadd)
56652        pkgadd_help  $MISSING_DEPENDENCY ;;
56653    esac
56654
56655    if test "x$PKGHANDLER_COMMAND" != x; then
56656      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56657    fi
56658  fi
56659
56660      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56661    fi
56662
56663    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56664    # defined in libawt_xawt.
56665    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56666$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56667    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56668/* end confdefs.h.  */
56669#include <X11/extensions/Xrender.h>
56670int
56671main ()
56672{
56673XLinearGradient x;
56674  ;
56675  return 0;
56676}
56677_ACEOF
56678if ac_fn_c_try_compile "$LINENO"; then :
56679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56680$as_echo "yes" >&6; }
56681else
56682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56683$as_echo "no" >&6; }
56684         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56685fi
56686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56687
56688    CFLAGS="$OLD_CFLAGS"
56689    ac_ext=cpp
56690ac_cpp='$CXXCPP $CPPFLAGS'
56691ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56692ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56693ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56694
56695  fi # NEEDS_LIB_X11
56696
56697
56698
56699
56700
56701
56702# Check whether --with-cups was given.
56703if test "${with_cups+set}" = set; then :
56704  withval=$with_cups;
56705fi
56706
56707
56708# Check whether --with-cups-include was given.
56709if test "${with_cups_include+set}" = set; then :
56710  withval=$with_cups_include;
56711fi
56712
56713
56714  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56715    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56716        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56717      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56718$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56719    fi
56720    CUPS_CFLAGS=
56721  else
56722    CUPS_FOUND=no
56723
56724    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56725      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56726    fi
56727
56728    if test "x${with_cups}" != x; then
56729      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56730$as_echo_n "checking for cups headers... " >&6; }
56731      if test -s "${with_cups}/include/cups/cups.h"; then
56732        CUPS_CFLAGS="-I${with_cups}/include"
56733        CUPS_FOUND=yes
56734        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56735$as_echo "$CUPS_FOUND" >&6; }
56736      else
56737        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56738      fi
56739    fi
56740    if test "x${with_cups_include}" != x; then
56741      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56742$as_echo_n "checking for cups headers... " >&6; }
56743      if test -s "${with_cups_include}/cups/cups.h"; then
56744        CUPS_CFLAGS="-I${with_cups_include}"
56745        CUPS_FOUND=yes
56746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56747$as_echo "$CUPS_FOUND" >&6; }
56748      else
56749        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56750      fi
56751    fi
56752    if test "x$CUPS_FOUND" = xno; then
56753      # Are the cups headers installed in the default /usr/include location?
56754      for ac_header in cups/cups.h cups/ppd.h
56755do :
56756  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56757ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56758if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56759  cat >>confdefs.h <<_ACEOF
56760#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56761_ACEOF
56762
56763          CUPS_FOUND=yes
56764          CUPS_CFLAGS=
56765          DEFAULT_CUPS=yes
56766
56767fi
56768
56769done
56770
56771    fi
56772    if test "x$CUPS_FOUND" = xno; then
56773
56774  # Print a helpful message on how to acquire the necessary build dependency.
56775  # cups is the help tag: freetype, cups, alsa etc
56776  MISSING_DEPENDENCY=cups
56777
56778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56779    cygwin_help $MISSING_DEPENDENCY
56780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56781    msys_help $MISSING_DEPENDENCY
56782  else
56783    PKGHANDLER_COMMAND=
56784
56785    case $PKGHANDLER in
56786      apt-get)
56787        apt_help     $MISSING_DEPENDENCY ;;
56788      yum)
56789        yum_help     $MISSING_DEPENDENCY ;;
56790      port)
56791        port_help    $MISSING_DEPENDENCY ;;
56792      pkgutil)
56793        pkgutil_help $MISSING_DEPENDENCY ;;
56794      pkgadd)
56795        pkgadd_help  $MISSING_DEPENDENCY ;;
56796    esac
56797
56798    if test "x$PKGHANDLER_COMMAND" != x; then
56799      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56800    fi
56801  fi
56802
56803      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56804    fi
56805  fi
56806
56807
56808
56809
56810
56811# Check whether --with-freetype was given.
56812if test "${with_freetype+set}" = set; then :
56813  withval=$with_freetype;
56814fi
56815
56816
56817# Check whether --with-freetype-include was given.
56818if test "${with_freetype_include+set}" = set; then :
56819  withval=$with_freetype_include;
56820fi
56821
56822
56823# Check whether --with-freetype-lib was given.
56824if test "${with_freetype_lib+set}" = set; then :
56825  withval=$with_freetype_lib;
56826fi
56827
56828
56829# Check whether --with-freetype-src was given.
56830if test "${with_freetype_src+set}" = set; then :
56831  withval=$with_freetype_src;
56832fi
56833
56834  # Check whether --enable-freetype-bundling was given.
56835if test "${enable_freetype_bundling+set}" = set; then :
56836  enableval=$enable_freetype_bundling;
56837fi
56838
56839
56840  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56841  FREETYPE_BASE_NAME=freetype
56842  FREETYPE_CFLAGS=
56843  FREETYPE_LIBS=
56844  FREETYPE_BUNDLE_LIB_PATH=
56845
56846  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56847    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56848        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56849        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56850        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56851      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56852$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56853    fi
56854    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56855      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56856$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56857    fi
56858  else
56859    # freetype is needed to build; go get it!
56860
56861    BUNDLE_FREETYPE="$enable_freetype_bundling"
56862
56863    if  test "x$with_freetype_src" != x; then
56864      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56865        # Try to build freetype if --with-freetype-src was given on Windows
56866
56867  FREETYPE_SRC_PATH="$with_freetype_src"
56868  BUILD_FREETYPE=yes
56869
56870  # Check if the freetype sources are acessible..
56871  if ! test -d $FREETYPE_SRC_PATH; then
56872    { $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
56873$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56874    BUILD_FREETYPE=no
56875  fi
56876  # ..and contain a vc2010 project file
56877  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56878  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56879    { $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
56880$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56881    BUILD_FREETYPE=no
56882  fi
56883  # Now check if configure found a version of 'msbuild.exe'
56884  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56885    { $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
56886$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;}
56887    BUILD_FREETYPE=no
56888  fi
56889
56890  # Ready to go..
56891  if test "x$BUILD_FREETYPE" = xyes; then
56892    # msbuild requires trailing slashes for output directories
56893    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56894    freetype_lib_path_unix="$freetype_lib_path"
56895    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56896
56897  unix_path="$vcxproj_path"
56898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56899    windows_path=`$CYGPATH -m "$unix_path"`
56900    vcxproj_path="$windows_path"
56901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56902    windows_path=`cmd //c echo $unix_path`
56903    vcxproj_path="$windows_path"
56904  fi
56905
56906
56907  unix_path="$freetype_lib_path"
56908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56909    windows_path=`$CYGPATH -m "$unix_path"`
56910    freetype_lib_path="$windows_path"
56911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56912    windows_path=`cmd //c echo $unix_path`
56913    freetype_lib_path="$windows_path"
56914  fi
56915
56916
56917  unix_path="$freetype_obj_path"
56918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56919    windows_path=`$CYGPATH -m "$unix_path"`
56920    freetype_obj_path="$windows_path"
56921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56922    windows_path=`cmd //c echo $unix_path`
56923    freetype_obj_path="$windows_path"
56924  fi
56925
56926    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56927      freetype_platform=x64
56928    else
56929      freetype_platform=win32
56930    fi
56931
56932    # The original freetype project file is for VS 2010 (i.e. 'v100'),
56933    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56934    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56935    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56936    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56937$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56938
56939    # First we try to build the freetype.dll
56940    $ECHO -e "@echo off\n"\
56941        "$MSBUILD $vcxproj_path "\
56942        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56943        "/p:Configuration=\"Release Multithreaded\" "\
56944        "/p:Platform=$freetype_platform "\
56945        "/p:ConfigurationType=DynamicLibrary "\
56946        "/p:TargetName=freetype "\
56947        "/p:OutDir=\"$freetype_lib_path\" "\
56948        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56949    cmd /c freetype.bat
56950
56951    if test -s "$freetype_lib_path_unix/freetype.dll"; then
56952      # If that succeeds we also build freetype.lib
56953      $ECHO -e "@echo off\n"\
56954          "$MSBUILD $vcxproj_path "\
56955          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56956          "/p:Configuration=\"Release Multithreaded\" "\
56957          "/p:Platform=$freetype_platform "\
56958          "/p:ConfigurationType=StaticLibrary "\
56959          "/p:TargetName=freetype "\
56960          "/p:OutDir=\"$freetype_lib_path\" "\
56961          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
56962      cmd /c freetype.bat
56963
56964      if test -s "$freetype_lib_path_unix/freetype.lib"; then
56965        # Once we build both, lib and dll, set freetype lib and include path appropriately
56966        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
56967        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
56968        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
56969$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
56970      else
56971        BUILD_FREETYPE=no
56972      fi
56973    else
56974      BUILD_FREETYPE=no
56975    fi
56976  fi
56977
56978        if test "x$BUILD_FREETYPE" = xyes; then
56979          # Okay, we built it. Check that it works.
56980
56981  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56982  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56983  METHOD="--with-freetype-src"
56984
56985  # Let's start with an optimistic view of the world :-)
56986  FOUND_FREETYPE=yes
56987
56988  # First look for the canonical freetype main include file ft2build.h.
56989  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56990    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56991    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56992    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56993      # Fail.
56994      FOUND_FREETYPE=no
56995    fi
56996  fi
56997
56998  if test "x$FOUND_FREETYPE" = xyes; then
56999    # Include file found, let's continue the sanity check.
57000    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57001$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57002
57003    # Reset to default value
57004    FREETYPE_BASE_NAME=freetype
57005    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57006    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57007      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57008          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57009        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57010        # for the .6 version explicitly.
57011        FREETYPE_BASE_NAME=freetype.6
57012        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57013        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57014$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57015      else
57016        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57017$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57018        FOUND_FREETYPE=no
57019      fi
57020    else
57021      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57022        # On Windows, we will need both .lib and .dll file.
57023        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57024          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57025$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57026          FOUND_FREETYPE=no
57027        fi
57028      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57029          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57030        # Found lib in isa dir, use that instead.
57031        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57032        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57033$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57034      fi
57035    fi
57036  fi
57037
57038  if test "x$FOUND_FREETYPE" = xyes; then
57039
57040  # Only process if variable expands to non-empty
57041
57042  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57043    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57044
57045  # Input might be given as Windows format, start by converting to
57046  # unix format.
57047  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57048  new_path=`$CYGPATH -u "$path"`
57049
57050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57053  # "foo.exe" is OK but "foo" is an error.
57054  #
57055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57056  # It is also a way to make sure we got the proper file name for the real test later on.
57057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57058  if test "x$test_shortpath" = x; then
57059    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57060$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57061    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57062  fi
57063
57064  # Call helper function which possibly converts this using DOS-style short mode.
57065  # If so, the updated path is stored in $new_path.
57066
57067  input_path="$new_path"
57068  # Check if we need to convert this using DOS-style short mode. If the path
57069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57070  # take no chances and rewrite it.
57071  # Note: m4 eats our [], so we need to use [ and ] instead.
57072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57073  if test "x$has_forbidden_chars" != x; then
57074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57078      # Going to short mode and back again did indeed matter. Since short mode is
57079      # case insensitive, let's make it lowercase to improve readability.
57080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57081      # Now convert it back to Unix-style (cygpath)
57082      input_path=`$CYGPATH -u "$shortmode_path"`
57083      new_path="$input_path"
57084    fi
57085  fi
57086
57087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57088  if test "x$test_cygdrive_prefix" = x; then
57089    # As a simple fix, exclude /usr/bin since it's not a real path.
57090    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57092      # a path prefixed by /cygdrive for fixpath to work.
57093      new_path="$CYGWIN_ROOT_PATH$input_path"
57094    fi
57095  fi
57096
57097
57098  if test "x$path" != "x$new_path"; then
57099    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57101$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57102  fi
57103
57104    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57105
57106  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57107  has_colon=`$ECHO $path | $GREP ^.:`
57108  new_path="$path"
57109  if test "x$has_colon" = x; then
57110    # Not in mixed or Windows style, start by that.
57111    new_path=`cmd //c echo $path`
57112  fi
57113
57114
57115  input_path="$new_path"
57116  # Check if we need to convert this using DOS-style short mode. If the path
57117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57118  # take no chances and rewrite it.
57119  # Note: m4 eats our [], so we need to use [ and ] instead.
57120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57121  if test "x$has_forbidden_chars" != x; then
57122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57124  fi
57125
57126
57127  windows_path="$new_path"
57128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57129    unix_path=`$CYGPATH -u "$windows_path"`
57130    new_path="$unix_path"
57131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57133    new_path="$unix_path"
57134  fi
57135
57136  if test "x$path" != "x$new_path"; then
57137    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57139$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57140  fi
57141
57142  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57143  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57144
57145    else
57146      # We're on a unix platform. Hooray! :)
57147      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57148      has_space=`$ECHO "$path" | $GREP " "`
57149      if test "x$has_space" != x; then
57150        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57151$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57152        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57153      fi
57154
57155      # Use eval to expand a potential ~
57156      eval path="$path"
57157      if test ! -f "$path" && test ! -d "$path"; then
57158        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57159      fi
57160
57161      if test -d "$path"; then
57162        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57163      else
57164        dir="`$DIRNAME "$path"`"
57165        base="`$BASENAME "$path"`"
57166        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57167      fi
57168    fi
57169  fi
57170
57171
57172  # Only process if variable expands to non-empty
57173
57174  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57175    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57176
57177  # Input might be given as Windows format, start by converting to
57178  # unix format.
57179  path="$POTENTIAL_FREETYPE_LIB_PATH"
57180  new_path=`$CYGPATH -u "$path"`
57181
57182  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57183  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57184  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57185  # "foo.exe" is OK but "foo" is an error.
57186  #
57187  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57188  # It is also a way to make sure we got the proper file name for the real test later on.
57189  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57190  if test "x$test_shortpath" = x; then
57191    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57192$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57193    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57194  fi
57195
57196  # Call helper function which possibly converts this using DOS-style short mode.
57197  # If so, the updated path is stored in $new_path.
57198
57199  input_path="$new_path"
57200  # Check if we need to convert this using DOS-style short mode. If the path
57201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57202  # take no chances and rewrite it.
57203  # Note: m4 eats our [], so we need to use [ and ] instead.
57204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57205  if test "x$has_forbidden_chars" != x; then
57206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57210      # Going to short mode and back again did indeed matter. Since short mode is
57211      # case insensitive, let's make it lowercase to improve readability.
57212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57213      # Now convert it back to Unix-style (cygpath)
57214      input_path=`$CYGPATH -u "$shortmode_path"`
57215      new_path="$input_path"
57216    fi
57217  fi
57218
57219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57220  if test "x$test_cygdrive_prefix" = x; then
57221    # As a simple fix, exclude /usr/bin since it's not a real path.
57222    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57224      # a path prefixed by /cygdrive for fixpath to work.
57225      new_path="$CYGWIN_ROOT_PATH$input_path"
57226    fi
57227  fi
57228
57229
57230  if test "x$path" != "x$new_path"; then
57231    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57233$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57234  fi
57235
57236    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57237
57238  path="$POTENTIAL_FREETYPE_LIB_PATH"
57239  has_colon=`$ECHO $path | $GREP ^.:`
57240  new_path="$path"
57241  if test "x$has_colon" = x; then
57242    # Not in mixed or Windows style, start by that.
57243    new_path=`cmd //c echo $path`
57244  fi
57245
57246
57247  input_path="$new_path"
57248  # Check if we need to convert this using DOS-style short mode. If the path
57249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57250  # take no chances and rewrite it.
57251  # Note: m4 eats our [], so we need to use [ and ] instead.
57252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57253  if test "x$has_forbidden_chars" != x; then
57254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57255    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57256  fi
57257
57258
57259  windows_path="$new_path"
57260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57261    unix_path=`$CYGPATH -u "$windows_path"`
57262    new_path="$unix_path"
57263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57265    new_path="$unix_path"
57266  fi
57267
57268  if test "x$path" != "x$new_path"; then
57269    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57271$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57272  fi
57273
57274  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57275  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57276
57277    else
57278      # We're on a unix platform. Hooray! :)
57279      path="$POTENTIAL_FREETYPE_LIB_PATH"
57280      has_space=`$ECHO "$path" | $GREP " "`
57281      if test "x$has_space" != x; then
57282        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57283$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57284        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57285      fi
57286
57287      # Use eval to expand a potential ~
57288      eval path="$path"
57289      if test ! -f "$path" && test ! -d "$path"; then
57290        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57291      fi
57292
57293      if test -d "$path"; then
57294        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57295      else
57296        dir="`$DIRNAME "$path"`"
57297        base="`$BASENAME "$path"`"
57298        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57299      fi
57300    fi
57301  fi
57302
57303
57304    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57305    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57306$as_echo_n "checking for freetype includes... " >&6; }
57307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57308$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57309    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57310    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57311$as_echo_n "checking for freetype libraries... " >&6; }
57312    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57313$as_echo "$FREETYPE_LIB_PATH" >&6; }
57314  fi
57315
57316          if test "x$FOUND_FREETYPE" != xyes; then
57317            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57318          fi
57319        else
57320          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57321$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57322          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57323        fi
57324      else
57325        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57326$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57327      fi
57328    fi
57329
57330    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57331      # User has specified settings
57332
57333      if test "x$BUNDLE_FREETYPE" = x; then
57334        # If not specified, default is to bundle freetype
57335        BUNDLE_FREETYPE=yes
57336      fi
57337
57338      if test "x$with_freetype" != x; then
57339        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57340        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57341      fi
57342
57343      # Allow --with-freetype-lib and --with-freetype-include to override
57344      if test "x$with_freetype_include" != x; then
57345        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57346      fi
57347      if test "x$with_freetype_lib" != x; then
57348        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57349      fi
57350
57351      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57352        # Okay, we got it. Check that it works.
57353
57354  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57355  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57356  METHOD="--with-freetype"
57357
57358  # Let's start with an optimistic view of the world :-)
57359  FOUND_FREETYPE=yes
57360
57361  # First look for the canonical freetype main include file ft2build.h.
57362  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57363    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57364    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57365    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57366      # Fail.
57367      FOUND_FREETYPE=no
57368    fi
57369  fi
57370
57371  if test "x$FOUND_FREETYPE" = xyes; then
57372    # Include file found, let's continue the sanity check.
57373    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57374$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57375
57376    # Reset to default value
57377    FREETYPE_BASE_NAME=freetype
57378    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57379    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57380      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57381          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57382        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57383        # for the .6 version explicitly.
57384        FREETYPE_BASE_NAME=freetype.6
57385        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57386        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57387$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57388      else
57389        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57390$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57391        FOUND_FREETYPE=no
57392      fi
57393    else
57394      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57395        # On Windows, we will need both .lib and .dll file.
57396        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57397          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57398$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57399          FOUND_FREETYPE=no
57400        fi
57401      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57402          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57403        # Found lib in isa dir, use that instead.
57404        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57405        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57406$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57407      fi
57408    fi
57409  fi
57410
57411  if test "x$FOUND_FREETYPE" = xyes; then
57412
57413  # Only process if variable expands to non-empty
57414
57415  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57416    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57417
57418  # Input might be given as Windows format, start by converting to
57419  # unix format.
57420  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57421  new_path=`$CYGPATH -u "$path"`
57422
57423  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57424  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57425  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57426  # "foo.exe" is OK but "foo" is an error.
57427  #
57428  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57429  # It is also a way to make sure we got the proper file name for the real test later on.
57430  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57431  if test "x$test_shortpath" = x; then
57432    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57433$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57434    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57435  fi
57436
57437  # Call helper function which possibly converts this using DOS-style short mode.
57438  # If so, the updated path is stored in $new_path.
57439
57440  input_path="$new_path"
57441  # Check if we need to convert this using DOS-style short mode. If the path
57442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57443  # take no chances and rewrite it.
57444  # Note: m4 eats our [], so we need to use [ and ] instead.
57445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57446  if test "x$has_forbidden_chars" != x; then
57447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57448    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57449    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57450    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57451      # Going to short mode and back again did indeed matter. Since short mode is
57452      # case insensitive, let's make it lowercase to improve readability.
57453      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57454      # Now convert it back to Unix-style (cygpath)
57455      input_path=`$CYGPATH -u "$shortmode_path"`
57456      new_path="$input_path"
57457    fi
57458  fi
57459
57460  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57461  if test "x$test_cygdrive_prefix" = x; then
57462    # As a simple fix, exclude /usr/bin since it's not a real path.
57463    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57464      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57465      # a path prefixed by /cygdrive for fixpath to work.
57466      new_path="$CYGWIN_ROOT_PATH$input_path"
57467    fi
57468  fi
57469
57470
57471  if test "x$path" != "x$new_path"; then
57472    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57474$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57475  fi
57476
57477    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57478
57479  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57480  has_colon=`$ECHO $path | $GREP ^.:`
57481  new_path="$path"
57482  if test "x$has_colon" = x; then
57483    # Not in mixed or Windows style, start by that.
57484    new_path=`cmd //c echo $path`
57485  fi
57486
57487
57488  input_path="$new_path"
57489  # Check if we need to convert this using DOS-style short mode. If the path
57490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57491  # take no chances and rewrite it.
57492  # Note: m4 eats our [], so we need to use [ and ] instead.
57493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57494  if test "x$has_forbidden_chars" != x; then
57495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57497  fi
57498
57499
57500  windows_path="$new_path"
57501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57502    unix_path=`$CYGPATH -u "$windows_path"`
57503    new_path="$unix_path"
57504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57506    new_path="$unix_path"
57507  fi
57508
57509  if test "x$path" != "x$new_path"; then
57510    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57512$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57513  fi
57514
57515  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57516  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57517
57518    else
57519      # We're on a unix platform. Hooray! :)
57520      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57521      has_space=`$ECHO "$path" | $GREP " "`
57522      if test "x$has_space" != x; then
57523        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57524$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57525        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57526      fi
57527
57528      # Use eval to expand a potential ~
57529      eval path="$path"
57530      if test ! -f "$path" && test ! -d "$path"; then
57531        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57532      fi
57533
57534      if test -d "$path"; then
57535        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57536      else
57537        dir="`$DIRNAME "$path"`"
57538        base="`$BASENAME "$path"`"
57539        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57540      fi
57541    fi
57542  fi
57543
57544
57545  # Only process if variable expands to non-empty
57546
57547  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57548    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57549
57550  # Input might be given as Windows format, start by converting to
57551  # unix format.
57552  path="$POTENTIAL_FREETYPE_LIB_PATH"
57553  new_path=`$CYGPATH -u "$path"`
57554
57555  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57556  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57557  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57558  # "foo.exe" is OK but "foo" is an error.
57559  #
57560  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57561  # It is also a way to make sure we got the proper file name for the real test later on.
57562  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57563  if test "x$test_shortpath" = x; then
57564    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57565$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57566    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57567  fi
57568
57569  # Call helper function which possibly converts this using DOS-style short mode.
57570  # If so, the updated path is stored in $new_path.
57571
57572  input_path="$new_path"
57573  # Check if we need to convert this using DOS-style short mode. If the path
57574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57575  # take no chances and rewrite it.
57576  # Note: m4 eats our [], so we need to use [ and ] instead.
57577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57578  if test "x$has_forbidden_chars" != x; then
57579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57583      # Going to short mode and back again did indeed matter. Since short mode is
57584      # case insensitive, let's make it lowercase to improve readability.
57585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57586      # Now convert it back to Unix-style (cygpath)
57587      input_path=`$CYGPATH -u "$shortmode_path"`
57588      new_path="$input_path"
57589    fi
57590  fi
57591
57592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57593  if test "x$test_cygdrive_prefix" = x; then
57594    # As a simple fix, exclude /usr/bin since it's not a real path.
57595    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57597      # a path prefixed by /cygdrive for fixpath to work.
57598      new_path="$CYGWIN_ROOT_PATH$input_path"
57599    fi
57600  fi
57601
57602
57603  if test "x$path" != "x$new_path"; then
57604    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57606$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57607  fi
57608
57609    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57610
57611  path="$POTENTIAL_FREETYPE_LIB_PATH"
57612  has_colon=`$ECHO $path | $GREP ^.:`
57613  new_path="$path"
57614  if test "x$has_colon" = x; then
57615    # Not in mixed or Windows style, start by that.
57616    new_path=`cmd //c echo $path`
57617  fi
57618
57619
57620  input_path="$new_path"
57621  # Check if we need to convert this using DOS-style short mode. If the path
57622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57623  # take no chances and rewrite it.
57624  # Note: m4 eats our [], so we need to use [ and ] instead.
57625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57626  if test "x$has_forbidden_chars" != x; then
57627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57628    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57629  fi
57630
57631
57632  windows_path="$new_path"
57633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57634    unix_path=`$CYGPATH -u "$windows_path"`
57635    new_path="$unix_path"
57636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57638    new_path="$unix_path"
57639  fi
57640
57641  if test "x$path" != "x$new_path"; then
57642    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57644$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57645  fi
57646
57647  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57648  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57649
57650    else
57651      # We're on a unix platform. Hooray! :)
57652      path="$POTENTIAL_FREETYPE_LIB_PATH"
57653      has_space=`$ECHO "$path" | $GREP " "`
57654      if test "x$has_space" != x; then
57655        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57656$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57657        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57658      fi
57659
57660      # Use eval to expand a potential ~
57661      eval path="$path"
57662      if test ! -f "$path" && test ! -d "$path"; then
57663        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57664      fi
57665
57666      if test -d "$path"; then
57667        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57668      else
57669        dir="`$DIRNAME "$path"`"
57670        base="`$BASENAME "$path"`"
57671        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57672      fi
57673    fi
57674  fi
57675
57676
57677    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57678    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57679$as_echo_n "checking for freetype includes... " >&6; }
57680    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57681$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57682    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57683    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57684$as_echo_n "checking for freetype libraries... " >&6; }
57685    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57686$as_echo "$FREETYPE_LIB_PATH" >&6; }
57687  fi
57688
57689        if test "x$FOUND_FREETYPE" != xyes; then
57690          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57691        fi
57692      else
57693        # User specified only one of lib or include. This is an error.
57694        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57695          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57696$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57697          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57698        else
57699          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57700$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57701          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57702        fi
57703      fi
57704    else
57705      # User did not specify settings, but we need freetype. Try to locate it.
57706
57707      if test "x$BUNDLE_FREETYPE" = x; then
57708        # If not specified, default is to bundle freetype only on windows
57709        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57710          BUNDLE_FREETYPE=yes
57711        else
57712          BUNDLE_FREETYPE=no
57713        fi
57714      fi
57715
57716      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57717      if test "x$SYSROOT" = x; then
57718        if test "x$FOUND_FREETYPE" != xyes; then
57719          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57720          if test "x$PKG_CONFIG" != x; then
57721
57722pkg_failed=no
57723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57724$as_echo_n "checking for FREETYPE... " >&6; }
57725
57726if test -n "$FREETYPE_CFLAGS"; then
57727    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57728 elif test -n "$PKG_CONFIG"; then
57729    if test -n "$PKG_CONFIG" && \
57730    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57731  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57732  ac_status=$?
57733  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57734  test $ac_status = 0; }; then
57735  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57736else
57737  pkg_failed=yes
57738fi
57739 else
57740    pkg_failed=untried
57741fi
57742if test -n "$FREETYPE_LIBS"; then
57743    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57744 elif test -n "$PKG_CONFIG"; then
57745    if test -n "$PKG_CONFIG" && \
57746    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57747  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57748  ac_status=$?
57749  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57750  test $ac_status = 0; }; then
57751  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57752else
57753  pkg_failed=yes
57754fi
57755 else
57756    pkg_failed=untried
57757fi
57758
57759
57760
57761if test $pkg_failed = yes; then
57762
57763if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57764        _pkg_short_errors_supported=yes
57765else
57766        _pkg_short_errors_supported=no
57767fi
57768        if test $_pkg_short_errors_supported = yes; then
57769	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57770        else
57771	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57772        fi
57773	# Put the nasty error message in config.log where it belongs
57774	echo "$FREETYPE_PKG_ERRORS" >&5
57775
57776	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57777$as_echo "no" >&6; }
57778                FOUND_FREETYPE=no
57779elif test $pkg_failed = untried; then
57780	FOUND_FREETYPE=no
57781else
57782	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57783	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57784        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57785$as_echo "yes" >&6; }
57786	FOUND_FREETYPE=yes
57787fi
57788            if test "x$FOUND_FREETYPE" = xyes; then
57789              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57790              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57791              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57792              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57793                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57794              fi
57795              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57796              if test "x$BUNDLE_FREETYPE" = xyes; then
57797                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57798$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57799                FOUND_FREETYPE=no
57800              else
57801                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57802$as_echo_n "checking for freetype... " >&6; }
57803                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57804$as_echo "yes (using pkg-config)" >&6; }
57805              fi
57806            fi
57807          fi
57808        fi
57809      fi
57810
57811      if test "x$FOUND_FREETYPE" != xyes; then
57812        # Check in well-known locations
57813        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57814          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57815
57816  windows_path="$FREETYPE_BASE_DIR"
57817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57818    unix_path=`$CYGPATH -u "$windows_path"`
57819    FREETYPE_BASE_DIR="$unix_path"
57820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57822    FREETYPE_BASE_DIR="$unix_path"
57823  fi
57824
57825
57826  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57827  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57828  METHOD="well-known location"
57829
57830  # Let's start with an optimistic view of the world :-)
57831  FOUND_FREETYPE=yes
57832
57833  # First look for the canonical freetype main include file ft2build.h.
57834  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57835    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57836    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57837    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57838      # Fail.
57839      FOUND_FREETYPE=no
57840    fi
57841  fi
57842
57843  if test "x$FOUND_FREETYPE" = xyes; then
57844    # Include file found, let's continue the sanity check.
57845    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57846$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57847
57848    # Reset to default value
57849    FREETYPE_BASE_NAME=freetype
57850    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57851    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57852      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57853          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57854        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57855        # for the .6 version explicitly.
57856        FREETYPE_BASE_NAME=freetype.6
57857        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57858        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57859$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57860      else
57861        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57862$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57863        FOUND_FREETYPE=no
57864      fi
57865    else
57866      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57867        # On Windows, we will need both .lib and .dll file.
57868        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57869          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57870$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57871          FOUND_FREETYPE=no
57872        fi
57873      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57874          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57875        # Found lib in isa dir, use that instead.
57876        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57877        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57878$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57879      fi
57880    fi
57881  fi
57882
57883  if test "x$FOUND_FREETYPE" = xyes; then
57884
57885  # Only process if variable expands to non-empty
57886
57887  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57888    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57889
57890  # Input might be given as Windows format, start by converting to
57891  # unix format.
57892  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57893  new_path=`$CYGPATH -u "$path"`
57894
57895  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57896  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57897  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57898  # "foo.exe" is OK but "foo" is an error.
57899  #
57900  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57901  # It is also a way to make sure we got the proper file name for the real test later on.
57902  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57903  if test "x$test_shortpath" = x; then
57904    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57905$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57906    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57907  fi
57908
57909  # Call helper function which possibly converts this using DOS-style short mode.
57910  # If so, the updated path is stored in $new_path.
57911
57912  input_path="$new_path"
57913  # Check if we need to convert this using DOS-style short mode. If the path
57914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57915  # take no chances and rewrite it.
57916  # Note: m4 eats our [], so we need to use [ and ] instead.
57917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57918  if test "x$has_forbidden_chars" != x; then
57919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57923      # Going to short mode and back again did indeed matter. Since short mode is
57924      # case insensitive, let's make it lowercase to improve readability.
57925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57926      # Now convert it back to Unix-style (cygpath)
57927      input_path=`$CYGPATH -u "$shortmode_path"`
57928      new_path="$input_path"
57929    fi
57930  fi
57931
57932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57933  if test "x$test_cygdrive_prefix" = x; then
57934    # As a simple fix, exclude /usr/bin since it's not a real path.
57935    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57937      # a path prefixed by /cygdrive for fixpath to work.
57938      new_path="$CYGWIN_ROOT_PATH$input_path"
57939    fi
57940  fi
57941
57942
57943  if test "x$path" != "x$new_path"; then
57944    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57946$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57947  fi
57948
57949    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57950
57951  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57952  has_colon=`$ECHO $path | $GREP ^.:`
57953  new_path="$path"
57954  if test "x$has_colon" = x; then
57955    # Not in mixed or Windows style, start by that.
57956    new_path=`cmd //c echo $path`
57957  fi
57958
57959
57960  input_path="$new_path"
57961  # Check if we need to convert this using DOS-style short mode. If the path
57962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57963  # take no chances and rewrite it.
57964  # Note: m4 eats our [], so we need to use [ and ] instead.
57965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57966  if test "x$has_forbidden_chars" != x; then
57967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57968    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57969  fi
57970
57971
57972  windows_path="$new_path"
57973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57974    unix_path=`$CYGPATH -u "$windows_path"`
57975    new_path="$unix_path"
57976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57978    new_path="$unix_path"
57979  fi
57980
57981  if test "x$path" != "x$new_path"; then
57982    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57984$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57985  fi
57986
57987  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57988  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57989
57990    else
57991      # We're on a unix platform. Hooray! :)
57992      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57993      has_space=`$ECHO "$path" | $GREP " "`
57994      if test "x$has_space" != x; then
57995        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57996$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57997        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57998      fi
57999
58000      # Use eval to expand a potential ~
58001      eval path="$path"
58002      if test ! -f "$path" && test ! -d "$path"; then
58003        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58004      fi
58005
58006      if test -d "$path"; then
58007        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58008      else
58009        dir="`$DIRNAME "$path"`"
58010        base="`$BASENAME "$path"`"
58011        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58012      fi
58013    fi
58014  fi
58015
58016
58017  # Only process if variable expands to non-empty
58018
58019  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58020    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58021
58022  # Input might be given as Windows format, start by converting to
58023  # unix format.
58024  path="$POTENTIAL_FREETYPE_LIB_PATH"
58025  new_path=`$CYGPATH -u "$path"`
58026
58027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58030  # "foo.exe" is OK but "foo" is an error.
58031  #
58032  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58033  # It is also a way to make sure we got the proper file name for the real test later on.
58034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58035  if test "x$test_shortpath" = x; then
58036    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58037$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58038    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58039  fi
58040
58041  # Call helper function which possibly converts this using DOS-style short mode.
58042  # If so, the updated path is stored in $new_path.
58043
58044  input_path="$new_path"
58045  # Check if we need to convert this using DOS-style short mode. If the path
58046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58047  # take no chances and rewrite it.
58048  # Note: m4 eats our [], so we need to use [ and ] instead.
58049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58050  if test "x$has_forbidden_chars" != x; then
58051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58055      # Going to short mode and back again did indeed matter. Since short mode is
58056      # case insensitive, let's make it lowercase to improve readability.
58057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58058      # Now convert it back to Unix-style (cygpath)
58059      input_path=`$CYGPATH -u "$shortmode_path"`
58060      new_path="$input_path"
58061    fi
58062  fi
58063
58064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58065  if test "x$test_cygdrive_prefix" = x; then
58066    # As a simple fix, exclude /usr/bin since it's not a real path.
58067    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58069      # a path prefixed by /cygdrive for fixpath to work.
58070      new_path="$CYGWIN_ROOT_PATH$input_path"
58071    fi
58072  fi
58073
58074
58075  if test "x$path" != "x$new_path"; then
58076    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58078$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58079  fi
58080
58081    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58082
58083  path="$POTENTIAL_FREETYPE_LIB_PATH"
58084  has_colon=`$ECHO $path | $GREP ^.:`
58085  new_path="$path"
58086  if test "x$has_colon" = x; then
58087    # Not in mixed or Windows style, start by that.
58088    new_path=`cmd //c echo $path`
58089  fi
58090
58091
58092  input_path="$new_path"
58093  # Check if we need to convert this using DOS-style short mode. If the path
58094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58095  # take no chances and rewrite it.
58096  # Note: m4 eats our [], so we need to use [ and ] instead.
58097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58098  if test "x$has_forbidden_chars" != x; then
58099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58101  fi
58102
58103
58104  windows_path="$new_path"
58105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58106    unix_path=`$CYGPATH -u "$windows_path"`
58107    new_path="$unix_path"
58108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58110    new_path="$unix_path"
58111  fi
58112
58113  if test "x$path" != "x$new_path"; then
58114    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58116$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58117  fi
58118
58119  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58120  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58121
58122    else
58123      # We're on a unix platform. Hooray! :)
58124      path="$POTENTIAL_FREETYPE_LIB_PATH"
58125      has_space=`$ECHO "$path" | $GREP " "`
58126      if test "x$has_space" != x; then
58127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58128$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58129        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58130      fi
58131
58132      # Use eval to expand a potential ~
58133      eval path="$path"
58134      if test ! -f "$path" && test ! -d "$path"; then
58135        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58136      fi
58137
58138      if test -d "$path"; then
58139        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58140      else
58141        dir="`$DIRNAME "$path"`"
58142        base="`$BASENAME "$path"`"
58143        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58144      fi
58145    fi
58146  fi
58147
58148
58149    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58150    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58151$as_echo_n "checking for freetype includes... " >&6; }
58152    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58153$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58154    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58155    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58156$as_echo_n "checking for freetype libraries... " >&6; }
58157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58158$as_echo "$FREETYPE_LIB_PATH" >&6; }
58159  fi
58160
58161          if test "x$FOUND_FREETYPE" != xyes; then
58162            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58163
58164  windows_path="$FREETYPE_BASE_DIR"
58165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58166    unix_path=`$CYGPATH -u "$windows_path"`
58167    FREETYPE_BASE_DIR="$unix_path"
58168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58170    FREETYPE_BASE_DIR="$unix_path"
58171  fi
58172
58173
58174  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58175  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58176  METHOD="well-known location"
58177
58178  # Let's start with an optimistic view of the world :-)
58179  FOUND_FREETYPE=yes
58180
58181  # First look for the canonical freetype main include file ft2build.h.
58182  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58183    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58184    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58185    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58186      # Fail.
58187      FOUND_FREETYPE=no
58188    fi
58189  fi
58190
58191  if test "x$FOUND_FREETYPE" = xyes; then
58192    # Include file found, let's continue the sanity check.
58193    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58194$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58195
58196    # Reset to default value
58197    FREETYPE_BASE_NAME=freetype
58198    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58199    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58200      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58201          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58202        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58203        # for the .6 version explicitly.
58204        FREETYPE_BASE_NAME=freetype.6
58205        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58206        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58207$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58208      else
58209        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58210$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58211        FOUND_FREETYPE=no
58212      fi
58213    else
58214      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58215        # On Windows, we will need both .lib and .dll file.
58216        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58217          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58218$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58219          FOUND_FREETYPE=no
58220        fi
58221      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58222          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58223        # Found lib in isa dir, use that instead.
58224        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58225        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58226$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58227      fi
58228    fi
58229  fi
58230
58231  if test "x$FOUND_FREETYPE" = xyes; then
58232
58233  # Only process if variable expands to non-empty
58234
58235  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58236    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58237
58238  # Input might be given as Windows format, start by converting to
58239  # unix format.
58240  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58241  new_path=`$CYGPATH -u "$path"`
58242
58243  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58244  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58245  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58246  # "foo.exe" is OK but "foo" is an error.
58247  #
58248  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58249  # It is also a way to make sure we got the proper file name for the real test later on.
58250  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58251  if test "x$test_shortpath" = x; then
58252    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58253$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58254    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58255  fi
58256
58257  # Call helper function which possibly converts this using DOS-style short mode.
58258  # If so, the updated path is stored in $new_path.
58259
58260  input_path="$new_path"
58261  # Check if we need to convert this using DOS-style short mode. If the path
58262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58263  # take no chances and rewrite it.
58264  # Note: m4 eats our [], so we need to use [ and ] instead.
58265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58266  if test "x$has_forbidden_chars" != x; then
58267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58268    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58269    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58270    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58271      # Going to short mode and back again did indeed matter. Since short mode is
58272      # case insensitive, let's make it lowercase to improve readability.
58273      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58274      # Now convert it back to Unix-style (cygpath)
58275      input_path=`$CYGPATH -u "$shortmode_path"`
58276      new_path="$input_path"
58277    fi
58278  fi
58279
58280  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58281  if test "x$test_cygdrive_prefix" = x; then
58282    # As a simple fix, exclude /usr/bin since it's not a real path.
58283    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58284      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58285      # a path prefixed by /cygdrive for fixpath to work.
58286      new_path="$CYGWIN_ROOT_PATH$input_path"
58287    fi
58288  fi
58289
58290
58291  if test "x$path" != "x$new_path"; then
58292    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58294$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58295  fi
58296
58297    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58298
58299  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58300  has_colon=`$ECHO $path | $GREP ^.:`
58301  new_path="$path"
58302  if test "x$has_colon" = x; then
58303    # Not in mixed or Windows style, start by that.
58304    new_path=`cmd //c echo $path`
58305  fi
58306
58307
58308  input_path="$new_path"
58309  # Check if we need to convert this using DOS-style short mode. If the path
58310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58311  # take no chances and rewrite it.
58312  # Note: m4 eats our [], so we need to use [ and ] instead.
58313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58314  if test "x$has_forbidden_chars" != x; then
58315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58317  fi
58318
58319
58320  windows_path="$new_path"
58321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58322    unix_path=`$CYGPATH -u "$windows_path"`
58323    new_path="$unix_path"
58324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58326    new_path="$unix_path"
58327  fi
58328
58329  if test "x$path" != "x$new_path"; then
58330    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58332$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58333  fi
58334
58335  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58336  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58337
58338    else
58339      # We're on a unix platform. Hooray! :)
58340      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58341      has_space=`$ECHO "$path" | $GREP " "`
58342      if test "x$has_space" != x; then
58343        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58344$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58345        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58346      fi
58347
58348      # Use eval to expand a potential ~
58349      eval path="$path"
58350      if test ! -f "$path" && test ! -d "$path"; then
58351        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58352      fi
58353
58354      if test -d "$path"; then
58355        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58356      else
58357        dir="`$DIRNAME "$path"`"
58358        base="`$BASENAME "$path"`"
58359        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58360      fi
58361    fi
58362  fi
58363
58364
58365  # Only process if variable expands to non-empty
58366
58367  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58368    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58369
58370  # Input might be given as Windows format, start by converting to
58371  # unix format.
58372  path="$POTENTIAL_FREETYPE_LIB_PATH"
58373  new_path=`$CYGPATH -u "$path"`
58374
58375  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58376  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58377  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58378  # "foo.exe" is OK but "foo" is an error.
58379  #
58380  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58381  # It is also a way to make sure we got the proper file name for the real test later on.
58382  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58383  if test "x$test_shortpath" = x; then
58384    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58385$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58386    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58387  fi
58388
58389  # Call helper function which possibly converts this using DOS-style short mode.
58390  # If so, the updated path is stored in $new_path.
58391
58392  input_path="$new_path"
58393  # Check if we need to convert this using DOS-style short mode. If the path
58394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58395  # take no chances and rewrite it.
58396  # Note: m4 eats our [], so we need to use [ and ] instead.
58397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58398  if test "x$has_forbidden_chars" != x; then
58399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58400    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58401    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58402    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58403      # Going to short mode and back again did indeed matter. Since short mode is
58404      # case insensitive, let's make it lowercase to improve readability.
58405      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58406      # Now convert it back to Unix-style (cygpath)
58407      input_path=`$CYGPATH -u "$shortmode_path"`
58408      new_path="$input_path"
58409    fi
58410  fi
58411
58412  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58413  if test "x$test_cygdrive_prefix" = x; then
58414    # As a simple fix, exclude /usr/bin since it's not a real path.
58415    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58416      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58417      # a path prefixed by /cygdrive for fixpath to work.
58418      new_path="$CYGWIN_ROOT_PATH$input_path"
58419    fi
58420  fi
58421
58422
58423  if test "x$path" != "x$new_path"; then
58424    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58426$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58427  fi
58428
58429    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58430
58431  path="$POTENTIAL_FREETYPE_LIB_PATH"
58432  has_colon=`$ECHO $path | $GREP ^.:`
58433  new_path="$path"
58434  if test "x$has_colon" = x; then
58435    # Not in mixed or Windows style, start by that.
58436    new_path=`cmd //c echo $path`
58437  fi
58438
58439
58440  input_path="$new_path"
58441  # Check if we need to convert this using DOS-style short mode. If the path
58442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58443  # take no chances and rewrite it.
58444  # Note: m4 eats our [], so we need to use [ and ] instead.
58445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58446  if test "x$has_forbidden_chars" != x; then
58447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58449  fi
58450
58451
58452  windows_path="$new_path"
58453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58454    unix_path=`$CYGPATH -u "$windows_path"`
58455    new_path="$unix_path"
58456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58458    new_path="$unix_path"
58459  fi
58460
58461  if test "x$path" != "x$new_path"; then
58462    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58464$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58465  fi
58466
58467  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58468  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58469
58470    else
58471      # We're on a unix platform. Hooray! :)
58472      path="$POTENTIAL_FREETYPE_LIB_PATH"
58473      has_space=`$ECHO "$path" | $GREP " "`
58474      if test "x$has_space" != x; then
58475        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58476$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58477        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58478      fi
58479
58480      # Use eval to expand a potential ~
58481      eval path="$path"
58482      if test ! -f "$path" && test ! -d "$path"; then
58483        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58484      fi
58485
58486      if test -d "$path"; then
58487        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58488      else
58489        dir="`$DIRNAME "$path"`"
58490        base="`$BASENAME "$path"`"
58491        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58492      fi
58493    fi
58494  fi
58495
58496
58497    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58498    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58499$as_echo_n "checking for freetype includes... " >&6; }
58500    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58501$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58502    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58503    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58504$as_echo_n "checking for freetype libraries... " >&6; }
58505    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58506$as_echo "$FREETYPE_LIB_PATH" >&6; }
58507  fi
58508
58509          fi
58510          if test "x$FOUND_FREETYPE" != xyes; then
58511            FREETYPE_BASE_DIR="$HOME/freetype"
58512
58513  windows_path="$FREETYPE_BASE_DIR"
58514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58515    unix_path=`$CYGPATH -u "$windows_path"`
58516    FREETYPE_BASE_DIR="$unix_path"
58517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58519    FREETYPE_BASE_DIR="$unix_path"
58520  fi
58521
58522            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58523
58524  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58525  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58526  METHOD="well-known location"
58527
58528  # Let's start with an optimistic view of the world :-)
58529  FOUND_FREETYPE=yes
58530
58531  # First look for the canonical freetype main include file ft2build.h.
58532  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58533    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58534    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58535    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58536      # Fail.
58537      FOUND_FREETYPE=no
58538    fi
58539  fi
58540
58541  if test "x$FOUND_FREETYPE" = xyes; then
58542    # Include file found, let's continue the sanity check.
58543    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58544$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58545
58546    # Reset to default value
58547    FREETYPE_BASE_NAME=freetype
58548    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58549    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58550      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58551          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58552        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58553        # for the .6 version explicitly.
58554        FREETYPE_BASE_NAME=freetype.6
58555        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58556        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58557$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58558      else
58559        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58560$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58561        FOUND_FREETYPE=no
58562      fi
58563    else
58564      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58565        # On Windows, we will need both .lib and .dll file.
58566        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58567          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58568$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58569          FOUND_FREETYPE=no
58570        fi
58571      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58572          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58573        # Found lib in isa dir, use that instead.
58574        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58575        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58576$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58577      fi
58578    fi
58579  fi
58580
58581  if test "x$FOUND_FREETYPE" = xyes; then
58582
58583  # Only process if variable expands to non-empty
58584
58585  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58586    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58587
58588  # Input might be given as Windows format, start by converting to
58589  # unix format.
58590  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58591  new_path=`$CYGPATH -u "$path"`
58592
58593  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58594  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58595  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58596  # "foo.exe" is OK but "foo" is an error.
58597  #
58598  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58599  # It is also a way to make sure we got the proper file name for the real test later on.
58600  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58601  if test "x$test_shortpath" = x; then
58602    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58603$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58604    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58605  fi
58606
58607  # Call helper function which possibly converts this using DOS-style short mode.
58608  # If so, the updated path is stored in $new_path.
58609
58610  input_path="$new_path"
58611  # Check if we need to convert this using DOS-style short mode. If the path
58612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58613  # take no chances and rewrite it.
58614  # Note: m4 eats our [], so we need to use [ and ] instead.
58615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58616  if test "x$has_forbidden_chars" != x; then
58617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58618    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58619    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58620    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58621      # Going to short mode and back again did indeed matter. Since short mode is
58622      # case insensitive, let's make it lowercase to improve readability.
58623      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58624      # Now convert it back to Unix-style (cygpath)
58625      input_path=`$CYGPATH -u "$shortmode_path"`
58626      new_path="$input_path"
58627    fi
58628  fi
58629
58630  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58631  if test "x$test_cygdrive_prefix" = x; then
58632    # As a simple fix, exclude /usr/bin since it's not a real path.
58633    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58634      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58635      # a path prefixed by /cygdrive for fixpath to work.
58636      new_path="$CYGWIN_ROOT_PATH$input_path"
58637    fi
58638  fi
58639
58640
58641  if test "x$path" != "x$new_path"; then
58642    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58644$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58645  fi
58646
58647    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58648
58649  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58650  has_colon=`$ECHO $path | $GREP ^.:`
58651  new_path="$path"
58652  if test "x$has_colon" = x; then
58653    # Not in mixed or Windows style, start by that.
58654    new_path=`cmd //c echo $path`
58655  fi
58656
58657
58658  input_path="$new_path"
58659  # Check if we need to convert this using DOS-style short mode. If the path
58660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58661  # take no chances and rewrite it.
58662  # Note: m4 eats our [], so we need to use [ and ] instead.
58663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58664  if test "x$has_forbidden_chars" != x; then
58665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58666    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58667  fi
58668
58669
58670  windows_path="$new_path"
58671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58672    unix_path=`$CYGPATH -u "$windows_path"`
58673    new_path="$unix_path"
58674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58676    new_path="$unix_path"
58677  fi
58678
58679  if test "x$path" != "x$new_path"; then
58680    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58682$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58683  fi
58684
58685  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58686  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58687
58688    else
58689      # We're on a unix platform. Hooray! :)
58690      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58691      has_space=`$ECHO "$path" | $GREP " "`
58692      if test "x$has_space" != x; then
58693        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58694$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58695        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58696      fi
58697
58698      # Use eval to expand a potential ~
58699      eval path="$path"
58700      if test ! -f "$path" && test ! -d "$path"; then
58701        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58702      fi
58703
58704      if test -d "$path"; then
58705        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58706      else
58707        dir="`$DIRNAME "$path"`"
58708        base="`$BASENAME "$path"`"
58709        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58710      fi
58711    fi
58712  fi
58713
58714
58715  # Only process if variable expands to non-empty
58716
58717  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58718    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58719
58720  # Input might be given as Windows format, start by converting to
58721  # unix format.
58722  path="$POTENTIAL_FREETYPE_LIB_PATH"
58723  new_path=`$CYGPATH -u "$path"`
58724
58725  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58726  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58727  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58728  # "foo.exe" is OK but "foo" is an error.
58729  #
58730  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58731  # It is also a way to make sure we got the proper file name for the real test later on.
58732  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58733  if test "x$test_shortpath" = x; then
58734    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58735$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58736    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58737  fi
58738
58739  # Call helper function which possibly converts this using DOS-style short mode.
58740  # If so, the updated path is stored in $new_path.
58741
58742  input_path="$new_path"
58743  # Check if we need to convert this using DOS-style short mode. If the path
58744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58745  # take no chances and rewrite it.
58746  # Note: m4 eats our [], so we need to use [ and ] instead.
58747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58748  if test "x$has_forbidden_chars" != x; then
58749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58750    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58751    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58752    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58753      # Going to short mode and back again did indeed matter. Since short mode is
58754      # case insensitive, let's make it lowercase to improve readability.
58755      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58756      # Now convert it back to Unix-style (cygpath)
58757      input_path=`$CYGPATH -u "$shortmode_path"`
58758      new_path="$input_path"
58759    fi
58760  fi
58761
58762  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58763  if test "x$test_cygdrive_prefix" = x; then
58764    # As a simple fix, exclude /usr/bin since it's not a real path.
58765    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58766      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58767      # a path prefixed by /cygdrive for fixpath to work.
58768      new_path="$CYGWIN_ROOT_PATH$input_path"
58769    fi
58770  fi
58771
58772
58773  if test "x$path" != "x$new_path"; then
58774    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58775    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58776$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58777  fi
58778
58779    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58780
58781  path="$POTENTIAL_FREETYPE_LIB_PATH"
58782  has_colon=`$ECHO $path | $GREP ^.:`
58783  new_path="$path"
58784  if test "x$has_colon" = x; then
58785    # Not in mixed or Windows style, start by that.
58786    new_path=`cmd //c echo $path`
58787  fi
58788
58789
58790  input_path="$new_path"
58791  # Check if we need to convert this using DOS-style short mode. If the path
58792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58793  # take no chances and rewrite it.
58794  # Note: m4 eats our [], so we need to use [ and ] instead.
58795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58796  if test "x$has_forbidden_chars" != x; then
58797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58798    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58799  fi
58800
58801
58802  windows_path="$new_path"
58803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58804    unix_path=`$CYGPATH -u "$windows_path"`
58805    new_path="$unix_path"
58806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58808    new_path="$unix_path"
58809  fi
58810
58811  if test "x$path" != "x$new_path"; then
58812    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58813    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58814$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58815  fi
58816
58817  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58818  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58819
58820    else
58821      # We're on a unix platform. Hooray! :)
58822      path="$POTENTIAL_FREETYPE_LIB_PATH"
58823      has_space=`$ECHO "$path" | $GREP " "`
58824      if test "x$has_space" != x; then
58825        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58826$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58827        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58828      fi
58829
58830      # Use eval to expand a potential ~
58831      eval path="$path"
58832      if test ! -f "$path" && test ! -d "$path"; then
58833        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58834      fi
58835
58836      if test -d "$path"; then
58837        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58838      else
58839        dir="`$DIRNAME "$path"`"
58840        base="`$BASENAME "$path"`"
58841        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58842      fi
58843    fi
58844  fi
58845
58846
58847    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58848    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58849$as_echo_n "checking for freetype includes... " >&6; }
58850    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58851$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58852    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58853    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58854$as_echo_n "checking for freetype libraries... " >&6; }
58855    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58856$as_echo "$FREETYPE_LIB_PATH" >&6; }
58857  fi
58858
58859            else
58860
58861  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58862  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58863  METHOD="well-known location"
58864
58865  # Let's start with an optimistic view of the world :-)
58866  FOUND_FREETYPE=yes
58867
58868  # First look for the canonical freetype main include file ft2build.h.
58869  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58870    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58871    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58872    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58873      # Fail.
58874      FOUND_FREETYPE=no
58875    fi
58876  fi
58877
58878  if test "x$FOUND_FREETYPE" = xyes; then
58879    # Include file found, let's continue the sanity check.
58880    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58881$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58882
58883    # Reset to default value
58884    FREETYPE_BASE_NAME=freetype
58885    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58886    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58887      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58888          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58889        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58890        # for the .6 version explicitly.
58891        FREETYPE_BASE_NAME=freetype.6
58892        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58893        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58894$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58895      else
58896        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58897$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58898        FOUND_FREETYPE=no
58899      fi
58900    else
58901      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58902        # On Windows, we will need both .lib and .dll file.
58903        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58904          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58905$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58906          FOUND_FREETYPE=no
58907        fi
58908      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58909          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58910        # Found lib in isa dir, use that instead.
58911        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58912        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58913$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58914      fi
58915    fi
58916  fi
58917
58918  if test "x$FOUND_FREETYPE" = xyes; then
58919
58920  # Only process if variable expands to non-empty
58921
58922  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58923    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58924
58925  # Input might be given as Windows format, start by converting to
58926  # unix format.
58927  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58928  new_path=`$CYGPATH -u "$path"`
58929
58930  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58931  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58932  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58933  # "foo.exe" is OK but "foo" is an error.
58934  #
58935  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58936  # It is also a way to make sure we got the proper file name for the real test later on.
58937  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58938  if test "x$test_shortpath" = x; then
58939    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58940$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58941    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58942  fi
58943
58944  # Call helper function which possibly converts this using DOS-style short mode.
58945  # If so, the updated path is stored in $new_path.
58946
58947  input_path="$new_path"
58948  # Check if we need to convert this using DOS-style short mode. If the path
58949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58950  # take no chances and rewrite it.
58951  # Note: m4 eats our [], so we need to use [ and ] instead.
58952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58953  if test "x$has_forbidden_chars" != x; then
58954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58958      # Going to short mode and back again did indeed matter. Since short mode is
58959      # case insensitive, let's make it lowercase to improve readability.
58960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58961      # Now convert it back to Unix-style (cygpath)
58962      input_path=`$CYGPATH -u "$shortmode_path"`
58963      new_path="$input_path"
58964    fi
58965  fi
58966
58967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58968  if test "x$test_cygdrive_prefix" = x; then
58969    # As a simple fix, exclude /usr/bin since it's not a real path.
58970    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58972      # a path prefixed by /cygdrive for fixpath to work.
58973      new_path="$CYGWIN_ROOT_PATH$input_path"
58974    fi
58975  fi
58976
58977
58978  if test "x$path" != "x$new_path"; then
58979    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58981$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58982  fi
58983
58984    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58985
58986  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58987  has_colon=`$ECHO $path | $GREP ^.:`
58988  new_path="$path"
58989  if test "x$has_colon" = x; then
58990    # Not in mixed or Windows style, start by that.
58991    new_path=`cmd //c echo $path`
58992  fi
58993
58994
58995  input_path="$new_path"
58996  # Check if we need to convert this using DOS-style short mode. If the path
58997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58998  # take no chances and rewrite it.
58999  # Note: m4 eats our [], so we need to use [ and ] instead.
59000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59001  if test "x$has_forbidden_chars" != x; then
59002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59004  fi
59005
59006
59007  windows_path="$new_path"
59008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59009    unix_path=`$CYGPATH -u "$windows_path"`
59010    new_path="$unix_path"
59011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59013    new_path="$unix_path"
59014  fi
59015
59016  if test "x$path" != "x$new_path"; then
59017    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59018    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59019$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59020  fi
59021
59022  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59023  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59024
59025    else
59026      # We're on a unix platform. Hooray! :)
59027      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59028      has_space=`$ECHO "$path" | $GREP " "`
59029      if test "x$has_space" != x; then
59030        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59031$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59032        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59033      fi
59034
59035      # Use eval to expand a potential ~
59036      eval path="$path"
59037      if test ! -f "$path" && test ! -d "$path"; then
59038        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59039      fi
59040
59041      if test -d "$path"; then
59042        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59043      else
59044        dir="`$DIRNAME "$path"`"
59045        base="`$BASENAME "$path"`"
59046        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59047      fi
59048    fi
59049  fi
59050
59051
59052  # Only process if variable expands to non-empty
59053
59054  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59055    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59056
59057  # Input might be given as Windows format, start by converting to
59058  # unix format.
59059  path="$POTENTIAL_FREETYPE_LIB_PATH"
59060  new_path=`$CYGPATH -u "$path"`
59061
59062  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59063  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59064  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59065  # "foo.exe" is OK but "foo" is an error.
59066  #
59067  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59068  # It is also a way to make sure we got the proper file name for the real test later on.
59069  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59070  if test "x$test_shortpath" = x; then
59071    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59072$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59073    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59074  fi
59075
59076  # Call helper function which possibly converts this using DOS-style short mode.
59077  # If so, the updated path is stored in $new_path.
59078
59079  input_path="$new_path"
59080  # Check if we need to convert this using DOS-style short mode. If the path
59081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59082  # take no chances and rewrite it.
59083  # Note: m4 eats our [], so we need to use [ and ] instead.
59084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59085  if test "x$has_forbidden_chars" != x; then
59086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59090      # Going to short mode and back again did indeed matter. Since short mode is
59091      # case insensitive, let's make it lowercase to improve readability.
59092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59093      # Now convert it back to Unix-style (cygpath)
59094      input_path=`$CYGPATH -u "$shortmode_path"`
59095      new_path="$input_path"
59096    fi
59097  fi
59098
59099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59100  if test "x$test_cygdrive_prefix" = x; then
59101    # As a simple fix, exclude /usr/bin since it's not a real path.
59102    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59104      # a path prefixed by /cygdrive for fixpath to work.
59105      new_path="$CYGWIN_ROOT_PATH$input_path"
59106    fi
59107  fi
59108
59109
59110  if test "x$path" != "x$new_path"; then
59111    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59113$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59114  fi
59115
59116    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59117
59118  path="$POTENTIAL_FREETYPE_LIB_PATH"
59119  has_colon=`$ECHO $path | $GREP ^.:`
59120  new_path="$path"
59121  if test "x$has_colon" = x; then
59122    # Not in mixed or Windows style, start by that.
59123    new_path=`cmd //c echo $path`
59124  fi
59125
59126
59127  input_path="$new_path"
59128  # Check if we need to convert this using DOS-style short mode. If the path
59129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59130  # take no chances and rewrite it.
59131  # Note: m4 eats our [], so we need to use [ and ] instead.
59132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59133  if test "x$has_forbidden_chars" != x; then
59134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59135    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59136  fi
59137
59138
59139  windows_path="$new_path"
59140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59141    unix_path=`$CYGPATH -u "$windows_path"`
59142    new_path="$unix_path"
59143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59145    new_path="$unix_path"
59146  fi
59147
59148  if test "x$path" != "x$new_path"; then
59149    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59151$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59152  fi
59153
59154  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59155  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59156
59157    else
59158      # We're on a unix platform. Hooray! :)
59159      path="$POTENTIAL_FREETYPE_LIB_PATH"
59160      has_space=`$ECHO "$path" | $GREP " "`
59161      if test "x$has_space" != x; then
59162        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59163$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59164        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59165      fi
59166
59167      # Use eval to expand a potential ~
59168      eval path="$path"
59169      if test ! -f "$path" && test ! -d "$path"; then
59170        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59171      fi
59172
59173      if test -d "$path"; then
59174        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59175      else
59176        dir="`$DIRNAME "$path"`"
59177        base="`$BASENAME "$path"`"
59178        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59179      fi
59180    fi
59181  fi
59182
59183
59184    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59185    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59186$as_echo_n "checking for freetype includes... " >&6; }
59187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59188$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59189    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59191$as_echo_n "checking for freetype libraries... " >&6; }
59192    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59193$as_echo "$FREETYPE_LIB_PATH" >&6; }
59194  fi
59195
59196            fi
59197            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59198                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59199              # Source is available, as a last resort try to build freetype in default location
59200
59201  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59202  BUILD_FREETYPE=yes
59203
59204  # Check if the freetype sources are acessible..
59205  if ! test -d $FREETYPE_SRC_PATH; then
59206    { $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
59207$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59208    BUILD_FREETYPE=no
59209  fi
59210  # ..and contain a vc2010 project file
59211  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59212  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59213    { $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
59214$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59215    BUILD_FREETYPE=no
59216  fi
59217  # Now check if configure found a version of 'msbuild.exe'
59218  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59219    { $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
59220$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;}
59221    BUILD_FREETYPE=no
59222  fi
59223
59224  # Ready to go..
59225  if test "x$BUILD_FREETYPE" = xyes; then
59226    # msbuild requires trailing slashes for output directories
59227    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59228    freetype_lib_path_unix="$freetype_lib_path"
59229    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59230
59231  unix_path="$vcxproj_path"
59232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59233    windows_path=`$CYGPATH -m "$unix_path"`
59234    vcxproj_path="$windows_path"
59235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59236    windows_path=`cmd //c echo $unix_path`
59237    vcxproj_path="$windows_path"
59238  fi
59239
59240
59241  unix_path="$freetype_lib_path"
59242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59243    windows_path=`$CYGPATH -m "$unix_path"`
59244    freetype_lib_path="$windows_path"
59245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59246    windows_path=`cmd //c echo $unix_path`
59247    freetype_lib_path="$windows_path"
59248  fi
59249
59250
59251  unix_path="$freetype_obj_path"
59252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59253    windows_path=`$CYGPATH -m "$unix_path"`
59254    freetype_obj_path="$windows_path"
59255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59256    windows_path=`cmd //c echo $unix_path`
59257    freetype_obj_path="$windows_path"
59258  fi
59259
59260    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59261      freetype_platform=x64
59262    else
59263      freetype_platform=win32
59264    fi
59265
59266    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59267    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59268    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59269    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59270    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59271$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59272
59273    # First we try to build the freetype.dll
59274    $ECHO -e "@echo off\n"\
59275        "$MSBUILD $vcxproj_path "\
59276        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59277        "/p:Configuration=\"Release Multithreaded\" "\
59278        "/p:Platform=$freetype_platform "\
59279        "/p:ConfigurationType=DynamicLibrary "\
59280        "/p:TargetName=freetype "\
59281        "/p:OutDir=\"$freetype_lib_path\" "\
59282        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59283    cmd /c freetype.bat
59284
59285    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59286      # If that succeeds we also build freetype.lib
59287      $ECHO -e "@echo off\n"\
59288          "$MSBUILD $vcxproj_path "\
59289          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59290          "/p:Configuration=\"Release Multithreaded\" "\
59291          "/p:Platform=$freetype_platform "\
59292          "/p:ConfigurationType=StaticLibrary "\
59293          "/p:TargetName=freetype "\
59294          "/p:OutDir=\"$freetype_lib_path\" "\
59295          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59296      cmd /c freetype.bat
59297
59298      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59299        # Once we build both, lib and dll, set freetype lib and include path appropriately
59300        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59301        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59302        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59303$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59304      else
59305        BUILD_FREETYPE=no
59306      fi
59307    else
59308      BUILD_FREETYPE=no
59309    fi
59310  fi
59311
59312              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59313
59314  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59315  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59316  METHOD="well-known location"
59317
59318  # Let's start with an optimistic view of the world :-)
59319  FOUND_FREETYPE=yes
59320
59321  # First look for the canonical freetype main include file ft2build.h.
59322  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59323    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59324    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59325    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59326      # Fail.
59327      FOUND_FREETYPE=no
59328    fi
59329  fi
59330
59331  if test "x$FOUND_FREETYPE" = xyes; then
59332    # Include file found, let's continue the sanity check.
59333    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59334$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59335
59336    # Reset to default value
59337    FREETYPE_BASE_NAME=freetype
59338    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59339    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59340      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59341          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59342        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59343        # for the .6 version explicitly.
59344        FREETYPE_BASE_NAME=freetype.6
59345        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59346        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59347$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59348      else
59349        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59350$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59351        FOUND_FREETYPE=no
59352      fi
59353    else
59354      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59355        # On Windows, we will need both .lib and .dll file.
59356        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59357          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59358$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59359          FOUND_FREETYPE=no
59360        fi
59361      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59362          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59363        # Found lib in isa dir, use that instead.
59364        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59365        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59366$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59367      fi
59368    fi
59369  fi
59370
59371  if test "x$FOUND_FREETYPE" = xyes; then
59372
59373  # Only process if variable expands to non-empty
59374
59375  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59376    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59377
59378  # Input might be given as Windows format, start by converting to
59379  # unix format.
59380  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59381  new_path=`$CYGPATH -u "$path"`
59382
59383  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59384  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59385  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59386  # "foo.exe" is OK but "foo" is an error.
59387  #
59388  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59389  # It is also a way to make sure we got the proper file name for the real test later on.
59390  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59391  if test "x$test_shortpath" = x; then
59392    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59393$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59394    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59395  fi
59396
59397  # Call helper function which possibly converts this using DOS-style short mode.
59398  # If so, the updated path is stored in $new_path.
59399
59400  input_path="$new_path"
59401  # Check if we need to convert this using DOS-style short mode. If the path
59402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59403  # take no chances and rewrite it.
59404  # Note: m4 eats our [], so we need to use [ and ] instead.
59405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59406  if test "x$has_forbidden_chars" != x; then
59407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59408    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59409    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59410    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59411      # Going to short mode and back again did indeed matter. Since short mode is
59412      # case insensitive, let's make it lowercase to improve readability.
59413      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59414      # Now convert it back to Unix-style (cygpath)
59415      input_path=`$CYGPATH -u "$shortmode_path"`
59416      new_path="$input_path"
59417    fi
59418  fi
59419
59420  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59421  if test "x$test_cygdrive_prefix" = x; then
59422    # As a simple fix, exclude /usr/bin since it's not a real path.
59423    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59424      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59425      # a path prefixed by /cygdrive for fixpath to work.
59426      new_path="$CYGWIN_ROOT_PATH$input_path"
59427    fi
59428  fi
59429
59430
59431  if test "x$path" != "x$new_path"; then
59432    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59434$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59435  fi
59436
59437    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59438
59439  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59440  has_colon=`$ECHO $path | $GREP ^.:`
59441  new_path="$path"
59442  if test "x$has_colon" = x; then
59443    # Not in mixed or Windows style, start by that.
59444    new_path=`cmd //c echo $path`
59445  fi
59446
59447
59448  input_path="$new_path"
59449  # Check if we need to convert this using DOS-style short mode. If the path
59450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59451  # take no chances and rewrite it.
59452  # Note: m4 eats our [], so we need to use [ and ] instead.
59453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59454  if test "x$has_forbidden_chars" != x; then
59455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59457  fi
59458
59459
59460  windows_path="$new_path"
59461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59462    unix_path=`$CYGPATH -u "$windows_path"`
59463    new_path="$unix_path"
59464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59466    new_path="$unix_path"
59467  fi
59468
59469  if test "x$path" != "x$new_path"; then
59470    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59472$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59473  fi
59474
59475  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59476  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59477
59478    else
59479      # We're on a unix platform. Hooray! :)
59480      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59481      has_space=`$ECHO "$path" | $GREP " "`
59482      if test "x$has_space" != x; then
59483        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59484$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59485        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59486      fi
59487
59488      # Use eval to expand a potential ~
59489      eval path="$path"
59490      if test ! -f "$path" && test ! -d "$path"; then
59491        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59492      fi
59493
59494      if test -d "$path"; then
59495        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59496      else
59497        dir="`$DIRNAME "$path"`"
59498        base="`$BASENAME "$path"`"
59499        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59500      fi
59501    fi
59502  fi
59503
59504
59505  # Only process if variable expands to non-empty
59506
59507  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59508    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59509
59510  # Input might be given as Windows format, start by converting to
59511  # unix format.
59512  path="$POTENTIAL_FREETYPE_LIB_PATH"
59513  new_path=`$CYGPATH -u "$path"`
59514
59515  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59516  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59517  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59518  # "foo.exe" is OK but "foo" is an error.
59519  #
59520  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59521  # It is also a way to make sure we got the proper file name for the real test later on.
59522  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59523  if test "x$test_shortpath" = x; then
59524    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59525$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59526    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59527  fi
59528
59529  # Call helper function which possibly converts this using DOS-style short mode.
59530  # If so, the updated path is stored in $new_path.
59531
59532  input_path="$new_path"
59533  # Check if we need to convert this using DOS-style short mode. If the path
59534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59535  # take no chances and rewrite it.
59536  # Note: m4 eats our [], so we need to use [ and ] instead.
59537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59538  if test "x$has_forbidden_chars" != x; then
59539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59540    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59541    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59542    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59543      # Going to short mode and back again did indeed matter. Since short mode is
59544      # case insensitive, let's make it lowercase to improve readability.
59545      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59546      # Now convert it back to Unix-style (cygpath)
59547      input_path=`$CYGPATH -u "$shortmode_path"`
59548      new_path="$input_path"
59549    fi
59550  fi
59551
59552  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59553  if test "x$test_cygdrive_prefix" = x; then
59554    # As a simple fix, exclude /usr/bin since it's not a real path.
59555    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59556      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59557      # a path prefixed by /cygdrive for fixpath to work.
59558      new_path="$CYGWIN_ROOT_PATH$input_path"
59559    fi
59560  fi
59561
59562
59563  if test "x$path" != "x$new_path"; then
59564    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59566$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59567  fi
59568
59569    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59570
59571  path="$POTENTIAL_FREETYPE_LIB_PATH"
59572  has_colon=`$ECHO $path | $GREP ^.:`
59573  new_path="$path"
59574  if test "x$has_colon" = x; then
59575    # Not in mixed or Windows style, start by that.
59576    new_path=`cmd //c echo $path`
59577  fi
59578
59579
59580  input_path="$new_path"
59581  # Check if we need to convert this using DOS-style short mode. If the path
59582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59583  # take no chances and rewrite it.
59584  # Note: m4 eats our [], so we need to use [ and ] instead.
59585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59586  if test "x$has_forbidden_chars" != x; then
59587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59588    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59589  fi
59590
59591
59592  windows_path="$new_path"
59593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59594    unix_path=`$CYGPATH -u "$windows_path"`
59595    new_path="$unix_path"
59596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59598    new_path="$unix_path"
59599  fi
59600
59601  if test "x$path" != "x$new_path"; then
59602    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59604$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59605  fi
59606
59607  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59608  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59609
59610    else
59611      # We're on a unix platform. Hooray! :)
59612      path="$POTENTIAL_FREETYPE_LIB_PATH"
59613      has_space=`$ECHO "$path" | $GREP " "`
59614      if test "x$has_space" != x; then
59615        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59616$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59617        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59618      fi
59619
59620      # Use eval to expand a potential ~
59621      eval path="$path"
59622      if test ! -f "$path" && test ! -d "$path"; then
59623        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59624      fi
59625
59626      if test -d "$path"; then
59627        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59628      else
59629        dir="`$DIRNAME "$path"`"
59630        base="`$BASENAME "$path"`"
59631        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59632      fi
59633    fi
59634  fi
59635
59636
59637    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59638    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59639$as_echo_n "checking for freetype includes... " >&6; }
59640    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59641$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59642    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59643    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59644$as_echo_n "checking for freetype libraries... " >&6; }
59645    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59646$as_echo "$FREETYPE_LIB_PATH" >&6; }
59647  fi
59648
59649              else
59650
59651  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59652  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59653  METHOD="well-known location"
59654
59655  # Let's start with an optimistic view of the world :-)
59656  FOUND_FREETYPE=yes
59657
59658  # First look for the canonical freetype main include file ft2build.h.
59659  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59660    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59661    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59662    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59663      # Fail.
59664      FOUND_FREETYPE=no
59665    fi
59666  fi
59667
59668  if test "x$FOUND_FREETYPE" = xyes; then
59669    # Include file found, let's continue the sanity check.
59670    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59671$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59672
59673    # Reset to default value
59674    FREETYPE_BASE_NAME=freetype
59675    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59676    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59677      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59678          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59679        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59680        # for the .6 version explicitly.
59681        FREETYPE_BASE_NAME=freetype.6
59682        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59683        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59684$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59685      else
59686        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59687$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59688        FOUND_FREETYPE=no
59689      fi
59690    else
59691      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59692        # On Windows, we will need both .lib and .dll file.
59693        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59694          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59695$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59696          FOUND_FREETYPE=no
59697        fi
59698      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59699          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59700        # Found lib in isa dir, use that instead.
59701        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59702        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59703$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59704      fi
59705    fi
59706  fi
59707
59708  if test "x$FOUND_FREETYPE" = xyes; then
59709
59710  # Only process if variable expands to non-empty
59711
59712  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59713    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59714
59715  # Input might be given as Windows format, start by converting to
59716  # unix format.
59717  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59718  new_path=`$CYGPATH -u "$path"`
59719
59720  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59721  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59722  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59723  # "foo.exe" is OK but "foo" is an error.
59724  #
59725  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59726  # It is also a way to make sure we got the proper file name for the real test later on.
59727  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59728  if test "x$test_shortpath" = x; then
59729    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59730$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59731    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59732  fi
59733
59734  # Call helper function which possibly converts this using DOS-style short mode.
59735  # If so, the updated path is stored in $new_path.
59736
59737  input_path="$new_path"
59738  # Check if we need to convert this using DOS-style short mode. If the path
59739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59740  # take no chances and rewrite it.
59741  # Note: m4 eats our [], so we need to use [ and ] instead.
59742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59743  if test "x$has_forbidden_chars" != x; then
59744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59748      # Going to short mode and back again did indeed matter. Since short mode is
59749      # case insensitive, let's make it lowercase to improve readability.
59750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59751      # Now convert it back to Unix-style (cygpath)
59752      input_path=`$CYGPATH -u "$shortmode_path"`
59753      new_path="$input_path"
59754    fi
59755  fi
59756
59757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59758  if test "x$test_cygdrive_prefix" = x; then
59759    # As a simple fix, exclude /usr/bin since it's not a real path.
59760    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59762      # a path prefixed by /cygdrive for fixpath to work.
59763      new_path="$CYGWIN_ROOT_PATH$input_path"
59764    fi
59765  fi
59766
59767
59768  if test "x$path" != "x$new_path"; then
59769    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59771$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59772  fi
59773
59774    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59775
59776  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59777  has_colon=`$ECHO $path | $GREP ^.:`
59778  new_path="$path"
59779  if test "x$has_colon" = x; then
59780    # Not in mixed or Windows style, start by that.
59781    new_path=`cmd //c echo $path`
59782  fi
59783
59784
59785  input_path="$new_path"
59786  # Check if we need to convert this using DOS-style short mode. If the path
59787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59788  # take no chances and rewrite it.
59789  # Note: m4 eats our [], so we need to use [ and ] instead.
59790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59791  if test "x$has_forbidden_chars" != x; then
59792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59794  fi
59795
59796
59797  windows_path="$new_path"
59798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59799    unix_path=`$CYGPATH -u "$windows_path"`
59800    new_path="$unix_path"
59801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59803    new_path="$unix_path"
59804  fi
59805
59806  if test "x$path" != "x$new_path"; then
59807    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59809$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59810  fi
59811
59812  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59813  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59814
59815    else
59816      # We're on a unix platform. Hooray! :)
59817      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59818      has_space=`$ECHO "$path" | $GREP " "`
59819      if test "x$has_space" != x; then
59820        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59821$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59822        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59823      fi
59824
59825      # Use eval to expand a potential ~
59826      eval path="$path"
59827      if test ! -f "$path" && test ! -d "$path"; then
59828        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59829      fi
59830
59831      if test -d "$path"; then
59832        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59833      else
59834        dir="`$DIRNAME "$path"`"
59835        base="`$BASENAME "$path"`"
59836        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59837      fi
59838    fi
59839  fi
59840
59841
59842  # Only process if variable expands to non-empty
59843
59844  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59845    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59846
59847  # Input might be given as Windows format, start by converting to
59848  # unix format.
59849  path="$POTENTIAL_FREETYPE_LIB_PATH"
59850  new_path=`$CYGPATH -u "$path"`
59851
59852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59855  # "foo.exe" is OK but "foo" is an error.
59856  #
59857  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59858  # It is also a way to make sure we got the proper file name for the real test later on.
59859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59860  if test "x$test_shortpath" = x; then
59861    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59862$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59863    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59864  fi
59865
59866  # Call helper function which possibly converts this using DOS-style short mode.
59867  # If so, the updated path is stored in $new_path.
59868
59869  input_path="$new_path"
59870  # Check if we need to convert this using DOS-style short mode. If the path
59871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59872  # take no chances and rewrite it.
59873  # Note: m4 eats our [], so we need to use [ and ] instead.
59874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59875  if test "x$has_forbidden_chars" != x; then
59876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59880      # Going to short mode and back again did indeed matter. Since short mode is
59881      # case insensitive, let's make it lowercase to improve readability.
59882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59883      # Now convert it back to Unix-style (cygpath)
59884      input_path=`$CYGPATH -u "$shortmode_path"`
59885      new_path="$input_path"
59886    fi
59887  fi
59888
59889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59890  if test "x$test_cygdrive_prefix" = x; then
59891    # As a simple fix, exclude /usr/bin since it's not a real path.
59892    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59894      # a path prefixed by /cygdrive for fixpath to work.
59895      new_path="$CYGWIN_ROOT_PATH$input_path"
59896    fi
59897  fi
59898
59899
59900  if test "x$path" != "x$new_path"; then
59901    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59903$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59904  fi
59905
59906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59907
59908  path="$POTENTIAL_FREETYPE_LIB_PATH"
59909  has_colon=`$ECHO $path | $GREP ^.:`
59910  new_path="$path"
59911  if test "x$has_colon" = x; then
59912    # Not in mixed or Windows style, start by that.
59913    new_path=`cmd //c echo $path`
59914  fi
59915
59916
59917  input_path="$new_path"
59918  # Check if we need to convert this using DOS-style short mode. If the path
59919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59920  # take no chances and rewrite it.
59921  # Note: m4 eats our [], so we need to use [ and ] instead.
59922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59923  if test "x$has_forbidden_chars" != x; then
59924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59925    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59926  fi
59927
59928
59929  windows_path="$new_path"
59930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59931    unix_path=`$CYGPATH -u "$windows_path"`
59932    new_path="$unix_path"
59933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59935    new_path="$unix_path"
59936  fi
59937
59938  if test "x$path" != "x$new_path"; then
59939    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59941$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59942  fi
59943
59944  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59945  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59946
59947    else
59948      # We're on a unix platform. Hooray! :)
59949      path="$POTENTIAL_FREETYPE_LIB_PATH"
59950      has_space=`$ECHO "$path" | $GREP " "`
59951      if test "x$has_space" != x; then
59952        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59953$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59954        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59955      fi
59956
59957      # Use eval to expand a potential ~
59958      eval path="$path"
59959      if test ! -f "$path" && test ! -d "$path"; then
59960        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59961      fi
59962
59963      if test -d "$path"; then
59964        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59965      else
59966        dir="`$DIRNAME "$path"`"
59967        base="`$BASENAME "$path"`"
59968        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59969      fi
59970    fi
59971  fi
59972
59973
59974    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59975    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59976$as_echo_n "checking for freetype includes... " >&6; }
59977    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59978$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59979    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59980    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59981$as_echo_n "checking for freetype libraries... " >&6; }
59982    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59983$as_echo "$FREETYPE_LIB_PATH" >&6; }
59984  fi
59985
59986              fi
59987            fi
59988          fi
59989        else
59990          FREETYPE_BASE_DIR="$SYSROOT/usr"
59991
59992  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59993  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59994  METHOD="well-known location"
59995
59996  # Let's start with an optimistic view of the world :-)
59997  FOUND_FREETYPE=yes
59998
59999  # First look for the canonical freetype main include file ft2build.h.
60000  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60001    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60002    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60003    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60004      # Fail.
60005      FOUND_FREETYPE=no
60006    fi
60007  fi
60008
60009  if test "x$FOUND_FREETYPE" = xyes; then
60010    # Include file found, let's continue the sanity check.
60011    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60012$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60013
60014    # Reset to default value
60015    FREETYPE_BASE_NAME=freetype
60016    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60017    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60018      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60019          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60020        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60021        # for the .6 version explicitly.
60022        FREETYPE_BASE_NAME=freetype.6
60023        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60024        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60025$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60026      else
60027        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60028$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60029        FOUND_FREETYPE=no
60030      fi
60031    else
60032      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60033        # On Windows, we will need both .lib and .dll file.
60034        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60035          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60036$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60037          FOUND_FREETYPE=no
60038        fi
60039      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60040          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60041        # Found lib in isa dir, use that instead.
60042        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60043        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60044$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60045      fi
60046    fi
60047  fi
60048
60049  if test "x$FOUND_FREETYPE" = xyes; then
60050
60051  # Only process if variable expands to non-empty
60052
60053  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60054    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60055
60056  # Input might be given as Windows format, start by converting to
60057  # unix format.
60058  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60059  new_path=`$CYGPATH -u "$path"`
60060
60061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60064  # "foo.exe" is OK but "foo" is an error.
60065  #
60066  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60067  # It is also a way to make sure we got the proper file name for the real test later on.
60068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60069  if test "x$test_shortpath" = x; then
60070    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60071$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60072    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60073  fi
60074
60075  # Call helper function which possibly converts this using DOS-style short mode.
60076  # If so, the updated path is stored in $new_path.
60077
60078  input_path="$new_path"
60079  # Check if we need to convert this using DOS-style short mode. If the path
60080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60081  # take no chances and rewrite it.
60082  # Note: m4 eats our [], so we need to use [ and ] instead.
60083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60084  if test "x$has_forbidden_chars" != x; then
60085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60089      # Going to short mode and back again did indeed matter. Since short mode is
60090      # case insensitive, let's make it lowercase to improve readability.
60091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60092      # Now convert it back to Unix-style (cygpath)
60093      input_path=`$CYGPATH -u "$shortmode_path"`
60094      new_path="$input_path"
60095    fi
60096  fi
60097
60098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60099  if test "x$test_cygdrive_prefix" = x; then
60100    # As a simple fix, exclude /usr/bin since it's not a real path.
60101    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60103      # a path prefixed by /cygdrive for fixpath to work.
60104      new_path="$CYGWIN_ROOT_PATH$input_path"
60105    fi
60106  fi
60107
60108
60109  if test "x$path" != "x$new_path"; then
60110    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60112$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60113  fi
60114
60115    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60116
60117  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60118  has_colon=`$ECHO $path | $GREP ^.:`
60119  new_path="$path"
60120  if test "x$has_colon" = x; then
60121    # Not in mixed or Windows style, start by that.
60122    new_path=`cmd //c echo $path`
60123  fi
60124
60125
60126  input_path="$new_path"
60127  # Check if we need to convert this using DOS-style short mode. If the path
60128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60129  # take no chances and rewrite it.
60130  # Note: m4 eats our [], so we need to use [ and ] instead.
60131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60132  if test "x$has_forbidden_chars" != x; then
60133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60134    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60135  fi
60136
60137
60138  windows_path="$new_path"
60139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60140    unix_path=`$CYGPATH -u "$windows_path"`
60141    new_path="$unix_path"
60142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60144    new_path="$unix_path"
60145  fi
60146
60147  if test "x$path" != "x$new_path"; then
60148    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60150$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60151  fi
60152
60153  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60154  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60155
60156    else
60157      # We're on a unix platform. Hooray! :)
60158      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60159      has_space=`$ECHO "$path" | $GREP " "`
60160      if test "x$has_space" != x; then
60161        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60162$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60163        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60164      fi
60165
60166      # Use eval to expand a potential ~
60167      eval path="$path"
60168      if test ! -f "$path" && test ! -d "$path"; then
60169        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60170      fi
60171
60172      if test -d "$path"; then
60173        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60174      else
60175        dir="`$DIRNAME "$path"`"
60176        base="`$BASENAME "$path"`"
60177        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60178      fi
60179    fi
60180  fi
60181
60182
60183  # Only process if variable expands to non-empty
60184
60185  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60186    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60187
60188  # Input might be given as Windows format, start by converting to
60189  # unix format.
60190  path="$POTENTIAL_FREETYPE_LIB_PATH"
60191  new_path=`$CYGPATH -u "$path"`
60192
60193  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60194  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60195  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60196  # "foo.exe" is OK but "foo" is an error.
60197  #
60198  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60199  # It is also a way to make sure we got the proper file name for the real test later on.
60200  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60201  if test "x$test_shortpath" = x; then
60202    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60203$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60204    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60205  fi
60206
60207  # Call helper function which possibly converts this using DOS-style short mode.
60208  # If so, the updated path is stored in $new_path.
60209
60210  input_path="$new_path"
60211  # Check if we need to convert this using DOS-style short mode. If the path
60212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60213  # take no chances and rewrite it.
60214  # Note: m4 eats our [], so we need to use [ and ] instead.
60215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60216  if test "x$has_forbidden_chars" != x; then
60217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60218    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60219    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60220    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60221      # Going to short mode and back again did indeed matter. Since short mode is
60222      # case insensitive, let's make it lowercase to improve readability.
60223      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60224      # Now convert it back to Unix-style (cygpath)
60225      input_path=`$CYGPATH -u "$shortmode_path"`
60226      new_path="$input_path"
60227    fi
60228  fi
60229
60230  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60231  if test "x$test_cygdrive_prefix" = x; then
60232    # As a simple fix, exclude /usr/bin since it's not a real path.
60233    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60234      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60235      # a path prefixed by /cygdrive for fixpath to work.
60236      new_path="$CYGWIN_ROOT_PATH$input_path"
60237    fi
60238  fi
60239
60240
60241  if test "x$path" != "x$new_path"; then
60242    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60244$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60245  fi
60246
60247    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60248
60249  path="$POTENTIAL_FREETYPE_LIB_PATH"
60250  has_colon=`$ECHO $path | $GREP ^.:`
60251  new_path="$path"
60252  if test "x$has_colon" = x; then
60253    # Not in mixed or Windows style, start by that.
60254    new_path=`cmd //c echo $path`
60255  fi
60256
60257
60258  input_path="$new_path"
60259  # Check if we need to convert this using DOS-style short mode. If the path
60260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60261  # take no chances and rewrite it.
60262  # Note: m4 eats our [], so we need to use [ and ] instead.
60263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60264  if test "x$has_forbidden_chars" != x; then
60265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60266    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60267  fi
60268
60269
60270  windows_path="$new_path"
60271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60272    unix_path=`$CYGPATH -u "$windows_path"`
60273    new_path="$unix_path"
60274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60276    new_path="$unix_path"
60277  fi
60278
60279  if test "x$path" != "x$new_path"; then
60280    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60282$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60283  fi
60284
60285  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60286  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60287
60288    else
60289      # We're on a unix platform. Hooray! :)
60290      path="$POTENTIAL_FREETYPE_LIB_PATH"
60291      has_space=`$ECHO "$path" | $GREP " "`
60292      if test "x$has_space" != x; then
60293        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60294$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60295        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60296      fi
60297
60298      # Use eval to expand a potential ~
60299      eval path="$path"
60300      if test ! -f "$path" && test ! -d "$path"; then
60301        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60302      fi
60303
60304      if test -d "$path"; then
60305        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60306      else
60307        dir="`$DIRNAME "$path"`"
60308        base="`$BASENAME "$path"`"
60309        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60310      fi
60311    fi
60312  fi
60313
60314
60315    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60316    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60317$as_echo_n "checking for freetype includes... " >&6; }
60318    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60319$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60320    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60321    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60322$as_echo_n "checking for freetype libraries... " >&6; }
60323    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60324$as_echo "$FREETYPE_LIB_PATH" >&6; }
60325  fi
60326
60327
60328          if test "x$FOUND_FREETYPE" != xyes; then
60329            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60330
60331  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60332  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60333  METHOD="well-known location"
60334
60335  # Let's start with an optimistic view of the world :-)
60336  FOUND_FREETYPE=yes
60337
60338  # First look for the canonical freetype main include file ft2build.h.
60339  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60340    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60341    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60342    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60343      # Fail.
60344      FOUND_FREETYPE=no
60345    fi
60346  fi
60347
60348  if test "x$FOUND_FREETYPE" = xyes; then
60349    # Include file found, let's continue the sanity check.
60350    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60351$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60352
60353    # Reset to default value
60354    FREETYPE_BASE_NAME=freetype
60355    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60356    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60357      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60358          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60359        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60360        # for the .6 version explicitly.
60361        FREETYPE_BASE_NAME=freetype.6
60362        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60363        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60364$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60365      else
60366        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60367$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60368        FOUND_FREETYPE=no
60369      fi
60370    else
60371      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60372        # On Windows, we will need both .lib and .dll file.
60373        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60374          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60375$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60376          FOUND_FREETYPE=no
60377        fi
60378      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60379          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60380        # Found lib in isa dir, use that instead.
60381        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60382        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60383$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60384      fi
60385    fi
60386  fi
60387
60388  if test "x$FOUND_FREETYPE" = xyes; then
60389
60390  # Only process if variable expands to non-empty
60391
60392  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60393    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60394
60395  # Input might be given as Windows format, start by converting to
60396  # unix format.
60397  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60398  new_path=`$CYGPATH -u "$path"`
60399
60400  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60401  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60402  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60403  # "foo.exe" is OK but "foo" is an error.
60404  #
60405  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60406  # It is also a way to make sure we got the proper file name for the real test later on.
60407  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60408  if test "x$test_shortpath" = x; then
60409    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60410$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60411    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60412  fi
60413
60414  # Call helper function which possibly converts this using DOS-style short mode.
60415  # If so, the updated path is stored in $new_path.
60416
60417  input_path="$new_path"
60418  # Check if we need to convert this using DOS-style short mode. If the path
60419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60420  # take no chances and rewrite it.
60421  # Note: m4 eats our [], so we need to use [ and ] instead.
60422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60423  if test "x$has_forbidden_chars" != x; then
60424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60425    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60426    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60427    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60428      # Going to short mode and back again did indeed matter. Since short mode is
60429      # case insensitive, let's make it lowercase to improve readability.
60430      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60431      # Now convert it back to Unix-style (cygpath)
60432      input_path=`$CYGPATH -u "$shortmode_path"`
60433      new_path="$input_path"
60434    fi
60435  fi
60436
60437  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60438  if test "x$test_cygdrive_prefix" = x; then
60439    # As a simple fix, exclude /usr/bin since it's not a real path.
60440    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60441      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60442      # a path prefixed by /cygdrive for fixpath to work.
60443      new_path="$CYGWIN_ROOT_PATH$input_path"
60444    fi
60445  fi
60446
60447
60448  if test "x$path" != "x$new_path"; then
60449    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60451$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60452  fi
60453
60454    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60455
60456  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60457  has_colon=`$ECHO $path | $GREP ^.:`
60458  new_path="$path"
60459  if test "x$has_colon" = x; then
60460    # Not in mixed or Windows style, start by that.
60461    new_path=`cmd //c echo $path`
60462  fi
60463
60464
60465  input_path="$new_path"
60466  # Check if we need to convert this using DOS-style short mode. If the path
60467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60468  # take no chances and rewrite it.
60469  # Note: m4 eats our [], so we need to use [ and ] instead.
60470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60471  if test "x$has_forbidden_chars" != x; then
60472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60473    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60474  fi
60475
60476
60477  windows_path="$new_path"
60478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60479    unix_path=`$CYGPATH -u "$windows_path"`
60480    new_path="$unix_path"
60481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60483    new_path="$unix_path"
60484  fi
60485
60486  if test "x$path" != "x$new_path"; then
60487    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60489$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60490  fi
60491
60492  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60493  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60494
60495    else
60496      # We're on a unix platform. Hooray! :)
60497      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60498      has_space=`$ECHO "$path" | $GREP " "`
60499      if test "x$has_space" != x; then
60500        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60501$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60502        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60503      fi
60504
60505      # Use eval to expand a potential ~
60506      eval path="$path"
60507      if test ! -f "$path" && test ! -d "$path"; then
60508        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60509      fi
60510
60511      if test -d "$path"; then
60512        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60513      else
60514        dir="`$DIRNAME "$path"`"
60515        base="`$BASENAME "$path"`"
60516        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60517      fi
60518    fi
60519  fi
60520
60521
60522  # Only process if variable expands to non-empty
60523
60524  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60525    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60526
60527  # Input might be given as Windows format, start by converting to
60528  # unix format.
60529  path="$POTENTIAL_FREETYPE_LIB_PATH"
60530  new_path=`$CYGPATH -u "$path"`
60531
60532  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60533  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60534  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60535  # "foo.exe" is OK but "foo" is an error.
60536  #
60537  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60538  # It is also a way to make sure we got the proper file name for the real test later on.
60539  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60540  if test "x$test_shortpath" = x; then
60541    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60542$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60543    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60544  fi
60545
60546  # Call helper function which possibly converts this using DOS-style short mode.
60547  # If so, the updated path is stored in $new_path.
60548
60549  input_path="$new_path"
60550  # Check if we need to convert this using DOS-style short mode. If the path
60551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60552  # take no chances and rewrite it.
60553  # Note: m4 eats our [], so we need to use [ and ] instead.
60554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60555  if test "x$has_forbidden_chars" != x; then
60556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60557    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60558    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60559    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60560      # Going to short mode and back again did indeed matter. Since short mode is
60561      # case insensitive, let's make it lowercase to improve readability.
60562      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60563      # Now convert it back to Unix-style (cygpath)
60564      input_path=`$CYGPATH -u "$shortmode_path"`
60565      new_path="$input_path"
60566    fi
60567  fi
60568
60569  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60570  if test "x$test_cygdrive_prefix" = x; then
60571    # As a simple fix, exclude /usr/bin since it's not a real path.
60572    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60573      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60574      # a path prefixed by /cygdrive for fixpath to work.
60575      new_path="$CYGWIN_ROOT_PATH$input_path"
60576    fi
60577  fi
60578
60579
60580  if test "x$path" != "x$new_path"; then
60581    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60582    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60583$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60584  fi
60585
60586    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60587
60588  path="$POTENTIAL_FREETYPE_LIB_PATH"
60589  has_colon=`$ECHO $path | $GREP ^.:`
60590  new_path="$path"
60591  if test "x$has_colon" = x; then
60592    # Not in mixed or Windows style, start by that.
60593    new_path=`cmd //c echo $path`
60594  fi
60595
60596
60597  input_path="$new_path"
60598  # Check if we need to convert this using DOS-style short mode. If the path
60599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60600  # take no chances and rewrite it.
60601  # Note: m4 eats our [], so we need to use [ and ] instead.
60602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60603  if test "x$has_forbidden_chars" != x; then
60604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60605    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60606  fi
60607
60608
60609  windows_path="$new_path"
60610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60611    unix_path=`$CYGPATH -u "$windows_path"`
60612    new_path="$unix_path"
60613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60615    new_path="$unix_path"
60616  fi
60617
60618  if test "x$path" != "x$new_path"; then
60619    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60620    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60621$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60622  fi
60623
60624  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60625  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60626
60627    else
60628      # We're on a unix platform. Hooray! :)
60629      path="$POTENTIAL_FREETYPE_LIB_PATH"
60630      has_space=`$ECHO "$path" | $GREP " "`
60631      if test "x$has_space" != x; then
60632        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60633$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60634        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60635      fi
60636
60637      # Use eval to expand a potential ~
60638      eval path="$path"
60639      if test ! -f "$path" && test ! -d "$path"; then
60640        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60641      fi
60642
60643      if test -d "$path"; then
60644        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60645      else
60646        dir="`$DIRNAME "$path"`"
60647        base="`$BASENAME "$path"`"
60648        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60649      fi
60650    fi
60651  fi
60652
60653
60654    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60655    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60656$as_echo_n "checking for freetype includes... " >&6; }
60657    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60658$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60659    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60660    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60661$as_echo_n "checking for freetype libraries... " >&6; }
60662    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60663$as_echo "$FREETYPE_LIB_PATH" >&6; }
60664  fi
60665
60666          fi
60667
60668          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60669            if test "x$FOUND_FREETYPE" != xyes; then
60670              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60671              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60672
60673  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60674  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60675  METHOD="well-known location"
60676
60677  # Let's start with an optimistic view of the world :-)
60678  FOUND_FREETYPE=yes
60679
60680  # First look for the canonical freetype main include file ft2build.h.
60681  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60682    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60683    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60684    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60685      # Fail.
60686      FOUND_FREETYPE=no
60687    fi
60688  fi
60689
60690  if test "x$FOUND_FREETYPE" = xyes; then
60691    # Include file found, let's continue the sanity check.
60692    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60693$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60694
60695    # Reset to default value
60696    FREETYPE_BASE_NAME=freetype
60697    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60698    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60699      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60700          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60701        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60702        # for the .6 version explicitly.
60703        FREETYPE_BASE_NAME=freetype.6
60704        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60705        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60706$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60707      else
60708        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60709$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60710        FOUND_FREETYPE=no
60711      fi
60712    else
60713      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60714        # On Windows, we will need both .lib and .dll file.
60715        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60716          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60717$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60718          FOUND_FREETYPE=no
60719        fi
60720      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60721          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60722        # Found lib in isa dir, use that instead.
60723        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60724        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60725$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60726      fi
60727    fi
60728  fi
60729
60730  if test "x$FOUND_FREETYPE" = xyes; then
60731
60732  # Only process if variable expands to non-empty
60733
60734  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60735    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60736
60737  # Input might be given as Windows format, start by converting to
60738  # unix format.
60739  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60740  new_path=`$CYGPATH -u "$path"`
60741
60742  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60743  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60744  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60745  # "foo.exe" is OK but "foo" is an error.
60746  #
60747  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60748  # It is also a way to make sure we got the proper file name for the real test later on.
60749  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60750  if test "x$test_shortpath" = x; then
60751    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60752$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60753    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60754  fi
60755
60756  # Call helper function which possibly converts this using DOS-style short mode.
60757  # If so, the updated path is stored in $new_path.
60758
60759  input_path="$new_path"
60760  # Check if we need to convert this using DOS-style short mode. If the path
60761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60762  # take no chances and rewrite it.
60763  # Note: m4 eats our [], so we need to use [ and ] instead.
60764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60765  if test "x$has_forbidden_chars" != x; then
60766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60767    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60768    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60769    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60770      # Going to short mode and back again did indeed matter. Since short mode is
60771      # case insensitive, let's make it lowercase to improve readability.
60772      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60773      # Now convert it back to Unix-style (cygpath)
60774      input_path=`$CYGPATH -u "$shortmode_path"`
60775      new_path="$input_path"
60776    fi
60777  fi
60778
60779  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60780  if test "x$test_cygdrive_prefix" = x; then
60781    # As a simple fix, exclude /usr/bin since it's not a real path.
60782    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60783      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60784      # a path prefixed by /cygdrive for fixpath to work.
60785      new_path="$CYGWIN_ROOT_PATH$input_path"
60786    fi
60787  fi
60788
60789
60790  if test "x$path" != "x$new_path"; then
60791    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60792    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60793$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60794  fi
60795
60796    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60797
60798  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60799  has_colon=`$ECHO $path | $GREP ^.:`
60800  new_path="$path"
60801  if test "x$has_colon" = x; then
60802    # Not in mixed or Windows style, start by that.
60803    new_path=`cmd //c echo $path`
60804  fi
60805
60806
60807  input_path="$new_path"
60808  # Check if we need to convert this using DOS-style short mode. If the path
60809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60810  # take no chances and rewrite it.
60811  # Note: m4 eats our [], so we need to use [ and ] instead.
60812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60813  if test "x$has_forbidden_chars" != x; then
60814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60815    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60816  fi
60817
60818
60819  windows_path="$new_path"
60820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60821    unix_path=`$CYGPATH -u "$windows_path"`
60822    new_path="$unix_path"
60823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60825    new_path="$unix_path"
60826  fi
60827
60828  if test "x$path" != "x$new_path"; then
60829    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60831$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60832  fi
60833
60834  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60835  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60836
60837    else
60838      # We're on a unix platform. Hooray! :)
60839      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60840      has_space=`$ECHO "$path" | $GREP " "`
60841      if test "x$has_space" != x; then
60842        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60843$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60844        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60845      fi
60846
60847      # Use eval to expand a potential ~
60848      eval path="$path"
60849      if test ! -f "$path" && test ! -d "$path"; then
60850        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60851      fi
60852
60853      if test -d "$path"; then
60854        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60855      else
60856        dir="`$DIRNAME "$path"`"
60857        base="`$BASENAME "$path"`"
60858        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60859      fi
60860    fi
60861  fi
60862
60863
60864  # Only process if variable expands to non-empty
60865
60866  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60867    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60868
60869  # Input might be given as Windows format, start by converting to
60870  # unix format.
60871  path="$POTENTIAL_FREETYPE_LIB_PATH"
60872  new_path=`$CYGPATH -u "$path"`
60873
60874  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60875  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60876  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60877  # "foo.exe" is OK but "foo" is an error.
60878  #
60879  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60880  # It is also a way to make sure we got the proper file name for the real test later on.
60881  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60882  if test "x$test_shortpath" = x; then
60883    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60884$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60885    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60886  fi
60887
60888  # Call helper function which possibly converts this using DOS-style short mode.
60889  # If so, the updated path is stored in $new_path.
60890
60891  input_path="$new_path"
60892  # Check if we need to convert this using DOS-style short mode. If the path
60893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60894  # take no chances and rewrite it.
60895  # Note: m4 eats our [], so we need to use [ and ] instead.
60896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60897  if test "x$has_forbidden_chars" != x; then
60898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60899    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60900    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60901    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60902      # Going to short mode and back again did indeed matter. Since short mode is
60903      # case insensitive, let's make it lowercase to improve readability.
60904      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60905      # Now convert it back to Unix-style (cygpath)
60906      input_path=`$CYGPATH -u "$shortmode_path"`
60907      new_path="$input_path"
60908    fi
60909  fi
60910
60911  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60912  if test "x$test_cygdrive_prefix" = x; then
60913    # As a simple fix, exclude /usr/bin since it's not a real path.
60914    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60915      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60916      # a path prefixed by /cygdrive for fixpath to work.
60917      new_path="$CYGWIN_ROOT_PATH$input_path"
60918    fi
60919  fi
60920
60921
60922  if test "x$path" != "x$new_path"; then
60923    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60925$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60926  fi
60927
60928    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60929
60930  path="$POTENTIAL_FREETYPE_LIB_PATH"
60931  has_colon=`$ECHO $path | $GREP ^.:`
60932  new_path="$path"
60933  if test "x$has_colon" = x; then
60934    # Not in mixed or Windows style, start by that.
60935    new_path=`cmd //c echo $path`
60936  fi
60937
60938
60939  input_path="$new_path"
60940  # Check if we need to convert this using DOS-style short mode. If the path
60941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60942  # take no chances and rewrite it.
60943  # Note: m4 eats our [], so we need to use [ and ] instead.
60944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60945  if test "x$has_forbidden_chars" != x; then
60946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60947    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60948  fi
60949
60950
60951  windows_path="$new_path"
60952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60953    unix_path=`$CYGPATH -u "$windows_path"`
60954    new_path="$unix_path"
60955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60957    new_path="$unix_path"
60958  fi
60959
60960  if test "x$path" != "x$new_path"; then
60961    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60963$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60964  fi
60965
60966  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60967  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60968
60969    else
60970      # We're on a unix platform. Hooray! :)
60971      path="$POTENTIAL_FREETYPE_LIB_PATH"
60972      has_space=`$ECHO "$path" | $GREP " "`
60973      if test "x$has_space" != x; then
60974        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60975$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60976        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60977      fi
60978
60979      # Use eval to expand a potential ~
60980      eval path="$path"
60981      if test ! -f "$path" && test ! -d "$path"; then
60982        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60983      fi
60984
60985      if test -d "$path"; then
60986        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60987      else
60988        dir="`$DIRNAME "$path"`"
60989        base="`$BASENAME "$path"`"
60990        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60991      fi
60992    fi
60993  fi
60994
60995
60996    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60997    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60998$as_echo_n "checking for freetype includes... " >&6; }
60999    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61000$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61001    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61002    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61003$as_echo_n "checking for freetype libraries... " >&6; }
61004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61005$as_echo "$FREETYPE_LIB_PATH" >&6; }
61006  fi
61007
61008            fi
61009          fi
61010
61011          if test "x$FOUND_FREETYPE" != xyes; then
61012            FREETYPE_BASE_DIR="$SYSROOT/usr"
61013            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61014
61015  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61016  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61017  METHOD="well-known location"
61018
61019  # Let's start with an optimistic view of the world :-)
61020  FOUND_FREETYPE=yes
61021
61022  # First look for the canonical freetype main include file ft2build.h.
61023  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61024    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61025    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61026    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61027      # Fail.
61028      FOUND_FREETYPE=no
61029    fi
61030  fi
61031
61032  if test "x$FOUND_FREETYPE" = xyes; then
61033    # Include file found, let's continue the sanity check.
61034    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61035$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61036
61037    # Reset to default value
61038    FREETYPE_BASE_NAME=freetype
61039    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61040    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61041      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61042          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61043        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61044        # for the .6 version explicitly.
61045        FREETYPE_BASE_NAME=freetype.6
61046        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61047        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61048$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61049      else
61050        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61051$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61052        FOUND_FREETYPE=no
61053      fi
61054    else
61055      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61056        # On Windows, we will need both .lib and .dll file.
61057        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61058          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61059$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61060          FOUND_FREETYPE=no
61061        fi
61062      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61063          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61064        # Found lib in isa dir, use that instead.
61065        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61066        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61067$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61068      fi
61069    fi
61070  fi
61071
61072  if test "x$FOUND_FREETYPE" = xyes; then
61073
61074  # Only process if variable expands to non-empty
61075
61076  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61077    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61078
61079  # Input might be given as Windows format, start by converting to
61080  # unix format.
61081  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61082  new_path=`$CYGPATH -u "$path"`
61083
61084  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61085  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61086  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61087  # "foo.exe" is OK but "foo" is an error.
61088  #
61089  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61090  # It is also a way to make sure we got the proper file name for the real test later on.
61091  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61092  if test "x$test_shortpath" = x; then
61093    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61094$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61095    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61096  fi
61097
61098  # Call helper function which possibly converts this using DOS-style short mode.
61099  # If so, the updated path is stored in $new_path.
61100
61101  input_path="$new_path"
61102  # Check if we need to convert this using DOS-style short mode. If the path
61103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61104  # take no chances and rewrite it.
61105  # Note: m4 eats our [], so we need to use [ and ] instead.
61106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61107  if test "x$has_forbidden_chars" != x; then
61108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61112      # Going to short mode and back again did indeed matter. Since short mode is
61113      # case insensitive, let's make it lowercase to improve readability.
61114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61115      # Now convert it back to Unix-style (cygpath)
61116      input_path=`$CYGPATH -u "$shortmode_path"`
61117      new_path="$input_path"
61118    fi
61119  fi
61120
61121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61122  if test "x$test_cygdrive_prefix" = x; then
61123    # As a simple fix, exclude /usr/bin since it's not a real path.
61124    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61126      # a path prefixed by /cygdrive for fixpath to work.
61127      new_path="$CYGWIN_ROOT_PATH$input_path"
61128    fi
61129  fi
61130
61131
61132  if test "x$path" != "x$new_path"; then
61133    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61135$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61136  fi
61137
61138    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61139
61140  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61141  has_colon=`$ECHO $path | $GREP ^.:`
61142  new_path="$path"
61143  if test "x$has_colon" = x; then
61144    # Not in mixed or Windows style, start by that.
61145    new_path=`cmd //c echo $path`
61146  fi
61147
61148
61149  input_path="$new_path"
61150  # Check if we need to convert this using DOS-style short mode. If the path
61151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61152  # take no chances and rewrite it.
61153  # Note: m4 eats our [], so we need to use [ and ] instead.
61154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61155  if test "x$has_forbidden_chars" != x; then
61156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61157    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61158  fi
61159
61160
61161  windows_path="$new_path"
61162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61163    unix_path=`$CYGPATH -u "$windows_path"`
61164    new_path="$unix_path"
61165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61167    new_path="$unix_path"
61168  fi
61169
61170  if test "x$path" != "x$new_path"; then
61171    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61173$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61174  fi
61175
61176  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61177  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61178
61179    else
61180      # We're on a unix platform. Hooray! :)
61181      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61182      has_space=`$ECHO "$path" | $GREP " "`
61183      if test "x$has_space" != x; then
61184        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61185$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61186        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61187      fi
61188
61189      # Use eval to expand a potential ~
61190      eval path="$path"
61191      if test ! -f "$path" && test ! -d "$path"; then
61192        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61193      fi
61194
61195      if test -d "$path"; then
61196        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61197      else
61198        dir="`$DIRNAME "$path"`"
61199        base="`$BASENAME "$path"`"
61200        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61201      fi
61202    fi
61203  fi
61204
61205
61206  # Only process if variable expands to non-empty
61207
61208  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61209    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61210
61211  # Input might be given as Windows format, start by converting to
61212  # unix format.
61213  path="$POTENTIAL_FREETYPE_LIB_PATH"
61214  new_path=`$CYGPATH -u "$path"`
61215
61216  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61217  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61218  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61219  # "foo.exe" is OK but "foo" is an error.
61220  #
61221  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61222  # It is also a way to make sure we got the proper file name for the real test later on.
61223  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61224  if test "x$test_shortpath" = x; then
61225    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61226$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61227    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61228  fi
61229
61230  # Call helper function which possibly converts this using DOS-style short mode.
61231  # If so, the updated path is stored in $new_path.
61232
61233  input_path="$new_path"
61234  # Check if we need to convert this using DOS-style short mode. If the path
61235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61236  # take no chances and rewrite it.
61237  # Note: m4 eats our [], so we need to use [ and ] instead.
61238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61239  if test "x$has_forbidden_chars" != x; then
61240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61241    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61242    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61243    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61244      # Going to short mode and back again did indeed matter. Since short mode is
61245      # case insensitive, let's make it lowercase to improve readability.
61246      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61247      # Now convert it back to Unix-style (cygpath)
61248      input_path=`$CYGPATH -u "$shortmode_path"`
61249      new_path="$input_path"
61250    fi
61251  fi
61252
61253  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61254  if test "x$test_cygdrive_prefix" = x; then
61255    # As a simple fix, exclude /usr/bin since it's not a real path.
61256    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61257      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61258      # a path prefixed by /cygdrive for fixpath to work.
61259      new_path="$CYGWIN_ROOT_PATH$input_path"
61260    fi
61261  fi
61262
61263
61264  if test "x$path" != "x$new_path"; then
61265    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61267$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61268  fi
61269
61270    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61271
61272  path="$POTENTIAL_FREETYPE_LIB_PATH"
61273  has_colon=`$ECHO $path | $GREP ^.:`
61274  new_path="$path"
61275  if test "x$has_colon" = x; then
61276    # Not in mixed or Windows style, start by that.
61277    new_path=`cmd //c echo $path`
61278  fi
61279
61280
61281  input_path="$new_path"
61282  # Check if we need to convert this using DOS-style short mode. If the path
61283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61284  # take no chances and rewrite it.
61285  # Note: m4 eats our [], so we need to use [ and ] instead.
61286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61287  if test "x$has_forbidden_chars" != x; then
61288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61289    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61290  fi
61291
61292
61293  windows_path="$new_path"
61294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61295    unix_path=`$CYGPATH -u "$windows_path"`
61296    new_path="$unix_path"
61297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61299    new_path="$unix_path"
61300  fi
61301
61302  if test "x$path" != "x$new_path"; then
61303    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61305$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61306  fi
61307
61308  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61309  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61310
61311    else
61312      # We're on a unix platform. Hooray! :)
61313      path="$POTENTIAL_FREETYPE_LIB_PATH"
61314      has_space=`$ECHO "$path" | $GREP " "`
61315      if test "x$has_space" != x; then
61316        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61317$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61318        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61319      fi
61320
61321      # Use eval to expand a potential ~
61322      eval path="$path"
61323      if test ! -f "$path" && test ! -d "$path"; then
61324        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61325      fi
61326
61327      if test -d "$path"; then
61328        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61329      else
61330        dir="`$DIRNAME "$path"`"
61331        base="`$BASENAME "$path"`"
61332        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61333      fi
61334    fi
61335  fi
61336
61337
61338    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61339    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61340$as_echo_n "checking for freetype includes... " >&6; }
61341    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61342$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61343    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61344    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61345$as_echo_n "checking for freetype libraries... " >&6; }
61346    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61347$as_echo "$FREETYPE_LIB_PATH" >&6; }
61348  fi
61349
61350            else
61351
61352  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61353  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61354  METHOD="well-known location"
61355
61356  # Let's start with an optimistic view of the world :-)
61357  FOUND_FREETYPE=yes
61358
61359  # First look for the canonical freetype main include file ft2build.h.
61360  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61361    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61362    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61363    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61364      # Fail.
61365      FOUND_FREETYPE=no
61366    fi
61367  fi
61368
61369  if test "x$FOUND_FREETYPE" = xyes; then
61370    # Include file found, let's continue the sanity check.
61371    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61372$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61373
61374    # Reset to default value
61375    FREETYPE_BASE_NAME=freetype
61376    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61377    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61378      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61379          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61380        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61381        # for the .6 version explicitly.
61382        FREETYPE_BASE_NAME=freetype.6
61383        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61384        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61385$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61386      else
61387        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61388$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61389        FOUND_FREETYPE=no
61390      fi
61391    else
61392      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61393        # On Windows, we will need both .lib and .dll file.
61394        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61395          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61396$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61397          FOUND_FREETYPE=no
61398        fi
61399      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61400          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61401        # Found lib in isa dir, use that instead.
61402        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61403        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61404$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61405      fi
61406    fi
61407  fi
61408
61409  if test "x$FOUND_FREETYPE" = xyes; then
61410
61411  # Only process if variable expands to non-empty
61412
61413  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61414    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61415
61416  # Input might be given as Windows format, start by converting to
61417  # unix format.
61418  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61419  new_path=`$CYGPATH -u "$path"`
61420
61421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61424  # "foo.exe" is OK but "foo" is an error.
61425  #
61426  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61427  # It is also a way to make sure we got the proper file name for the real test later on.
61428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61429  if test "x$test_shortpath" = x; then
61430    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61431$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61432    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61433  fi
61434
61435  # Call helper function which possibly converts this using DOS-style short mode.
61436  # If so, the updated path is stored in $new_path.
61437
61438  input_path="$new_path"
61439  # Check if we need to convert this using DOS-style short mode. If the path
61440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61441  # take no chances and rewrite it.
61442  # Note: m4 eats our [], so we need to use [ and ] instead.
61443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61444  if test "x$has_forbidden_chars" != x; then
61445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61446    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61447    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61448    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61449      # Going to short mode and back again did indeed matter. Since short mode is
61450      # case insensitive, let's make it lowercase to improve readability.
61451      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61452      # Now convert it back to Unix-style (cygpath)
61453      input_path=`$CYGPATH -u "$shortmode_path"`
61454      new_path="$input_path"
61455    fi
61456  fi
61457
61458  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61459  if test "x$test_cygdrive_prefix" = x; then
61460    # As a simple fix, exclude /usr/bin since it's not a real path.
61461    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61462      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61463      # a path prefixed by /cygdrive for fixpath to work.
61464      new_path="$CYGWIN_ROOT_PATH$input_path"
61465    fi
61466  fi
61467
61468
61469  if test "x$path" != "x$new_path"; then
61470    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61472$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61473  fi
61474
61475    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61476
61477  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61478  has_colon=`$ECHO $path | $GREP ^.:`
61479  new_path="$path"
61480  if test "x$has_colon" = x; then
61481    # Not in mixed or Windows style, start by that.
61482    new_path=`cmd //c echo $path`
61483  fi
61484
61485
61486  input_path="$new_path"
61487  # Check if we need to convert this using DOS-style short mode. If the path
61488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61489  # take no chances and rewrite it.
61490  # Note: m4 eats our [], so we need to use [ and ] instead.
61491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61492  if test "x$has_forbidden_chars" != x; then
61493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61495  fi
61496
61497
61498  windows_path="$new_path"
61499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61500    unix_path=`$CYGPATH -u "$windows_path"`
61501    new_path="$unix_path"
61502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61504    new_path="$unix_path"
61505  fi
61506
61507  if test "x$path" != "x$new_path"; then
61508    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61510$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61511  fi
61512
61513  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61514  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61515
61516    else
61517      # We're on a unix platform. Hooray! :)
61518      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61519      has_space=`$ECHO "$path" | $GREP " "`
61520      if test "x$has_space" != x; then
61521        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61522$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61523        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61524      fi
61525
61526      # Use eval to expand a potential ~
61527      eval path="$path"
61528      if test ! -f "$path" && test ! -d "$path"; then
61529        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61530      fi
61531
61532      if test -d "$path"; then
61533        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61534      else
61535        dir="`$DIRNAME "$path"`"
61536        base="`$BASENAME "$path"`"
61537        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61538      fi
61539    fi
61540  fi
61541
61542
61543  # Only process if variable expands to non-empty
61544
61545  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61546    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61547
61548  # Input might be given as Windows format, start by converting to
61549  # unix format.
61550  path="$POTENTIAL_FREETYPE_LIB_PATH"
61551  new_path=`$CYGPATH -u "$path"`
61552
61553  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61554  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61555  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61556  # "foo.exe" is OK but "foo" is an error.
61557  #
61558  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61559  # It is also a way to make sure we got the proper file name for the real test later on.
61560  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61561  if test "x$test_shortpath" = x; then
61562    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61563$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61564    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61565  fi
61566
61567  # Call helper function which possibly converts this using DOS-style short mode.
61568  # If so, the updated path is stored in $new_path.
61569
61570  input_path="$new_path"
61571  # Check if we need to convert this using DOS-style short mode. If the path
61572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61573  # take no chances and rewrite it.
61574  # Note: m4 eats our [], so we need to use [ and ] instead.
61575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61576  if test "x$has_forbidden_chars" != x; then
61577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61578    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61579    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61580    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61581      # Going to short mode and back again did indeed matter. Since short mode is
61582      # case insensitive, let's make it lowercase to improve readability.
61583      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61584      # Now convert it back to Unix-style (cygpath)
61585      input_path=`$CYGPATH -u "$shortmode_path"`
61586      new_path="$input_path"
61587    fi
61588  fi
61589
61590  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61591  if test "x$test_cygdrive_prefix" = x; then
61592    # As a simple fix, exclude /usr/bin since it's not a real path.
61593    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61594      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61595      # a path prefixed by /cygdrive for fixpath to work.
61596      new_path="$CYGWIN_ROOT_PATH$input_path"
61597    fi
61598  fi
61599
61600
61601  if test "x$path" != "x$new_path"; then
61602    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61604$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61605  fi
61606
61607    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61608
61609  path="$POTENTIAL_FREETYPE_LIB_PATH"
61610  has_colon=`$ECHO $path | $GREP ^.:`
61611  new_path="$path"
61612  if test "x$has_colon" = x; then
61613    # Not in mixed or Windows style, start by that.
61614    new_path=`cmd //c echo $path`
61615  fi
61616
61617
61618  input_path="$new_path"
61619  # Check if we need to convert this using DOS-style short mode. If the path
61620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61621  # take no chances and rewrite it.
61622  # Note: m4 eats our [], so we need to use [ and ] instead.
61623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61624  if test "x$has_forbidden_chars" != x; then
61625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61626    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61627  fi
61628
61629
61630  windows_path="$new_path"
61631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61632    unix_path=`$CYGPATH -u "$windows_path"`
61633    new_path="$unix_path"
61634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61636    new_path="$unix_path"
61637  fi
61638
61639  if test "x$path" != "x$new_path"; then
61640    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61642$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61643  fi
61644
61645  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61646  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61647
61648    else
61649      # We're on a unix platform. Hooray! :)
61650      path="$POTENTIAL_FREETYPE_LIB_PATH"
61651      has_space=`$ECHO "$path" | $GREP " "`
61652      if test "x$has_space" != x; then
61653        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61654$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61655        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61656      fi
61657
61658      # Use eval to expand a potential ~
61659      eval path="$path"
61660      if test ! -f "$path" && test ! -d "$path"; then
61661        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61662      fi
61663
61664      if test -d "$path"; then
61665        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61666      else
61667        dir="`$DIRNAME "$path"`"
61668        base="`$BASENAME "$path"`"
61669        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61670      fi
61671    fi
61672  fi
61673
61674
61675    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61676    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61677$as_echo_n "checking for freetype includes... " >&6; }
61678    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61679$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61680    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61681    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61682$as_echo_n "checking for freetype libraries... " >&6; }
61683    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61684$as_echo "$FREETYPE_LIB_PATH" >&6; }
61685  fi
61686
61687              if test "x$FOUND_FREETYPE" != xyes; then
61688
61689  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61690  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61691  METHOD="well-known location"
61692
61693  # Let's start with an optimistic view of the world :-)
61694  FOUND_FREETYPE=yes
61695
61696  # First look for the canonical freetype main include file ft2build.h.
61697  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61698    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61699    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61700    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61701      # Fail.
61702      FOUND_FREETYPE=no
61703    fi
61704  fi
61705
61706  if test "x$FOUND_FREETYPE" = xyes; then
61707    # Include file found, let's continue the sanity check.
61708    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61709$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61710
61711    # Reset to default value
61712    FREETYPE_BASE_NAME=freetype
61713    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61714    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61715      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61716          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61717        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61718        # for the .6 version explicitly.
61719        FREETYPE_BASE_NAME=freetype.6
61720        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61721        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61722$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61723      else
61724        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61725$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61726        FOUND_FREETYPE=no
61727      fi
61728    else
61729      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61730        # On Windows, we will need both .lib and .dll file.
61731        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61732          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61733$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61734          FOUND_FREETYPE=no
61735        fi
61736      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61737          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61738        # Found lib in isa dir, use that instead.
61739        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61740        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61741$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61742      fi
61743    fi
61744  fi
61745
61746  if test "x$FOUND_FREETYPE" = xyes; then
61747
61748  # Only process if variable expands to non-empty
61749
61750  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61751    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61752
61753  # Input might be given as Windows format, start by converting to
61754  # unix format.
61755  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61756  new_path=`$CYGPATH -u "$path"`
61757
61758  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61759  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61760  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61761  # "foo.exe" is OK but "foo" is an error.
61762  #
61763  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61764  # It is also a way to make sure we got the proper file name for the real test later on.
61765  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61766  if test "x$test_shortpath" = x; then
61767    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61768$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61769    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61770  fi
61771
61772  # Call helper function which possibly converts this using DOS-style short mode.
61773  # If so, the updated path is stored in $new_path.
61774
61775  input_path="$new_path"
61776  # Check if we need to convert this using DOS-style short mode. If the path
61777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61778  # take no chances and rewrite it.
61779  # Note: m4 eats our [], so we need to use [ and ] instead.
61780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61781  if test "x$has_forbidden_chars" != x; then
61782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61783    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61784    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61785    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61786      # Going to short mode and back again did indeed matter. Since short mode is
61787      # case insensitive, let's make it lowercase to improve readability.
61788      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61789      # Now convert it back to Unix-style (cygpath)
61790      input_path=`$CYGPATH -u "$shortmode_path"`
61791      new_path="$input_path"
61792    fi
61793  fi
61794
61795  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61796  if test "x$test_cygdrive_prefix" = x; then
61797    # As a simple fix, exclude /usr/bin since it's not a real path.
61798    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61799      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61800      # a path prefixed by /cygdrive for fixpath to work.
61801      new_path="$CYGWIN_ROOT_PATH$input_path"
61802    fi
61803  fi
61804
61805
61806  if test "x$path" != "x$new_path"; then
61807    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61809$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61810  fi
61811
61812    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61813
61814  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61815  has_colon=`$ECHO $path | $GREP ^.:`
61816  new_path="$path"
61817  if test "x$has_colon" = x; then
61818    # Not in mixed or Windows style, start by that.
61819    new_path=`cmd //c echo $path`
61820  fi
61821
61822
61823  input_path="$new_path"
61824  # Check if we need to convert this using DOS-style short mode. If the path
61825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61826  # take no chances and rewrite it.
61827  # Note: m4 eats our [], so we need to use [ and ] instead.
61828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61829  if test "x$has_forbidden_chars" != x; then
61830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61832  fi
61833
61834
61835  windows_path="$new_path"
61836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61837    unix_path=`$CYGPATH -u "$windows_path"`
61838    new_path="$unix_path"
61839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61841    new_path="$unix_path"
61842  fi
61843
61844  if test "x$path" != "x$new_path"; then
61845    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61847$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61848  fi
61849
61850  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61851  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61852
61853    else
61854      # We're on a unix platform. Hooray! :)
61855      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61856      has_space=`$ECHO "$path" | $GREP " "`
61857      if test "x$has_space" != x; then
61858        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61859$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61860        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61861      fi
61862
61863      # Use eval to expand a potential ~
61864      eval path="$path"
61865      if test ! -f "$path" && test ! -d "$path"; then
61866        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61867      fi
61868
61869      if test -d "$path"; then
61870        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61871      else
61872        dir="`$DIRNAME "$path"`"
61873        base="`$BASENAME "$path"`"
61874        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61875      fi
61876    fi
61877  fi
61878
61879
61880  # Only process if variable expands to non-empty
61881
61882  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61883    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61884
61885  # Input might be given as Windows format, start by converting to
61886  # unix format.
61887  path="$POTENTIAL_FREETYPE_LIB_PATH"
61888  new_path=`$CYGPATH -u "$path"`
61889
61890  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61891  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61892  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61893  # "foo.exe" is OK but "foo" is an error.
61894  #
61895  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61896  # It is also a way to make sure we got the proper file name for the real test later on.
61897  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61898  if test "x$test_shortpath" = x; then
61899    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61900$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61901    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61902  fi
61903
61904  # Call helper function which possibly converts this using DOS-style short mode.
61905  # If so, the updated path is stored in $new_path.
61906
61907  input_path="$new_path"
61908  # Check if we need to convert this using DOS-style short mode. If the path
61909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61910  # take no chances and rewrite it.
61911  # Note: m4 eats our [], so we need to use [ and ] instead.
61912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61913  if test "x$has_forbidden_chars" != x; then
61914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61915    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61916    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61917    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61918      # Going to short mode and back again did indeed matter. Since short mode is
61919      # case insensitive, let's make it lowercase to improve readability.
61920      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61921      # Now convert it back to Unix-style (cygpath)
61922      input_path=`$CYGPATH -u "$shortmode_path"`
61923      new_path="$input_path"
61924    fi
61925  fi
61926
61927  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61928  if test "x$test_cygdrive_prefix" = x; then
61929    # As a simple fix, exclude /usr/bin since it's not a real path.
61930    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61931      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61932      # a path prefixed by /cygdrive for fixpath to work.
61933      new_path="$CYGWIN_ROOT_PATH$input_path"
61934    fi
61935  fi
61936
61937
61938  if test "x$path" != "x$new_path"; then
61939    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61941$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61942  fi
61943
61944    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61945
61946  path="$POTENTIAL_FREETYPE_LIB_PATH"
61947  has_colon=`$ECHO $path | $GREP ^.:`
61948  new_path="$path"
61949  if test "x$has_colon" = x; then
61950    # Not in mixed or Windows style, start by that.
61951    new_path=`cmd //c echo $path`
61952  fi
61953
61954
61955  input_path="$new_path"
61956  # Check if we need to convert this using DOS-style short mode. If the path
61957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61958  # take no chances and rewrite it.
61959  # Note: m4 eats our [], so we need to use [ and ] instead.
61960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61961  if test "x$has_forbidden_chars" != x; then
61962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61963    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61964  fi
61965
61966
61967  windows_path="$new_path"
61968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61969    unix_path=`$CYGPATH -u "$windows_path"`
61970    new_path="$unix_path"
61971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61973    new_path="$unix_path"
61974  fi
61975
61976  if test "x$path" != "x$new_path"; then
61977    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61979$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61980  fi
61981
61982  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61983  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61984
61985    else
61986      # We're on a unix platform. Hooray! :)
61987      path="$POTENTIAL_FREETYPE_LIB_PATH"
61988      has_space=`$ECHO "$path" | $GREP " "`
61989      if test "x$has_space" != x; then
61990        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61991$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61992        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61993      fi
61994
61995      # Use eval to expand a potential ~
61996      eval path="$path"
61997      if test ! -f "$path" && test ! -d "$path"; then
61998        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61999      fi
62000
62001      if test -d "$path"; then
62002        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62003      else
62004        dir="`$DIRNAME "$path"`"
62005        base="`$BASENAME "$path"`"
62006        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62007      fi
62008    fi
62009  fi
62010
62011
62012    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62013    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62014$as_echo_n "checking for freetype includes... " >&6; }
62015    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62016$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62017    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62018    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62019$as_echo_n "checking for freetype libraries... " >&6; }
62020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62021$as_echo "$FREETYPE_LIB_PATH" >&6; }
62022  fi
62023
62024              fi
62025            fi
62026          fi
62027        fi
62028      fi # end check in well-known locations
62029
62030      if test "x$FOUND_FREETYPE" != xyes; then
62031
62032  # Print a helpful message on how to acquire the necessary build dependency.
62033  # freetype is the help tag: freetype, cups, alsa etc
62034  MISSING_DEPENDENCY=freetype
62035
62036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62037    cygwin_help $MISSING_DEPENDENCY
62038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62039    msys_help $MISSING_DEPENDENCY
62040  else
62041    PKGHANDLER_COMMAND=
62042
62043    case $PKGHANDLER in
62044      apt-get)
62045        apt_help     $MISSING_DEPENDENCY ;;
62046      yum)
62047        yum_help     $MISSING_DEPENDENCY ;;
62048      port)
62049        port_help    $MISSING_DEPENDENCY ;;
62050      pkgutil)
62051        pkgutil_help $MISSING_DEPENDENCY ;;
62052      pkgadd)
62053        pkgadd_help  $MISSING_DEPENDENCY ;;
62054    esac
62055
62056    if test "x$PKGHANDLER_COMMAND" != x; then
62057      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62058    fi
62059  fi
62060
62061        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62062      fi
62063    fi # end user specified settings
62064
62065    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62066    if test "x$FREETYPE_CFLAGS" = x; then
62067
62068  # Only process if variable expands to non-empty
62069
62070  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62071    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62072
62073  # Input might be given as Windows format, start by converting to
62074  # unix format.
62075  path="$FREETYPE_INCLUDE_PATH"
62076  new_path=`$CYGPATH -u "$path"`
62077
62078  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62079  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62080  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62081  # "foo.exe" is OK but "foo" is an error.
62082  #
62083  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62084  # It is also a way to make sure we got the proper file name for the real test later on.
62085  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62086  if test "x$test_shortpath" = x; then
62087    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62088$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62089    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62090  fi
62091
62092  # Call helper function which possibly converts this using DOS-style short mode.
62093  # If so, the updated path is stored in $new_path.
62094
62095  input_path="$new_path"
62096  # Check if we need to convert this using DOS-style short mode. If the path
62097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62098  # take no chances and rewrite it.
62099  # Note: m4 eats our [], so we need to use [ and ] instead.
62100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62101  if test "x$has_forbidden_chars" != x; then
62102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62103    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62104    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62105    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62106      # Going to short mode and back again did indeed matter. Since short mode is
62107      # case insensitive, let's make it lowercase to improve readability.
62108      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62109      # Now convert it back to Unix-style (cygpath)
62110      input_path=`$CYGPATH -u "$shortmode_path"`
62111      new_path="$input_path"
62112    fi
62113  fi
62114
62115  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62116  if test "x$test_cygdrive_prefix" = x; then
62117    # As a simple fix, exclude /usr/bin since it's not a real path.
62118    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62119      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62120      # a path prefixed by /cygdrive for fixpath to work.
62121      new_path="$CYGWIN_ROOT_PATH$input_path"
62122    fi
62123  fi
62124
62125
62126  if test "x$path" != "x$new_path"; then
62127    FREETYPE_INCLUDE_PATH="$new_path"
62128    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62129$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62130  fi
62131
62132    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62133
62134  path="$FREETYPE_INCLUDE_PATH"
62135  has_colon=`$ECHO $path | $GREP ^.:`
62136  new_path="$path"
62137  if test "x$has_colon" = x; then
62138    # Not in mixed or Windows style, start by that.
62139    new_path=`cmd //c echo $path`
62140  fi
62141
62142
62143  input_path="$new_path"
62144  # Check if we need to convert this using DOS-style short mode. If the path
62145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62146  # take no chances and rewrite it.
62147  # Note: m4 eats our [], so we need to use [ and ] instead.
62148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62149  if test "x$has_forbidden_chars" != x; then
62150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62151    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62152  fi
62153
62154
62155  windows_path="$new_path"
62156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62157    unix_path=`$CYGPATH -u "$windows_path"`
62158    new_path="$unix_path"
62159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62161    new_path="$unix_path"
62162  fi
62163
62164  if test "x$path" != "x$new_path"; then
62165    FREETYPE_INCLUDE_PATH="$new_path"
62166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62167$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62168  fi
62169
62170  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62171  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62172
62173    else
62174      # We're on a unix platform. Hooray! :)
62175      path="$FREETYPE_INCLUDE_PATH"
62176      has_space=`$ECHO "$path" | $GREP " "`
62177      if test "x$has_space" != x; then
62178        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62179$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62180        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62181      fi
62182
62183      # Use eval to expand a potential ~
62184      eval path="$path"
62185      if test ! -f "$path" && test ! -d "$path"; then
62186        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62187      fi
62188
62189      if test -d "$path"; then
62190        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62191      else
62192        dir="`$DIRNAME "$path"`"
62193        base="`$BASENAME "$path"`"
62194        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62195      fi
62196    fi
62197  fi
62198
62199      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62200        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62201      else
62202        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62203      fi
62204    fi
62205
62206    if test "x$FREETYPE_LIBS" = x; then
62207
62208  # Only process if variable expands to non-empty
62209
62210  if test "x$FREETYPE_LIB_PATH" != x; then
62211    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62212
62213  # Input might be given as Windows format, start by converting to
62214  # unix format.
62215  path="$FREETYPE_LIB_PATH"
62216  new_path=`$CYGPATH -u "$path"`
62217
62218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62221  # "foo.exe" is OK but "foo" is an error.
62222  #
62223  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62224  # It is also a way to make sure we got the proper file name for the real test later on.
62225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62226  if test "x$test_shortpath" = x; then
62227    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62228$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62229    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62230  fi
62231
62232  # Call helper function which possibly converts this using DOS-style short mode.
62233  # If so, the updated path is stored in $new_path.
62234
62235  input_path="$new_path"
62236  # Check if we need to convert this using DOS-style short mode. If the path
62237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62238  # take no chances and rewrite it.
62239  # Note: m4 eats our [], so we need to use [ and ] instead.
62240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62241  if test "x$has_forbidden_chars" != x; then
62242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62246      # Going to short mode and back again did indeed matter. Since short mode is
62247      # case insensitive, let's make it lowercase to improve readability.
62248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62249      # Now convert it back to Unix-style (cygpath)
62250      input_path=`$CYGPATH -u "$shortmode_path"`
62251      new_path="$input_path"
62252    fi
62253  fi
62254
62255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62256  if test "x$test_cygdrive_prefix" = x; then
62257    # As a simple fix, exclude /usr/bin since it's not a real path.
62258    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62260      # a path prefixed by /cygdrive for fixpath to work.
62261      new_path="$CYGWIN_ROOT_PATH$input_path"
62262    fi
62263  fi
62264
62265
62266  if test "x$path" != "x$new_path"; then
62267    FREETYPE_LIB_PATH="$new_path"
62268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62269$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62270  fi
62271
62272    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62273
62274  path="$FREETYPE_LIB_PATH"
62275  has_colon=`$ECHO $path | $GREP ^.:`
62276  new_path="$path"
62277  if test "x$has_colon" = x; then
62278    # Not in mixed or Windows style, start by that.
62279    new_path=`cmd //c echo $path`
62280  fi
62281
62282
62283  input_path="$new_path"
62284  # Check if we need to convert this using DOS-style short mode. If the path
62285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62286  # take no chances and rewrite it.
62287  # Note: m4 eats our [], so we need to use [ and ] instead.
62288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62289  if test "x$has_forbidden_chars" != x; then
62290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62291    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62292  fi
62293
62294
62295  windows_path="$new_path"
62296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62297    unix_path=`$CYGPATH -u "$windows_path"`
62298    new_path="$unix_path"
62299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62301    new_path="$unix_path"
62302  fi
62303
62304  if test "x$path" != "x$new_path"; then
62305    FREETYPE_LIB_PATH="$new_path"
62306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62307$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62308  fi
62309
62310  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62311  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62312
62313    else
62314      # We're on a unix platform. Hooray! :)
62315      path="$FREETYPE_LIB_PATH"
62316      has_space=`$ECHO "$path" | $GREP " "`
62317      if test "x$has_space" != x; then
62318        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62319$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62320        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62321      fi
62322
62323      # Use eval to expand a potential ~
62324      eval path="$path"
62325      if test ! -f "$path" && test ! -d "$path"; then
62326        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62327      fi
62328
62329      if test -d "$path"; then
62330        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62331      else
62332        dir="`$DIRNAME "$path"`"
62333        base="`$BASENAME "$path"`"
62334        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62335      fi
62336    fi
62337  fi
62338
62339      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62340        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62341      else
62342        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62343      fi
62344    fi
62345
62346    # Try to compile it
62347    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62348$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62349    ac_ext=cpp
62350ac_cpp='$CXXCPP $CPPFLAGS'
62351ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62352ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62353ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62354
62355    PREV_CXXCFLAGS="$CXXFLAGS"
62356    PREV_LIBS="$LIBS"
62357    PREV_CXX="$CXX"
62358    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62359    LIBS="$LIBS $FREETYPE_LIBS"
62360    CXX="$FIXPATH $CXX"
62361    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62362/* end confdefs.h.  */
62363
62364          #include<ft2build.h>
62365          #include FT_FREETYPE_H
62366          int main () {
62367            FT_Init_FreeType(NULL);
62368            return 0;
62369          }
62370
62371_ACEOF
62372if ac_fn_cxx_try_link "$LINENO"; then :
62373
62374          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62375$as_echo "yes" >&6; }
62376
62377else
62378
62379          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62380$as_echo "no" >&6; }
62381          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62382$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62383          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62384$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62385
62386
62387  # Print a helpful message on how to acquire the necessary build dependency.
62388  # freetype is the help tag: freetype, cups, alsa etc
62389  MISSING_DEPENDENCY=freetype
62390
62391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62392    cygwin_help $MISSING_DEPENDENCY
62393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62394    msys_help $MISSING_DEPENDENCY
62395  else
62396    PKGHANDLER_COMMAND=
62397
62398    case $PKGHANDLER in
62399      apt-get)
62400        apt_help     $MISSING_DEPENDENCY ;;
62401      yum)
62402        yum_help     $MISSING_DEPENDENCY ;;
62403      port)
62404        port_help    $MISSING_DEPENDENCY ;;
62405      pkgutil)
62406        pkgutil_help $MISSING_DEPENDENCY ;;
62407      pkgadd)
62408        pkgadd_help  $MISSING_DEPENDENCY ;;
62409    esac
62410
62411    if test "x$PKGHANDLER_COMMAND" != x; then
62412      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62413    fi
62414  fi
62415
62416
62417          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62418
62419
62420fi
62421rm -f core conftest.err conftest.$ac_objext \
62422    conftest$ac_exeext conftest.$ac_ext
62423    CXXCFLAGS="$PREV_CXXFLAGS"
62424    LIBS="$PREV_LIBS"
62425    CXX="$PREV_CXX"
62426    ac_ext=cpp
62427ac_cpp='$CXXCPP $CPPFLAGS'
62428ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62429ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62430ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62431
62432
62433    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62434$as_echo_n "checking if we should bundle freetype... " >&6; }
62435    if test "x$BUNDLE_FREETYPE" = xyes; then
62436      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62437    fi
62438    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62439$as_echo "$BUNDLE_FREETYPE" >&6; }
62440
62441  fi # end freetype needed
62442
62443
62444
62445
62446
62447
62448
62449# Check whether --with-alsa was given.
62450if test "${with_alsa+set}" = set; then :
62451  withval=$with_alsa;
62452fi
62453
62454
62455# Check whether --with-alsa-include was given.
62456if test "${with_alsa_include+set}" = set; then :
62457  withval=$with_alsa_include;
62458fi
62459
62460
62461# Check whether --with-alsa-lib was given.
62462if test "${with_alsa_lib+set}" = set; then :
62463  withval=$with_alsa_lib;
62464fi
62465
62466
62467  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62468    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62469        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62470        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62471      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62472$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62473    fi
62474    ALSA_CFLAGS=
62475    ALSA_LIBS=
62476  else
62477    ALSA_FOUND=no
62478
62479    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62480      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62481    fi
62482
62483    if test "x${with_alsa}" != x; then
62484      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62485      ALSA_CFLAGS="-I${with_alsa}/include"
62486      ALSA_FOUND=yes
62487    fi
62488    if test "x${with_alsa_include}" != x; then
62489      ALSA_CFLAGS="-I${with_alsa_include}"
62490      ALSA_FOUND=yes
62491    fi
62492    if test "x${with_alsa_lib}" != x; then
62493      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62494      ALSA_FOUND=yes
62495    fi
62496    # Do not try pkg-config if we have a sysroot set.
62497    if test "x$SYSROOT" = x; then
62498      if test "x$ALSA_FOUND" = xno; then
62499
62500pkg_failed=no
62501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62502$as_echo_n "checking for ALSA... " >&6; }
62503
62504if test -n "$ALSA_CFLAGS"; then
62505    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62506 elif test -n "$PKG_CONFIG"; then
62507    if test -n "$PKG_CONFIG" && \
62508    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62509  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62510  ac_status=$?
62511  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62512  test $ac_status = 0; }; then
62513  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62514else
62515  pkg_failed=yes
62516fi
62517 else
62518    pkg_failed=untried
62519fi
62520if test -n "$ALSA_LIBS"; then
62521    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62522 elif test -n "$PKG_CONFIG"; then
62523    if test -n "$PKG_CONFIG" && \
62524    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62525  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62526  ac_status=$?
62527  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62528  test $ac_status = 0; }; then
62529  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62530else
62531  pkg_failed=yes
62532fi
62533 else
62534    pkg_failed=untried
62535fi
62536
62537
62538
62539if test $pkg_failed = yes; then
62540
62541if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62542        _pkg_short_errors_supported=yes
62543else
62544        _pkg_short_errors_supported=no
62545fi
62546        if test $_pkg_short_errors_supported = yes; then
62547	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62548        else
62549	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62550        fi
62551	# Put the nasty error message in config.log where it belongs
62552	echo "$ALSA_PKG_ERRORS" >&5
62553
62554	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62555$as_echo "no" >&6; }
62556                ALSA_FOUND=no
62557elif test $pkg_failed = untried; then
62558	ALSA_FOUND=no
62559else
62560	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62561	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62562        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62563$as_echo "yes" >&6; }
62564	ALSA_FOUND=yes
62565fi
62566      fi
62567    fi
62568    if test "x$ALSA_FOUND" = xno; then
62569      for ac_header in alsa/asoundlib.h
62570do :
62571  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62572if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62573  cat >>confdefs.h <<_ACEOF
62574#define HAVE_ALSA_ASOUNDLIB_H 1
62575_ACEOF
62576
62577            ALSA_FOUND=yes
62578            ALSA_CFLAGS=-Iignoreme
62579            ALSA_LIBS=-lasound
62580            DEFAULT_ALSA=yes
62581
62582else
62583  ALSA_FOUND=no
62584
62585fi
62586
62587done
62588
62589    fi
62590    if test "x$ALSA_FOUND" = xno; then
62591
62592  # Print a helpful message on how to acquire the necessary build dependency.
62593  # alsa is the help tag: freetype, cups, alsa etc
62594  MISSING_DEPENDENCY=alsa
62595
62596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62597    cygwin_help $MISSING_DEPENDENCY
62598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62599    msys_help $MISSING_DEPENDENCY
62600  else
62601    PKGHANDLER_COMMAND=
62602
62603    case $PKGHANDLER in
62604      apt-get)
62605        apt_help     $MISSING_DEPENDENCY ;;
62606      yum)
62607        yum_help     $MISSING_DEPENDENCY ;;
62608      port)
62609        port_help    $MISSING_DEPENDENCY ;;
62610      pkgutil)
62611        pkgutil_help $MISSING_DEPENDENCY ;;
62612      pkgadd)
62613        pkgadd_help  $MISSING_DEPENDENCY ;;
62614    esac
62615
62616    if test "x$PKGHANDLER_COMMAND" != x; then
62617      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62618    fi
62619  fi
62620
62621      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62622    fi
62623  fi
62624
62625
62626
62627
62628
62629
62630# Check whether --with-libffi was given.
62631if test "${with_libffi+set}" = set; then :
62632  withval=$with_libffi;
62633fi
62634
62635
62636# Check whether --with-libffi-include was given.
62637if test "${with_libffi_include+set}" = set; then :
62638  withval=$with_libffi_include;
62639fi
62640
62641
62642# Check whether --with-libffi-lib was given.
62643if test "${with_libffi_lib+set}" = set; then :
62644  withval=$with_libffi_lib;
62645fi
62646
62647  # Check whether --enable-libffi-bundling was given.
62648if test "${enable_libffi_bundling+set}" = set; then :
62649  enableval=$enable_libffi_bundling;
62650fi
62651
62652
62653  if test "x$NEEDS_LIB_FFI" = xfalse; then
62654    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62655        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62656        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62657      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62658$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62659    fi
62660    LIBFFI_CFLAGS=
62661    LIBFFI_LIBS=
62662  else
62663    LIBFFI_FOUND=no
62664
62665    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62666      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62667    fi
62668
62669    if test "x${with_libffi}" != x; then
62670      LIBFFI_LIB_PATH="${with_libffi}/lib"
62671      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62672      LIBFFI_CFLAGS="-I${with_libffi}/include"
62673      LIBFFI_FOUND=yes
62674    fi
62675    if test "x${with_libffi_include}" != x; then
62676      LIBFFI_CFLAGS="-I${with_libffi_include}"
62677      LIBFFI_FOUND=yes
62678    fi
62679    if test "x${with_libffi_lib}" != x; then
62680      LIBFFI_LIB_PATH="${with_libffi_lib}"
62681      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62682      LIBFFI_FOUND=yes
62683    fi
62684    # Do not try pkg-config if we have a sysroot set.
62685    if test "x$SYSROOT" = x; then
62686      if test "x$LIBFFI_FOUND" = xno; then
62687        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62688
62689pkg_failed=no
62690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62691$as_echo_n "checking for LIBFFI... " >&6; }
62692
62693if test -n "$LIBFFI_CFLAGS"; then
62694    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62695 elif test -n "$PKG_CONFIG"; then
62696    if test -n "$PKG_CONFIG" && \
62697    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62698  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62699  ac_status=$?
62700  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62701  test $ac_status = 0; }; then
62702  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62703else
62704  pkg_failed=yes
62705fi
62706 else
62707    pkg_failed=untried
62708fi
62709if test -n "$LIBFFI_LIBS"; then
62710    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62711 elif test -n "$PKG_CONFIG"; then
62712    if test -n "$PKG_CONFIG" && \
62713    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62714  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62715  ac_status=$?
62716  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62717  test $ac_status = 0; }; then
62718  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62719else
62720  pkg_failed=yes
62721fi
62722 else
62723    pkg_failed=untried
62724fi
62725
62726
62727
62728if test $pkg_failed = yes; then
62729
62730if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62731        _pkg_short_errors_supported=yes
62732else
62733        _pkg_short_errors_supported=no
62734fi
62735        if test $_pkg_short_errors_supported = yes; then
62736	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62737        else
62738	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62739        fi
62740	# Put the nasty error message in config.log where it belongs
62741	echo "$LIBFFI_PKG_ERRORS" >&5
62742
62743	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62744$as_echo "no" >&6; }
62745                LIBFFI_FOUND=no
62746elif test $pkg_failed = untried; then
62747	LIBFFI_FOUND=no
62748else
62749	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62750	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62752$as_echo "yes" >&6; }
62753	LIBFFI_FOUND=yes
62754fi
62755      fi
62756    fi
62757    if test "x$LIBFFI_FOUND" = xno; then
62758      for ac_header in ffi.h
62759do :
62760  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62761if test "x$ac_cv_header_ffi_h" = xyes; then :
62762  cat >>confdefs.h <<_ACEOF
62763#define HAVE_FFI_H 1
62764_ACEOF
62765
62766            LIBFFI_FOUND=yes
62767            LIBFFI_CFLAGS=
62768            LIBFFI_LIBS=-lffi
62769
62770else
62771  LIBFFI_FOUND=no
62772
62773fi
62774
62775done
62776
62777    fi
62778    if test "x$LIBFFI_FOUND" = xno; then
62779
62780  # Print a helpful message on how to acquire the necessary build dependency.
62781  # ffi is the help tag: freetype, cups, alsa etc
62782  MISSING_DEPENDENCY=ffi
62783
62784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62785    cygwin_help $MISSING_DEPENDENCY
62786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62787    msys_help $MISSING_DEPENDENCY
62788  else
62789    PKGHANDLER_COMMAND=
62790
62791    case $PKGHANDLER in
62792      apt-get)
62793        apt_help     $MISSING_DEPENDENCY ;;
62794      yum)
62795        yum_help     $MISSING_DEPENDENCY ;;
62796      port)
62797        port_help    $MISSING_DEPENDENCY ;;
62798      pkgutil)
62799        pkgutil_help $MISSING_DEPENDENCY ;;
62800      pkgadd)
62801        pkgadd_help  $MISSING_DEPENDENCY ;;
62802    esac
62803
62804    if test "x$PKGHANDLER_COMMAND" != x; then
62805      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62806    fi
62807  fi
62808
62809      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62810    fi
62811
62812    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62813$as_echo_n "checking if libffi works... " >&6; }
62814    ac_ext=c
62815ac_cpp='$CPP $CPPFLAGS'
62816ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62817ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62818ac_compiler_gnu=$ac_cv_c_compiler_gnu
62819
62820    OLD_CFLAGS="$CFLAGS"
62821    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62822    OLD_LIBS="$LIBS"
62823    LIBS="$LIBS $LIBFFI_LIBS"
62824    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62825/* end confdefs.h.  */
62826#include <ffi.h>
62827int
62828main ()
62829{
62830
62831          ffi_call(NULL, NULL, NULL, NULL);
62832          return 0;
62833
62834  ;
62835  return 0;
62836}
62837_ACEOF
62838if ac_fn_c_try_link "$LINENO"; then :
62839  LIBFFI_WORKS=yes
62840else
62841  LIBFFI_WORKS=no
62842
62843fi
62844rm -f core conftest.err conftest.$ac_objext \
62845    conftest$ac_exeext conftest.$ac_ext
62846    CFLAGS="$OLD_CFLAGS"
62847    LIBS="$OLD_LIBS"
62848    ac_ext=cpp
62849ac_cpp='$CXXCPP $CPPFLAGS'
62850ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62851ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62852ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62853
62854    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62855$as_echo "$LIBFFI_WORKS" >&6; }
62856
62857    if test "x$LIBFFI_WORKS" = xno; then
62858
62859  # Print a helpful message on how to acquire the necessary build dependency.
62860  # ffi is the help tag: freetype, cups, alsa etc
62861  MISSING_DEPENDENCY=ffi
62862
62863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62864    cygwin_help $MISSING_DEPENDENCY
62865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62866    msys_help $MISSING_DEPENDENCY
62867  else
62868    PKGHANDLER_COMMAND=
62869
62870    case $PKGHANDLER in
62871      apt-get)
62872        apt_help     $MISSING_DEPENDENCY ;;
62873      yum)
62874        yum_help     $MISSING_DEPENDENCY ;;
62875      port)
62876        port_help    $MISSING_DEPENDENCY ;;
62877      pkgutil)
62878        pkgutil_help $MISSING_DEPENDENCY ;;
62879      pkgadd)
62880        pkgadd_help  $MISSING_DEPENDENCY ;;
62881    esac
62882
62883    if test "x$PKGHANDLER_COMMAND" != x; then
62884      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62885    fi
62886  fi
62887
62888      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62889    fi
62890
62891    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
62892$as_echo_n "checking if libffi should be bundled... " >&6; }
62893    if test "x$enable_libffi_bundling" = "x"; then
62894      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62895$as_echo "no" >&6; }
62896      ENABLE_LIBFFI_BUNDLING=false
62897    elif  test "x$enable_libffi_bundling" = "xno"; then
62898      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
62899$as_echo "no, forced" >&6; }
62900      ENABLE_LIBFFI_BUNDLING=false
62901    elif  test "x$enable_libffi_bundling" = "xyes"; then
62902      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
62903$as_echo "yes, forced" >&6; }
62904      ENABLE_LIBFFI_BUNDLING=true
62905    else
62906      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
62907    fi
62908
62909    # Find the libffi.so.X to bundle
62910    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
62911      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
62912$as_echo_n "checking for libffi lib file location... " >&6; }
62913      if test "x${LIBFFI_LIB_PATH}" != x; then
62914        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
62915          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
62916        else
62917          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
62918        fi
62919      else
62920        # If we don't have an explicit path, look in a few obvious places
62921        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
62922          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
62923            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
62924          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
62925            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
62926          else
62927            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
62928          fi
62929        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
62930          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
62931            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
62932          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
62933            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
62934          else
62935            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
62936          fi
62937        else
62938          # Fallback on the default /usr/lib dir
62939          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
62940            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
62941          else
62942            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
62943          fi
62944        fi
62945      fi
62946      # Make sure the wildcard is evaluated
62947      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
62948      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
62949$as_echo "${LIBFFI_LIB_FILE}" >&6; }
62950    fi
62951  fi
62952
62953
62954
62955
62956
62957
62958
62959  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
62960    # Extract the first word of "llvm-config", so it can be a program name with args.
62961set dummy llvm-config; ac_word=$2
62962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62963$as_echo_n "checking for $ac_word... " >&6; }
62964if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
62965  $as_echo_n "(cached) " >&6
62966else
62967  if test -n "$LLVM_CONFIG"; then
62968  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
62969else
62970as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62971for as_dir in $PATH
62972do
62973  IFS=$as_save_IFS
62974  test -z "$as_dir" && as_dir=.
62975    for ac_exec_ext in '' $ac_executable_extensions; do
62976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62977    ac_cv_prog_LLVM_CONFIG="llvm-config"
62978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62979    break 2
62980  fi
62981done
62982  done
62983IFS=$as_save_IFS
62984
62985fi
62986fi
62987LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
62988if test -n "$LLVM_CONFIG"; then
62989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
62990$as_echo "$LLVM_CONFIG" >&6; }
62991else
62992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62993$as_echo "no" >&6; }
62994fi
62995
62996
62997
62998    if test "x$LLVM_CONFIG" != xllvm-config; then
62999      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63000    fi
63001
63002    llvm_components="jit mcjit engine nativecodegen native"
63003    unset LLVM_CFLAGS
63004    for flag in $("$LLVM_CONFIG" --cxxflags); do
63005      if echo "${flag}" | grep -q '^-[ID]'; then
63006        if test "${flag}" != "-D_DEBUG" ; then
63007          if test "${LLVM_CFLAGS}" != "" ; then
63008            LLVM_CFLAGS="${LLVM_CFLAGS} "
63009          fi
63010          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63011        fi
63012      fi
63013    done
63014    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63015    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63016
63017    unset LLVM_LDFLAGS
63018    for flag in $("${LLVM_CONFIG}" --ldflags); do
63019      if echo "${flag}" | grep -q '^-L'; then
63020        if test "${LLVM_LDFLAGS}" != ""; then
63021          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63022        fi
63023        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63024      fi
63025    done
63026
63027    unset LLVM_LIBS
63028    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63029      if echo "${flag}" | grep -q '^-l'; then
63030        if test "${LLVM_LIBS}" != ""; then
63031          LLVM_LIBS="${LLVM_LIBS} "
63032        fi
63033        LLVM_LIBS="${LLVM_LIBS}${flag}"
63034      fi
63035    done
63036
63037    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63038    # always properly detect -ltinfo
63039    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63040
63041
63042
63043
63044  fi
63045
63046
63047
63048# Check whether --with-libjpeg was given.
63049if test "${with_libjpeg+set}" = set; then :
63050  withval=$with_libjpeg;
63051fi
63052
63053
63054  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63055$as_echo_n "checking for which libjpeg to use... " >&6; }
63056  # default is bundled
63057  DEFAULT_LIBJPEG=bundled
63058  # if user didn't specify, use DEFAULT_LIBJPEG
63059  if test "x${with_libjpeg}" = "x"; then
63060    with_libjpeg=${DEFAULT_LIBJPEG}
63061  fi
63062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63063$as_echo "${with_libjpeg}" >&6; }
63064
63065  if test "x${with_libjpeg}" = "xbundled"; then
63066    USE_EXTERNAL_LIBJPEG=false
63067  elif test "x${with_libjpeg}" = "xsystem"; then
63068    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63069if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63070
63071else
63072   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63073fi
63074
63075
63076    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63077$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63078if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63079  $as_echo_n "(cached) " >&6
63080else
63081  ac_check_lib_save_LIBS=$LIBS
63082LIBS="-ljpeg  $LIBS"
63083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63084/* end confdefs.h.  */
63085
63086/* Override any GCC internal prototype to avoid an error.
63087   Use char because int might match the return type of a GCC
63088   builtin and then its argument prototype would still apply.  */
63089#ifdef __cplusplus
63090extern "C"
63091#endif
63092char jpeg_CreateDecompress ();
63093int
63094main ()
63095{
63096return jpeg_CreateDecompress ();
63097  ;
63098  return 0;
63099}
63100_ACEOF
63101if ac_fn_cxx_try_link "$LINENO"; then :
63102  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63103else
63104  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63105fi
63106rm -f core conftest.err conftest.$ac_objext \
63107    conftest$ac_exeext conftest.$ac_ext
63108LIBS=$ac_check_lib_save_LIBS
63109fi
63110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63111$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63112if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63113  cat >>confdefs.h <<_ACEOF
63114#define HAVE_LIBJPEG 1
63115_ACEOF
63116
63117  LIBS="-ljpeg $LIBS"
63118
63119else
63120   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63121fi
63122
63123
63124    USE_EXTERNAL_LIBJPEG=true
63125  else
63126    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63127  fi
63128
63129
63130
63131
63132
63133# Check whether --with-giflib was given.
63134if test "${with_giflib+set}" = set; then :
63135  withval=$with_giflib;
63136fi
63137
63138
63139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63140$as_echo_n "checking for which giflib to use... " >&6; }
63141  # default is bundled
63142  DEFAULT_GIFLIB=bundled
63143  # if user didn't specify, use DEFAULT_GIFLIB
63144  if test "x${with_giflib}" = "x"; then
63145    with_giflib=${DEFAULT_GIFLIB}
63146  fi
63147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63148$as_echo "${with_giflib}" >&6; }
63149
63150  if test "x${with_giflib}" = "xbundled"; then
63151    USE_EXTERNAL_LIBGIF=false
63152  elif test "x${with_giflib}" = "xsystem"; then
63153    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63154if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63155
63156else
63157   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63158fi
63159
63160
63161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63162$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63163if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63164  $as_echo_n "(cached) " >&6
63165else
63166  ac_check_lib_save_LIBS=$LIBS
63167LIBS="-lgif  $LIBS"
63168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63169/* end confdefs.h.  */
63170
63171/* Override any GCC internal prototype to avoid an error.
63172   Use char because int might match the return type of a GCC
63173   builtin and then its argument prototype would still apply.  */
63174#ifdef __cplusplus
63175extern "C"
63176#endif
63177char DGifGetCode ();
63178int
63179main ()
63180{
63181return DGifGetCode ();
63182  ;
63183  return 0;
63184}
63185_ACEOF
63186if ac_fn_cxx_try_link "$LINENO"; then :
63187  ac_cv_lib_gif_DGifGetCode=yes
63188else
63189  ac_cv_lib_gif_DGifGetCode=no
63190fi
63191rm -f core conftest.err conftest.$ac_objext \
63192    conftest$ac_exeext conftest.$ac_ext
63193LIBS=$ac_check_lib_save_LIBS
63194fi
63195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63196$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63197if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63198  cat >>confdefs.h <<_ACEOF
63199#define HAVE_LIBGIF 1
63200_ACEOF
63201
63202  LIBS="-lgif $LIBS"
63203
63204else
63205   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63206fi
63207
63208
63209    USE_EXTERNAL_LIBGIF=true
63210  else
63211    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63212  fi
63213
63214
63215
63216
63217
63218# Check whether --with-libpng was given.
63219if test "${with_libpng+set}" = set; then :
63220  withval=$with_libpng;
63221fi
63222
63223
63224  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63225$as_echo_n "checking for which libpng to use... " >&6; }
63226
63227  # default is bundled
63228  DEFAULT_LIBPNG=bundled
63229  # if user didn't specify, use DEFAULT_LIBPNG
63230  if test "x${with_libpng}" = "x"; then
63231      with_libpng=${DEFAULT_LIBPNG}
63232  fi
63233
63234  if test "x${with_libpng}" = "xbundled"; then
63235      USE_EXTERNAL_LIBPNG=false
63236      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63237$as_echo "bundled" >&6; }
63238  elif test "x${with_libpng}" = "xsystem"; then
63239
63240pkg_failed=no
63241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63242$as_echo_n "checking for PNG... " >&6; }
63243
63244if test -n "$PNG_CFLAGS"; then
63245    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63246 elif test -n "$PKG_CONFIG"; then
63247    if test -n "$PKG_CONFIG" && \
63248    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63249  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63250  ac_status=$?
63251  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63252  test $ac_status = 0; }; then
63253  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63254else
63255  pkg_failed=yes
63256fi
63257 else
63258    pkg_failed=untried
63259fi
63260if test -n "$PNG_LIBS"; then
63261    pkg_cv_PNG_LIBS="$PNG_LIBS"
63262 elif test -n "$PKG_CONFIG"; then
63263    if test -n "$PKG_CONFIG" && \
63264    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63265  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63266  ac_status=$?
63267  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63268  test $ac_status = 0; }; then
63269  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63270else
63271  pkg_failed=yes
63272fi
63273 else
63274    pkg_failed=untried
63275fi
63276
63277
63278
63279if test $pkg_failed = yes; then
63280
63281if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63282        _pkg_short_errors_supported=yes
63283else
63284        _pkg_short_errors_supported=no
63285fi
63286        if test $_pkg_short_errors_supported = yes; then
63287	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63288        else
63289	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63290        fi
63291	# Put the nasty error message in config.log where it belongs
63292	echo "$PNG_PKG_ERRORS" >&5
63293
63294	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63295$as_echo "no" >&6; }
63296                 LIBPNG_FOUND=no
63297elif test $pkg_failed = untried; then
63298	 LIBPNG_FOUND=no
63299else
63300	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63301	PNG_LIBS=$pkg_cv_PNG_LIBS
63302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63303$as_echo "yes" >&6; }
63304	 LIBPNG_FOUND=yes
63305fi
63306      if test "x${LIBPNG_FOUND}" = "xyes"; then
63307          USE_EXTERNAL_LIBPNG=true
63308          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63309$as_echo "system" >&6; }
63310      else
63311          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63312$as_echo "system not found" >&6; }
63313          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63314      fi
63315  else
63316      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63317  fi
63318
63319
63320
63321
63322
63323# Check whether --with-zlib was given.
63324if test "${with_zlib+set}" = set; then :
63325  withval=$with_zlib;
63326fi
63327
63328
63329  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63330$as_echo_n "checking for compress in -lz... " >&6; }
63331if ${ac_cv_lib_z_compress+:} false; then :
63332  $as_echo_n "(cached) " >&6
63333else
63334  ac_check_lib_save_LIBS=$LIBS
63335LIBS="-lz  $LIBS"
63336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63337/* end confdefs.h.  */
63338
63339/* Override any GCC internal prototype to avoid an error.
63340   Use char because int might match the return type of a GCC
63341   builtin and then its argument prototype would still apply.  */
63342#ifdef __cplusplus
63343extern "C"
63344#endif
63345char compress ();
63346int
63347main ()
63348{
63349return compress ();
63350  ;
63351  return 0;
63352}
63353_ACEOF
63354if ac_fn_cxx_try_link "$LINENO"; then :
63355  ac_cv_lib_z_compress=yes
63356else
63357  ac_cv_lib_z_compress=no
63358fi
63359rm -f core conftest.err conftest.$ac_objext \
63360    conftest$ac_exeext conftest.$ac_ext
63361LIBS=$ac_check_lib_save_LIBS
63362fi
63363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63364$as_echo "$ac_cv_lib_z_compress" >&6; }
63365if test "x$ac_cv_lib_z_compress" = xyes; then :
63366   ZLIB_FOUND=yes
63367else
63368   ZLIB_FOUND=no
63369fi
63370
63371
63372  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63373$as_echo_n "checking for which zlib to use... " >&6; }
63374
63375  DEFAULT_ZLIB=system
63376  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63377    # On windows default is bundled...on others default is system
63378    DEFAULT_ZLIB=bundled
63379  fi
63380
63381  if test "x${ZLIB_FOUND}" != "xyes"; then
63382    # If we don't find any system...set default to bundled
63383    DEFAULT_ZLIB=bundled
63384  fi
63385
63386  # If user didn't specify, use DEFAULT_ZLIB
63387  if test "x${with_zlib}" = "x"; then
63388    with_zlib=${DEFAULT_ZLIB}
63389  fi
63390
63391  if test "x${with_zlib}" = "xbundled"; then
63392    USE_EXTERNAL_LIBZ=false
63393    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63394$as_echo "bundled" >&6; }
63395  elif test "x${with_zlib}" = "xsystem"; then
63396    if test "x${ZLIB_FOUND}" = "xyes"; then
63397      USE_EXTERNAL_LIBZ=true
63398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63399$as_echo "system" >&6; }
63400    else
63401      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63402$as_echo "system not found" >&6; }
63403      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63404    fi
63405  else
63406    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63407  fi
63408
63409
63410
63411
63412
63413# Check whether --with-lcms was given.
63414if test "${with_lcms+set}" = set; then :
63415  withval=$with_lcms;
63416fi
63417
63418
63419  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63420$as_echo_n "checking for which lcms to use... " >&6; }
63421
63422  DEFAULT_LCMS=bundled
63423  # If user didn't specify, use DEFAULT_LCMS
63424  if test "x${with_lcms}" = "x"; then
63425      with_lcms=${DEFAULT_LCMS}
63426  fi
63427
63428  if test "x${with_lcms}" = "xbundled"; then
63429    USE_EXTERNAL_LCMS=false
63430    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63431$as_echo "bundled" >&6; }
63432  elif test "x${with_lcms}" = "xsystem"; then
63433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63434$as_echo "system" >&6; }
63435
63436pkg_failed=no
63437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63438$as_echo_n "checking for LCMS... " >&6; }
63439
63440if test -n "$LCMS_CFLAGS"; then
63441    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63442 elif test -n "$PKG_CONFIG"; then
63443    if test -n "$PKG_CONFIG" && \
63444    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63445  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63446  ac_status=$?
63447  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63448  test $ac_status = 0; }; then
63449  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63450else
63451  pkg_failed=yes
63452fi
63453 else
63454    pkg_failed=untried
63455fi
63456if test -n "$LCMS_LIBS"; then
63457    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63458 elif test -n "$PKG_CONFIG"; then
63459    if test -n "$PKG_CONFIG" && \
63460    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63461  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63462  ac_status=$?
63463  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63464  test $ac_status = 0; }; then
63465  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63466else
63467  pkg_failed=yes
63468fi
63469 else
63470    pkg_failed=untried
63471fi
63472
63473
63474
63475if test $pkg_failed = yes; then
63476
63477if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63478        _pkg_short_errors_supported=yes
63479else
63480        _pkg_short_errors_supported=no
63481fi
63482        if test $_pkg_short_errors_supported = yes; then
63483	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63484        else
63485	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63486        fi
63487	# Put the nasty error message in config.log where it belongs
63488	echo "$LCMS_PKG_ERRORS" >&5
63489
63490	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63491$as_echo "no" >&6; }
63492                LCMS_FOUND=no
63493elif test $pkg_failed = untried; then
63494	LCMS_FOUND=no
63495else
63496	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63497	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63499$as_echo "yes" >&6; }
63500	LCMS_FOUND=yes
63501fi
63502    if test "x${LCMS_FOUND}" = "xyes"; then
63503      USE_EXTERNAL_LCMS=true
63504    else
63505      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63506    fi
63507  else
63508    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63509  fi
63510
63511
63512
63513
63514
63515
63516
63517
63518
63519
63520
63521  # Setup libm (the maths library)
63522  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63523    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63524$as_echo_n "checking for cos in -lm... " >&6; }
63525if ${ac_cv_lib_m_cos+:} false; then :
63526  $as_echo_n "(cached) " >&6
63527else
63528  ac_check_lib_save_LIBS=$LIBS
63529LIBS="-lm  $LIBS"
63530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63531/* end confdefs.h.  */
63532
63533/* Override any GCC internal prototype to avoid an error.
63534   Use char because int might match the return type of a GCC
63535   builtin and then its argument prototype would still apply.  */
63536#ifdef __cplusplus
63537extern "C"
63538#endif
63539char cos ();
63540int
63541main ()
63542{
63543return cos ();
63544  ;
63545  return 0;
63546}
63547_ACEOF
63548if ac_fn_cxx_try_link "$LINENO"; then :
63549  ac_cv_lib_m_cos=yes
63550else
63551  ac_cv_lib_m_cos=no
63552fi
63553rm -f core conftest.err conftest.$ac_objext \
63554    conftest$ac_exeext conftest.$ac_ext
63555LIBS=$ac_check_lib_save_LIBS
63556fi
63557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63558$as_echo "$ac_cv_lib_m_cos" >&6; }
63559if test "x$ac_cv_lib_m_cos" = xyes; then :
63560  cat >>confdefs.h <<_ACEOF
63561#define HAVE_LIBM 1
63562_ACEOF
63563
63564  LIBS="-lm $LIBS"
63565
63566else
63567
63568        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63569$as_echo "$as_me: Maths library was not found" >&6;}
63570
63571fi
63572
63573    LIBM="-lm"
63574  else
63575    LIBM=""
63576  fi
63577
63578
63579  # Setup libdl (for dynamic library loading)
63580  save_LIBS="$LIBS"
63581  LIBS=""
63582  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63583$as_echo_n "checking for dlopen in -ldl... " >&6; }
63584if ${ac_cv_lib_dl_dlopen+:} false; then :
63585  $as_echo_n "(cached) " >&6
63586else
63587  ac_check_lib_save_LIBS=$LIBS
63588LIBS="-ldl  $LIBS"
63589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63590/* end confdefs.h.  */
63591
63592/* Override any GCC internal prototype to avoid an error.
63593   Use char because int might match the return type of a GCC
63594   builtin and then its argument prototype would still apply.  */
63595#ifdef __cplusplus
63596extern "C"
63597#endif
63598char dlopen ();
63599int
63600main ()
63601{
63602return dlopen ();
63603  ;
63604  return 0;
63605}
63606_ACEOF
63607if ac_fn_cxx_try_link "$LINENO"; then :
63608  ac_cv_lib_dl_dlopen=yes
63609else
63610  ac_cv_lib_dl_dlopen=no
63611fi
63612rm -f core conftest.err conftest.$ac_objext \
63613    conftest$ac_exeext conftest.$ac_ext
63614LIBS=$ac_check_lib_save_LIBS
63615fi
63616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63617$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63618if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63619  cat >>confdefs.h <<_ACEOF
63620#define HAVE_LIBDL 1
63621_ACEOF
63622
63623  LIBS="-ldl $LIBS"
63624
63625fi
63626
63627  LIBDL="$LIBS"
63628
63629  LIBS="$save_LIBS"
63630
63631  # Deprecated libraries, keep the flags for backwards compatibility
63632  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63633
63634
63635# Check whether --with-dxsdk was given.
63636if test "${with_dxsdk+set}" = set; then :
63637  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63638$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63639fi
63640
63641
63642
63643
63644# Check whether --with-dxsdk-lib was given.
63645if test "${with_dxsdk_lib+set}" = set; then :
63646  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63647$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63648fi
63649
63650
63651
63652
63653# Check whether --with-dxsdk-include was given.
63654if test "${with_dxsdk_include+set}" = set; then :
63655  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63656$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63657fi
63658
63659
63660  fi
63661
63662  # Control if libzip can use mmap. Available for purposes of overriding.
63663  LIBZIP_CAN_USE_MMAP=true
63664
63665
63666
63667  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63668    # Find the root of the Solaris Studio installation from the compiler path
63669    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63670    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63671    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63672$as_echo_n "checking for libstlport.so.1... " >&6; }
63673    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63674      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63675      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63676    fi
63677    if test -f "$STLPORT_LIB"; then
63678      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63679$as_echo "yes, $STLPORT_LIB" >&6; }
63680
63681  # Only process if variable expands to non-empty
63682
63683  if test "x$STLPORT_LIB" != x; then
63684    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63685
63686  # Input might be given as Windows format, start by converting to
63687  # unix format.
63688  path="$STLPORT_LIB"
63689  new_path=`$CYGPATH -u "$path"`
63690
63691  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63692  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63693  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63694  # "foo.exe" is OK but "foo" is an error.
63695  #
63696  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63697  # It is also a way to make sure we got the proper file name for the real test later on.
63698  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63699  if test "x$test_shortpath" = x; then
63700    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63701$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63702    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63703  fi
63704
63705  # Call helper function which possibly converts this using DOS-style short mode.
63706  # If so, the updated path is stored in $new_path.
63707
63708  input_path="$new_path"
63709  # Check if we need to convert this using DOS-style short mode. If the path
63710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63711  # take no chances and rewrite it.
63712  # Note: m4 eats our [], so we need to use [ and ] instead.
63713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63714  if test "x$has_forbidden_chars" != x; then
63715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63716    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63717    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63718    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63719      # Going to short mode and back again did indeed matter. Since short mode is
63720      # case insensitive, let's make it lowercase to improve readability.
63721      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63722      # Now convert it back to Unix-style (cygpath)
63723      input_path=`$CYGPATH -u "$shortmode_path"`
63724      new_path="$input_path"
63725    fi
63726  fi
63727
63728  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63729  if test "x$test_cygdrive_prefix" = x; then
63730    # As a simple fix, exclude /usr/bin since it's not a real path.
63731    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63732      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63733      # a path prefixed by /cygdrive for fixpath to work.
63734      new_path="$CYGWIN_ROOT_PATH$input_path"
63735    fi
63736  fi
63737
63738
63739  if test "x$path" != "x$new_path"; then
63740    STLPORT_LIB="$new_path"
63741    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63742$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63743  fi
63744
63745    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63746
63747  path="$STLPORT_LIB"
63748  has_colon=`$ECHO $path | $GREP ^.:`
63749  new_path="$path"
63750  if test "x$has_colon" = x; then
63751    # Not in mixed or Windows style, start by that.
63752    new_path=`cmd //c echo $path`
63753  fi
63754
63755
63756  input_path="$new_path"
63757  # Check if we need to convert this using DOS-style short mode. If the path
63758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63759  # take no chances and rewrite it.
63760  # Note: m4 eats our [], so we need to use [ and ] instead.
63761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63762  if test "x$has_forbidden_chars" != x; then
63763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63764    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63765  fi
63766
63767
63768  windows_path="$new_path"
63769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63770    unix_path=`$CYGPATH -u "$windows_path"`
63771    new_path="$unix_path"
63772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63774    new_path="$unix_path"
63775  fi
63776
63777  if test "x$path" != "x$new_path"; then
63778    STLPORT_LIB="$new_path"
63779    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63780$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63781  fi
63782
63783  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63784  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63785
63786    else
63787      # We're on a unix platform. Hooray! :)
63788      path="$STLPORT_LIB"
63789      has_space=`$ECHO "$path" | $GREP " "`
63790      if test "x$has_space" != x; then
63791        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63792$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63793        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63794      fi
63795
63796      # Use eval to expand a potential ~
63797      eval path="$path"
63798      if test ! -f "$path" && test ! -d "$path"; then
63799        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63800      fi
63801
63802      if test -d "$path"; then
63803        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63804      else
63805        dir="`$DIRNAME "$path"`"
63806        base="`$BASENAME "$path"`"
63807        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63808      fi
63809    fi
63810  fi
63811
63812    else
63813      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63814$as_echo "no, not found at $STLPORT_LIB" >&6; }
63815      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63816    fi
63817
63818  fi
63819
63820
63821
63822
63823
63824
63825
63826
63827
63828
63829
63830
63831
63832
63833###############################################################################
63834#
63835# We need to do some final tweaking, when everything else is done.
63836#
63837###############################################################################
63838
63839
63840  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63841$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63842
63843  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63844    ENABLE_INTREE_EC=yes
63845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63846$as_echo "yes" >&6; }
63847  else
63848    ENABLE_INTREE_EC=no
63849    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63850$as_echo "no" >&6; }
63851  fi
63852
63853
63854
63855
63856  # Check whether --enable-jtreg-failure-handler was given.
63857if test "${enable_jtreg_failure_handler+set}" = set; then :
63858  enableval=$enable_jtreg_failure_handler;
63859fi
63860
63861
63862  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63863$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63864
63865  if test "x$enable_jtreg_failure_handler" = "xyes"; then
63866    if test "x$JT_HOME" = "x"; then
63867      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63868    else
63869      BUILD_FAILURE_HANDLER=true
63870      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63871$as_echo "yes, forced" >&6; }
63872    fi
63873  elif test "x$enable_jtreg_failure_handler" = "xno"; then
63874    BUILD_FAILURE_HANDLER=false
63875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63876$as_echo "no, forced" >&6; }
63877  elif test "x$enable_jtreg_failure_handler" = "xauto" \
63878      || test "x$enable_jtreg_failure_handler" = "x"; then
63879    if test "x$JT_HOME" = "x"; then
63880      BUILD_FAILURE_HANDLER=false
63881      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63882$as_echo "no, missing jtreg" >&6; }
63883    else
63884      BUILD_FAILURE_HANDLER=true
63885      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63886$as_echo "yes, jtreg present" >&6; }
63887    fi
63888  else
63889    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63890  fi
63891
63892
63893
63894
63895  # Check whether --enable-generate-classlist was given.
63896if test "${enable_generate_classlist+set}" = set; then :
63897  enableval=$enable_generate_classlist;
63898fi
63899
63900
63901  # Check if it's likely that it's possible to generate the classlist. Depending
63902  # on exact jvm configuration it could be possible anyway.
63903  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
63904    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
63905  else
63906    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
63907  fi
63908
63909  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
63910$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
63911  if test "x$enable_generate_classlist" = "xyes"; then
63912    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63913$as_echo "yes, forced" >&6; }
63914    ENABLE_GENERATE_CLASSLIST="true"
63915    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
63916      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
63917$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
63918    fi
63919  elif test "x$enable_generate_classlist" = "xno"; then
63920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63921$as_echo "no, forced" >&6; }
63922    ENABLE_GENERATE_CLASSLIST="false"
63923  elif test "x$enable_generate_classlist" = "x"; then
63924    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
63925      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63926$as_echo "yes" >&6; }
63927      ENABLE_GENERATE_CLASSLIST="true"
63928    else
63929      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63930$as_echo "no" >&6; }
63931      ENABLE_GENERATE_CLASSLIST="false"
63932    fi
63933  else
63934    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
63935  fi
63936
63937
63938
63939
63940###############################################################################
63941#
63942# Configure parts of the build that only affect the build performance,
63943# not the result.
63944#
63945###############################################################################
63946
63947
63948  # How many cores do we have on this build system?
63949
63950# Check whether --with-num-cores was given.
63951if test "${with_num_cores+set}" = set; then :
63952  withval=$with_num_cores;
63953fi
63954
63955  if test "x$with_num_cores" = x; then
63956    # The number of cores were not specified, try to probe them.
63957
63958  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63959$as_echo_n "checking for number of cores... " >&6; }
63960  NUM_CORES=1
63961  FOUND_CORES=no
63962
63963  if test -f /proc/cpuinfo; then
63964    # Looks like a Linux (or cygwin) system
63965    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63966    FOUND_CORES=yes
63967  elif test -x /usr/sbin/psrinfo; then
63968    # Looks like a Solaris system
63969    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63970    FOUND_CORES=yes
63971  elif test -x /usr/sbin/sysctl; then
63972    # Looks like a MacOSX system
63973    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63974    FOUND_CORES=yes
63975  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63976    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63977    FOUND_CORES=yes
63978  elif test -n "$NUMBER_OF_PROCESSORS"; then
63979    # On windows, look in the env
63980    NUM_CORES=$NUMBER_OF_PROCESSORS
63981    FOUND_CORES=yes
63982  fi
63983
63984  if test "x$FOUND_CORES" = xyes; then
63985    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63986$as_echo "$NUM_CORES" >&6; }
63987  else
63988    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63989$as_echo "could not detect number of cores, defaulting to 1" >&6; }
63990    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63991$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63992  fi
63993
63994  else
63995    NUM_CORES=$with_num_cores
63996  fi
63997
63998
63999
64000  # How much memory do we have on this build system?
64001
64002# Check whether --with-memory-size was given.
64003if test "${with_memory_size+set}" = set; then :
64004  withval=$with_memory_size;
64005fi
64006
64007  if test "x$with_memory_size" = x; then
64008    # The memory size was not specified, try to probe it.
64009
64010  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64011$as_echo_n "checking for memory size... " >&6; }
64012  # Default to 1024 MB
64013  MEMORY_SIZE=1024
64014  FOUND_MEM=no
64015
64016  if test -f /proc/meminfo; then
64017    # Looks like a Linux (or cygwin) system
64018    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64019    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64020    FOUND_MEM=yes
64021  elif test -x /usr/sbin/prtconf; then
64022    # Looks like a Solaris or AIX system
64023    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64024    FOUND_MEM=yes
64025  elif test -x /usr/sbin/sysctl; then
64026    # Looks like a MacOSX system
64027    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64028    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64029    FOUND_MEM=yes
64030  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64031    # Windows, but without cygwin
64032    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64033    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64034    FOUND_MEM=yes
64035  fi
64036
64037  if test "x$FOUND_MEM" = xyes; then
64038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64039$as_echo "$MEMORY_SIZE MB" >&6; }
64040  else
64041    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64042$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64043    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64044$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64045  fi
64046
64047  else
64048    MEMORY_SIZE=$with_memory_size
64049  fi
64050
64051
64052
64053  # Provide a decent default number of parallel jobs for make depending on
64054  # number of cores, amount of memory and machine architecture.
64055
64056# Check whether --with-jobs was given.
64057if test "${with_jobs+set}" = set; then :
64058  withval=$with_jobs;
64059fi
64060
64061  if test "x$with_jobs" = x; then
64062    # Number of jobs was not specified, calculate.
64063    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64064$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64065    # Approximate memory in GB.
64066    memory_gb=`expr $MEMORY_SIZE / 1024`
64067    # Pick the lowest of memory in gb and number of cores.
64068    if test "$memory_gb" -lt "$NUM_CORES"; then
64069      JOBS="$memory_gb"
64070    else
64071      JOBS="$NUM_CORES"
64072    fi
64073    if test "$JOBS" -eq "0"; then
64074      JOBS=1
64075    fi
64076    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64077$as_echo "$JOBS" >&6; }
64078  else
64079    JOBS=$with_jobs
64080  fi
64081
64082
64083
64084  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64085
64086# Check whether --with-test-jobs was given.
64087if test "${with_test_jobs+set}" = set; then :
64088  withval=$with_test_jobs;
64089fi
64090
64091  if test "x$with_test_jobs" = x; then
64092      TEST_JOBS=0
64093  else
64094      TEST_JOBS=$with_test_jobs
64095  fi
64096
64097
64098
64099# Setup arguments for the boot jdk (after cores and memory have been setup)
64100
64101  ##############################################################################
64102  #
64103  # Specify jvm options for anything that is run with the Boot JDK.
64104  # Not all JVM:s accept the same arguments on the command line.
64105  #
64106
64107# Check whether --with-boot-jdk-jvmargs was given.
64108if test "${with_boot_jdk_jvmargs+set}" = set; then :
64109  withval=$with_boot_jdk_jvmargs;
64110fi
64111
64112
64113  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64114$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64115
64116  # Disable special log output when a debug build is used as Boot JDK...
64117
64118  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64119  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64120  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64121  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64122  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64123  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64124    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64125    JVM_ARG_OK=true
64126  else
64127    $ECHO "Arg failed:" >&5
64128    $ECHO "$OUTPUT" >&5
64129    JVM_ARG_OK=false
64130  fi
64131
64132
64133  # Force en-US environment
64134
64135  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64136  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64137  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64138  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64139  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64140  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64141    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64142    JVM_ARG_OK=true
64143  else
64144    $ECHO "Arg failed:" >&5
64145    $ECHO "$OUTPUT" >&5
64146    JVM_ARG_OK=false
64147  fi
64148
64149
64150  # Apply user provided options.
64151
64152  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64153  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64154  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64155  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64156  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64157  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64158    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64159    JVM_ARG_OK=true
64160  else
64161    $ECHO "Arg failed:" >&5
64162    $ECHO "$OUTPUT" >&5
64163    JVM_ARG_OK=false
64164  fi
64165
64166
64167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64168$as_echo "$boot_jdk_jvmargs" >&6; }
64169
64170  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64171  JAVA_FLAGS=$boot_jdk_jvmargs
64172
64173
64174
64175  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64176$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64177
64178  # Starting amount of heap memory.
64179
64180  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64181  $ECHO "Command: $JAVA -Xms64M -version" >&5
64182  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64183  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64184  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64185  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64186    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64187    JVM_ARG_OK=true
64188  else
64189    $ECHO "Arg failed:" >&5
64190    $ECHO "$OUTPUT" >&5
64191    JVM_ARG_OK=false
64192  fi
64193
64194  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64195
64196  # Maximum amount of heap memory and stack size.
64197  JVM_HEAP_LIMIT_32="1024"
64198  # Running a 64 bit JVM allows for and requires a bigger heap
64199  JVM_HEAP_LIMIT_64="1600"
64200  STACK_SIZE_32=768
64201  STACK_SIZE_64=1536
64202  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64203  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64204    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64205  fi
64206  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64207    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64208  fi
64209  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64210    JVM_HEAP_LIMIT_32=512
64211    JVM_HEAP_LIMIT_64=512
64212  fi
64213
64214  if test "x$BOOT_JDK_BITS" = "x32"; then
64215    STACK_SIZE=$STACK_SIZE_32
64216    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64217  else
64218    STACK_SIZE=$STACK_SIZE_64
64219    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64220  fi
64221
64222  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64223  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64224  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64225  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64226  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64227  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64228    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64229    JVM_ARG_OK=true
64230  else
64231    $ECHO "Arg failed:" >&5
64232    $ECHO "$OUTPUT" >&5
64233    JVM_ARG_OK=false
64234  fi
64235
64236
64237  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64238  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64239  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64240  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64241  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64242  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64243    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64244    JVM_ARG_OK=true
64245  else
64246    $ECHO "Arg failed:" >&5
64247    $ECHO "$OUTPUT" >&5
64248    JVM_ARG_OK=false
64249  fi
64250
64251
64252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64253$as_echo "$boot_jdk_jvmargs_big" >&6; }
64254
64255  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64256
64257
64258  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64259    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64260    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64261  else
64262    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64263    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64264  fi
64265  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64266  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64267  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64268$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64270$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64271
64272
64273  # By default, the main javac compilations use big
64274  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64275
64276
64277  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64278$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64279
64280  # Use serial gc for small short lived tools if possible
64281
64282  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64283  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64284  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64285  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64286  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64287  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64288    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64289    JVM_ARG_OK=true
64290  else
64291    $ECHO "Arg failed:" >&5
64292    $ECHO "$OUTPUT" >&5
64293    JVM_ARG_OK=false
64294  fi
64295
64296
64297  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64298  $ECHO "Command: $JAVA -Xms32M -version" >&5
64299  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64300  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64301  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64302  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64303    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64304    JVM_ARG_OK=true
64305  else
64306    $ECHO "Arg failed:" >&5
64307    $ECHO "$OUTPUT" >&5
64308    JVM_ARG_OK=false
64309  fi
64310
64311
64312  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64313  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64314  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64315  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64316  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64317  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64318    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64319    JVM_ARG_OK=true
64320  else
64321    $ECHO "Arg failed:" >&5
64322    $ECHO "$OUTPUT" >&5
64323    JVM_ARG_OK=false
64324  fi
64325
64326
64327  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64328  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64329  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64330  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64331  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64332  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64333    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64334    JVM_ARG_OK=true
64335  else
64336    $ECHO "Arg failed:" >&5
64337    $ECHO "$OUTPUT" >&5
64338    JVM_ARG_OK=false
64339  fi
64340
64341
64342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64343$as_echo "$boot_jdk_jvmargs_small" >&6; }
64344
64345  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64346
64347
64348  JAVA_TOOL_FLAGS_SMALL=""
64349  for f in $JAVA_FLAGS_SMALL; do
64350    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64351  done
64352
64353
64354
64355# Setup smart javac (after cores and memory have been setup)
64356
64357
64358# Check whether --with-sjavac-server-java was given.
64359if test "${with_sjavac_server_java+set}" = set; then :
64360  withval=$with_sjavac_server_java;
64361fi
64362
64363
64364  if test "x$with_sjavac_server_java" != x; then
64365    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64366    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64367    if test "x$FOUND_VERSION" = x; then
64368      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64369    fi
64370  else
64371    SJAVAC_SERVER_JAVA="$JAVA"
64372  fi
64373
64374
64375  if test "$MEMORY_SIZE" -gt "3000"; then
64376
64377  $ECHO "Check if jvm arg is ok: -d64" >&5
64378  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64379  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64380  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64381  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64382  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64383    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64384    JVM_ARG_OK=true
64385  else
64386    $ECHO "Arg failed:" >&5
64387    $ECHO "$OUTPUT" >&5
64388    JVM_ARG_OK=false
64389  fi
64390
64391    if test "$JVM_ARG_OK" = true; then
64392      JVM_64BIT=true
64393      JVM_ARG_OK=false
64394    fi
64395  fi
64396
64397  MX_VALUE=`expr $MEMORY_SIZE / 2`
64398  if test "$JVM_64BIT" = true; then
64399    # Set ms lower than mx since more than one instance of the server might
64400    # get launched at the same time before they figure out which instance won.
64401    MS_VALUE=512
64402    if test "$MX_VALUE" -gt "2048"; then
64403      MX_VALUE=2048
64404    fi
64405  else
64406    MS_VALUE=256
64407    if test "$MX_VALUE" -gt "1500"; then
64408      MX_VALUE=1500
64409    fi
64410  fi
64411  if test "$MX_VALUE" -lt "512"; then
64412    MX_VALUE=512
64413  fi
64414
64415  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64416  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64417  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64418  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64419  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64420  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64421    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64422    JVM_ARG_OK=true
64423  else
64424    $ECHO "Arg failed:" >&5
64425    $ECHO "$OUTPUT" >&5
64426    JVM_ARG_OK=false
64427  fi
64428
64429
64430
64431  # Check whether --enable-sjavac was given.
64432if test "${enable_sjavac+set}" = set; then :
64433  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64434else
64435  ENABLE_SJAVAC="no"
64436fi
64437
64438  if test "x$JVM_ARG_OK" = "xfalse"; then
64439    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64440$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64441    ENABLE_SJAVAC="no"
64442  fi
64443  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64444$as_echo_n "checking whether to use sjavac... " >&6; }
64445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64446$as_echo "$ENABLE_SJAVAC" >&6; }
64447
64448
64449  # Check whether --enable-javac-server was given.
64450if test "${enable_javac_server+set}" = set; then :
64451  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64452else
64453  ENABLE_JAVAC_SERVER="yes"
64454fi
64455
64456  if test "x$JVM_ARG_OK" = "xfalse"; then
64457    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64458$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64459    ENABLE_JAVAC_SERVER="no"
64460  fi
64461  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64462$as_echo_n "checking whether to use javac server... " >&6; }
64463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64464$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64465
64466
64467  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64468    # When using a server javac, the small client instances do not need much
64469    # resources.
64470    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64471  fi
64472
64473
64474# Setup use of icecc if requested
64475
64476  # Check whether --enable-icecc was given.
64477if test "${enable_icecc+set}" = set; then :
64478  enableval=$enable_icecc;
64479fi
64480
64481
64482  if test "x${enable_icecc}" = "xyes"; then
64483
64484
64485
64486  # Publish this variable in the help.
64487
64488
64489  if [ -z "${ICECC_CMD+x}" ]; then
64490    # The variable is not set by user, try to locate tool using the code snippet
64491    for ac_prog in icecc
64492do
64493  # Extract the first word of "$ac_prog", so it can be a program name with args.
64494set dummy $ac_prog; ac_word=$2
64495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64496$as_echo_n "checking for $ac_word... " >&6; }
64497if ${ac_cv_path_ICECC_CMD+:} false; then :
64498  $as_echo_n "(cached) " >&6
64499else
64500  case $ICECC_CMD in
64501  [\\/]* | ?:[\\/]*)
64502  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64503  ;;
64504  *)
64505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64506for as_dir in $PATH
64507do
64508  IFS=$as_save_IFS
64509  test -z "$as_dir" && as_dir=.
64510    for ac_exec_ext in '' $ac_executable_extensions; do
64511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64512    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64514    break 2
64515  fi
64516done
64517  done
64518IFS=$as_save_IFS
64519
64520  ;;
64521esac
64522fi
64523ICECC_CMD=$ac_cv_path_ICECC_CMD
64524if test -n "$ICECC_CMD"; then
64525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64526$as_echo "$ICECC_CMD" >&6; }
64527else
64528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64529$as_echo "no" >&6; }
64530fi
64531
64532
64533  test -n "$ICECC_CMD" && break
64534done
64535
64536  else
64537    # The variable is set, but is it from the command line or the environment?
64538
64539    # Try to remove the string !ICECC_CMD! from our list.
64540    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64541    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64542      # If it failed, the variable was not from the command line. Ignore it,
64543      # but warn the user (except for BASH, which is always set by the calling BASH).
64544      if test "xICECC_CMD" != xBASH; then
64545        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64546$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64547      fi
64548      # Try to locate tool using the code snippet
64549      for ac_prog in icecc
64550do
64551  # Extract the first word of "$ac_prog", so it can be a program name with args.
64552set dummy $ac_prog; ac_word=$2
64553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64554$as_echo_n "checking for $ac_word... " >&6; }
64555if ${ac_cv_path_ICECC_CMD+:} false; then :
64556  $as_echo_n "(cached) " >&6
64557else
64558  case $ICECC_CMD in
64559  [\\/]* | ?:[\\/]*)
64560  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64561  ;;
64562  *)
64563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64564for as_dir in $PATH
64565do
64566  IFS=$as_save_IFS
64567  test -z "$as_dir" && as_dir=.
64568    for ac_exec_ext in '' $ac_executable_extensions; do
64569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64570    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64572    break 2
64573  fi
64574done
64575  done
64576IFS=$as_save_IFS
64577
64578  ;;
64579esac
64580fi
64581ICECC_CMD=$ac_cv_path_ICECC_CMD
64582if test -n "$ICECC_CMD"; then
64583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64584$as_echo "$ICECC_CMD" >&6; }
64585else
64586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64587$as_echo "no" >&6; }
64588fi
64589
64590
64591  test -n "$ICECC_CMD" && break
64592done
64593
64594    else
64595      # If it succeeded, then it was overridden by the user. We will use it
64596      # for the tool.
64597
64598      # First remove it from the list of overridden variables, so we can test
64599      # for unknown variables in the end.
64600      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64601
64602      # Check if we try to supply an empty value
64603      if test "x$ICECC_CMD" = x; then
64604        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64605$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64606        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64607$as_echo_n "checking for ICECC_CMD... " >&6; }
64608        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64609$as_echo "disabled" >&6; }
64610      else
64611        # Check if the provided tool contains a complete path.
64612        tool_specified="$ICECC_CMD"
64613        tool_basename="${tool_specified##*/}"
64614        if test "x$tool_basename" = "x$tool_specified"; then
64615          # A command without a complete path is provided, search $PATH.
64616          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64617$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64618          # Extract the first word of "$tool_basename", so it can be a program name with args.
64619set dummy $tool_basename; ac_word=$2
64620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64621$as_echo_n "checking for $ac_word... " >&6; }
64622if ${ac_cv_path_ICECC_CMD+:} false; then :
64623  $as_echo_n "(cached) " >&6
64624else
64625  case $ICECC_CMD in
64626  [\\/]* | ?:[\\/]*)
64627  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64628  ;;
64629  *)
64630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64631for as_dir in $PATH
64632do
64633  IFS=$as_save_IFS
64634  test -z "$as_dir" && as_dir=.
64635    for ac_exec_ext in '' $ac_executable_extensions; do
64636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64637    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64639    break 2
64640  fi
64641done
64642  done
64643IFS=$as_save_IFS
64644
64645  ;;
64646esac
64647fi
64648ICECC_CMD=$ac_cv_path_ICECC_CMD
64649if test -n "$ICECC_CMD"; then
64650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64651$as_echo "$ICECC_CMD" >&6; }
64652else
64653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64654$as_echo "no" >&6; }
64655fi
64656
64657
64658          if test "x$ICECC_CMD" = x; then
64659            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64660          fi
64661        else
64662          # Otherwise we believe it is a complete path. Use it as it is.
64663          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64664$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64665          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64666$as_echo_n "checking for ICECC_CMD... " >&6; }
64667          if test ! -x "$tool_specified"; then
64668            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64669$as_echo "not found" >&6; }
64670            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64671          fi
64672          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64673$as_echo "$tool_specified" >&6; }
64674        fi
64675      fi
64676    fi
64677
64678  fi
64679
64680
64681
64682  if test "x$ICECC_CMD" = x; then
64683    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64684  fi
64685
64686
64687    old_path="$PATH"
64688
64689    # Look for icecc-create-env in some known places
64690    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64691
64692
64693
64694  # Publish this variable in the help.
64695
64696
64697  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64698    # The variable is not set by user, try to locate tool using the code snippet
64699    for ac_prog in icecc-create-env
64700do
64701  # Extract the first word of "$ac_prog", so it can be a program name with args.
64702set dummy $ac_prog; ac_word=$2
64703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64704$as_echo_n "checking for $ac_word... " >&6; }
64705if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64706  $as_echo_n "(cached) " >&6
64707else
64708  case $ICECC_CREATE_ENV in
64709  [\\/]* | ?:[\\/]*)
64710  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64711  ;;
64712  *)
64713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64714for as_dir in $PATH
64715do
64716  IFS=$as_save_IFS
64717  test -z "$as_dir" && as_dir=.
64718    for ac_exec_ext in '' $ac_executable_extensions; do
64719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64720    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64722    break 2
64723  fi
64724done
64725  done
64726IFS=$as_save_IFS
64727
64728  ;;
64729esac
64730fi
64731ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64732if test -n "$ICECC_CREATE_ENV"; then
64733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64734$as_echo "$ICECC_CREATE_ENV" >&6; }
64735else
64736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64737$as_echo "no" >&6; }
64738fi
64739
64740
64741  test -n "$ICECC_CREATE_ENV" && break
64742done
64743
64744  else
64745    # The variable is set, but is it from the command line or the environment?
64746
64747    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64748    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64749    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64750      # If it failed, the variable was not from the command line. Ignore it,
64751      # but warn the user (except for BASH, which is always set by the calling BASH).
64752      if test "xICECC_CREATE_ENV" != xBASH; then
64753        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64754$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64755      fi
64756      # Try to locate tool using the code snippet
64757      for ac_prog in icecc-create-env
64758do
64759  # Extract the first word of "$ac_prog", so it can be a program name with args.
64760set dummy $ac_prog; ac_word=$2
64761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64762$as_echo_n "checking for $ac_word... " >&6; }
64763if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64764  $as_echo_n "(cached) " >&6
64765else
64766  case $ICECC_CREATE_ENV in
64767  [\\/]* | ?:[\\/]*)
64768  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64769  ;;
64770  *)
64771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64772for as_dir in $PATH
64773do
64774  IFS=$as_save_IFS
64775  test -z "$as_dir" && as_dir=.
64776    for ac_exec_ext in '' $ac_executable_extensions; do
64777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64778    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64780    break 2
64781  fi
64782done
64783  done
64784IFS=$as_save_IFS
64785
64786  ;;
64787esac
64788fi
64789ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64790if test -n "$ICECC_CREATE_ENV"; then
64791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64792$as_echo "$ICECC_CREATE_ENV" >&6; }
64793else
64794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64795$as_echo "no" >&6; }
64796fi
64797
64798
64799  test -n "$ICECC_CREATE_ENV" && break
64800done
64801
64802    else
64803      # If it succeeded, then it was overridden by the user. We will use it
64804      # for the tool.
64805
64806      # First remove it from the list of overridden variables, so we can test
64807      # for unknown variables in the end.
64808      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64809
64810      # Check if we try to supply an empty value
64811      if test "x$ICECC_CREATE_ENV" = x; then
64812        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64813$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64814        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64815$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64816        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64817$as_echo "disabled" >&6; }
64818      else
64819        # Check if the provided tool contains a complete path.
64820        tool_specified="$ICECC_CREATE_ENV"
64821        tool_basename="${tool_specified##*/}"
64822        if test "x$tool_basename" = "x$tool_specified"; then
64823          # A command without a complete path is provided, search $PATH.
64824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64825$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64826          # Extract the first word of "$tool_basename", so it can be a program name with args.
64827set dummy $tool_basename; ac_word=$2
64828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64829$as_echo_n "checking for $ac_word... " >&6; }
64830if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64831  $as_echo_n "(cached) " >&6
64832else
64833  case $ICECC_CREATE_ENV in
64834  [\\/]* | ?:[\\/]*)
64835  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64836  ;;
64837  *)
64838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64839for as_dir in $PATH
64840do
64841  IFS=$as_save_IFS
64842  test -z "$as_dir" && as_dir=.
64843    for ac_exec_ext in '' $ac_executable_extensions; do
64844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64845    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64847    break 2
64848  fi
64849done
64850  done
64851IFS=$as_save_IFS
64852
64853  ;;
64854esac
64855fi
64856ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64857if test -n "$ICECC_CREATE_ENV"; then
64858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64859$as_echo "$ICECC_CREATE_ENV" >&6; }
64860else
64861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64862$as_echo "no" >&6; }
64863fi
64864
64865
64866          if test "x$ICECC_CREATE_ENV" = x; then
64867            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64868          fi
64869        else
64870          # Otherwise we believe it is a complete path. Use it as it is.
64871          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64872$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64873          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64874$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64875          if test ! -x "$tool_specified"; then
64876            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64877$as_echo "not found" >&6; }
64878            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64879          fi
64880          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64881$as_echo "$tool_specified" >&6; }
64882        fi
64883      fi
64884    fi
64885
64886  fi
64887
64888
64889
64890  if test "x$ICECC_CREATE_ENV" = x; then
64891    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64892  fi
64893
64894
64895    # Use icecc-create-env to create a minimal compilation environment that can
64896    # be sent to the other hosts in the icecream cluster.
64897    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64898    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64899    # Older versions of icecc does not have the --gcc parameter
64900    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64901      icecc_gcc_arg="--gcc"
64902    fi
64903    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64904
64905  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64906      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64907          ${icecc_create_env_log} 2>&1 )
64908  if test "$?" != "0"; then
64909    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64910$as_echo "$as_me: icecc-create-env output:" >&6;}
64911    cat \
64912          ${icecc_create_env_log}
64913    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64914  fi
64915
64916    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64917      # For clang, the icecc compilerwrapper is needed. It usually resides next
64918      # to icecc-create-env.
64919
64920
64921
64922  # Publish this variable in the help.
64923
64924
64925  if [ -z "${ICECC_WRAPPER+x}" ]; then
64926    # The variable is not set by user, try to locate tool using the code snippet
64927    for ac_prog in compilerwrapper
64928do
64929  # Extract the first word of "$ac_prog", so it can be a program name with args.
64930set dummy $ac_prog; ac_word=$2
64931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64932$as_echo_n "checking for $ac_word... " >&6; }
64933if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64934  $as_echo_n "(cached) " >&6
64935else
64936  case $ICECC_WRAPPER in
64937  [\\/]* | ?:[\\/]*)
64938  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64939  ;;
64940  *)
64941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64942for as_dir in $PATH
64943do
64944  IFS=$as_save_IFS
64945  test -z "$as_dir" && as_dir=.
64946    for ac_exec_ext in '' $ac_executable_extensions; do
64947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64948    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64950    break 2
64951  fi
64952done
64953  done
64954IFS=$as_save_IFS
64955
64956  ;;
64957esac
64958fi
64959ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64960if test -n "$ICECC_WRAPPER"; then
64961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64962$as_echo "$ICECC_WRAPPER" >&6; }
64963else
64964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64965$as_echo "no" >&6; }
64966fi
64967
64968
64969  test -n "$ICECC_WRAPPER" && break
64970done
64971
64972  else
64973    # The variable is set, but is it from the command line or the environment?
64974
64975    # Try to remove the string !ICECC_WRAPPER! from our list.
64976    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64977    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64978      # If it failed, the variable was not from the command line. Ignore it,
64979      # but warn the user (except for BASH, which is always set by the calling BASH).
64980      if test "xICECC_WRAPPER" != xBASH; then
64981        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64982$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64983      fi
64984      # Try to locate tool using the code snippet
64985      for ac_prog in compilerwrapper
64986do
64987  # Extract the first word of "$ac_prog", so it can be a program name with args.
64988set dummy $ac_prog; ac_word=$2
64989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64990$as_echo_n "checking for $ac_word... " >&6; }
64991if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64992  $as_echo_n "(cached) " >&6
64993else
64994  case $ICECC_WRAPPER in
64995  [\\/]* | ?:[\\/]*)
64996  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64997  ;;
64998  *)
64999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65000for as_dir in $PATH
65001do
65002  IFS=$as_save_IFS
65003  test -z "$as_dir" && as_dir=.
65004    for ac_exec_ext in '' $ac_executable_extensions; do
65005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65006    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65008    break 2
65009  fi
65010done
65011  done
65012IFS=$as_save_IFS
65013
65014  ;;
65015esac
65016fi
65017ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65018if test -n "$ICECC_WRAPPER"; then
65019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65020$as_echo "$ICECC_WRAPPER" >&6; }
65021else
65022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65023$as_echo "no" >&6; }
65024fi
65025
65026
65027  test -n "$ICECC_WRAPPER" && break
65028done
65029
65030    else
65031      # If it succeeded, then it was overridden by the user. We will use it
65032      # for the tool.
65033
65034      # First remove it from the list of overridden variables, so we can test
65035      # for unknown variables in the end.
65036      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65037
65038      # Check if we try to supply an empty value
65039      if test "x$ICECC_WRAPPER" = x; then
65040        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65041$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65042        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65043$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65044        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65045$as_echo "disabled" >&6; }
65046      else
65047        # Check if the provided tool contains a complete path.
65048        tool_specified="$ICECC_WRAPPER"
65049        tool_basename="${tool_specified##*/}"
65050        if test "x$tool_basename" = "x$tool_specified"; then
65051          # A command without a complete path is provided, search $PATH.
65052          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65053$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65054          # Extract the first word of "$tool_basename", so it can be a program name with args.
65055set dummy $tool_basename; ac_word=$2
65056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65057$as_echo_n "checking for $ac_word... " >&6; }
65058if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65059  $as_echo_n "(cached) " >&6
65060else
65061  case $ICECC_WRAPPER in
65062  [\\/]* | ?:[\\/]*)
65063  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65064  ;;
65065  *)
65066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65067for as_dir in $PATH
65068do
65069  IFS=$as_save_IFS
65070  test -z "$as_dir" && as_dir=.
65071    for ac_exec_ext in '' $ac_executable_extensions; do
65072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65073    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65075    break 2
65076  fi
65077done
65078  done
65079IFS=$as_save_IFS
65080
65081  ;;
65082esac
65083fi
65084ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65085if test -n "$ICECC_WRAPPER"; then
65086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65087$as_echo "$ICECC_WRAPPER" >&6; }
65088else
65089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65090$as_echo "no" >&6; }
65091fi
65092
65093
65094          if test "x$ICECC_WRAPPER" = x; then
65095            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65096          fi
65097        else
65098          # Otherwise we believe it is a complete path. Use it as it is.
65099          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65100$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65101          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65102$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65103          if test ! -x "$tool_specified"; then
65104            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65105$as_echo "not found" >&6; }
65106            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65107          fi
65108          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65109$as_echo "$tool_specified" >&6; }
65110        fi
65111      fi
65112    fi
65113
65114  fi
65115
65116
65117
65118  if test "x$ICECC_WRAPPER" = x; then
65119    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65120  fi
65121
65122
65123
65124  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65125      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65126  if test "$?" != "0"; then
65127    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65128$as_echo "$as_me: icecc-create-env output:" >&6;}
65129    cat ${icecc_create_env_log}
65130    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65131  fi
65132
65133    else
65134      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65135    fi
65136    PATH="$old_path"
65137    # The bundle with the compiler gets a name based on checksums. Parse log file
65138    # to find it.
65139    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65140    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65141    if test ! -f ${ICECC_ENV_BUNDLE}; then
65142      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65143    fi
65144    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65145$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65146    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65147$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65148    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65149
65150    if test "x${COMPILE_TYPE}" = "xcross"; then
65151      # If cross compiling, create a separate env package for the build compiler
65152      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65153      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65154      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65155
65156  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65157      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65158            ${icecc_create_env_log_build} 2>&1 )
65159  if test "$?" != "0"; then
65160    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65161$as_echo "$as_me: icecc-create-env output:" >&6;}
65162    cat \
65163            ${icecc_create_env_log_build}
65164    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65165  fi
65166
65167      elif test "x${BUILD_CC##*/}" = "xclang"; then
65168
65169  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65170      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65171  if test "$?" != "0"; then
65172    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65173$as_echo "$as_me: icecc-create-env output:" >&6;}
65174    cat ${icecc_create_env_log_build}
65175    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65176  fi
65177
65178      else
65179        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65180      fi
65181      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65182      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65183      if test ! -f ${ICECC_ENV_BUNDLE}; then
65184        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65185      fi
65186      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65187$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65188      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65189$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65190      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65191          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65192    else
65193      BUILD_ICECC="${ICECC}"
65194    fi
65195
65196
65197  fi
65198
65199
65200# Can the C/C++ compiler use precompiled headers?
65201
65202
65203  ###############################################################################
65204  #
65205  # Can the C/C++ compiler use precompiled headers?
65206  #
65207  # Check whether --enable-precompiled-headers was given.
65208if test "${enable_precompiled_headers+set}" = set; then :
65209  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65210else
65211  ENABLE_PRECOMPH=yes
65212fi
65213
65214
65215  USE_PRECOMPILED_HEADER=1
65216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65217$as_echo_n "checking If precompiled header is enabled... " >&6; }
65218  if test "x$ENABLE_PRECOMPH" = xno; then
65219    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65220$as_echo "no, forced" >&6; }
65221    USE_PRECOMPILED_HEADER=0
65222  elif test "x$ICECC" != "x"; then
65223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65224$as_echo "no, does not work effectively with icecc" >&6; }
65225    USE_PRECOMPILED_HEADER=0
65226  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65227    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65228$as_echo "no, does not work with Solaris Studio" >&6; }
65229    USE_PRECOMPILED_HEADER=0
65230  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65231    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65232$as_echo "no, does not work with xlc" >&6; }
65233    USE_PRECOMPILED_HEADER=0
65234  else
65235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65236$as_echo "yes" >&6; }
65237  fi
65238
65239  if test "x$ENABLE_PRECOMPH" = xyes; then
65240    # Check that the compiler actually supports precomp headers.
65241    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65242      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65243$as_echo_n "checking that precompiled headers work... " >&6; }
65244      echo "int alfa();" > conftest.h
65245      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65246      if test ! -f conftest.hpp.gch; then
65247        USE_PRECOMPILED_HEADER=0
65248        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65249$as_echo "no" >&6; }
65250      else
65251        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65252$as_echo "yes" >&6; }
65253      fi
65254      $RM conftest.h conftest.hpp.gch
65255    fi
65256  fi
65257
65258
65259
65260
65261# Setup use of ccache, if available
65262
65263  # Check whether --enable-ccache was given.
65264if test "${enable_ccache+set}" = set; then :
65265  enableval=$enable_ccache;
65266fi
65267
65268
65269  CCACHE_STATUS=
65270  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65271$as_echo_n "checking is ccache enabled... " >&6; }
65272  if test "x$enable_ccache" = xyes; then
65273    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65274      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65275$as_echo "yes" >&6; }
65276      OLD_PATH="$PATH"
65277      if test "x$TOOLCHAIN_PATH" != x; then
65278        PATH=$TOOLCHAIN_PATH:$PATH
65279      fi
65280
65281
65282
65283  # Publish this variable in the help.
65284
65285
65286  if [ -z "${CCACHE+x}" ]; then
65287    # The variable is not set by user, try to locate tool using the code snippet
65288    for ac_prog in ccache
65289do
65290  # Extract the first word of "$ac_prog", so it can be a program name with args.
65291set dummy $ac_prog; ac_word=$2
65292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65293$as_echo_n "checking for $ac_word... " >&6; }
65294if ${ac_cv_path_CCACHE+:} false; then :
65295  $as_echo_n "(cached) " >&6
65296else
65297  case $CCACHE in
65298  [\\/]* | ?:[\\/]*)
65299  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65300  ;;
65301  *)
65302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65303for as_dir in $PATH
65304do
65305  IFS=$as_save_IFS
65306  test -z "$as_dir" && as_dir=.
65307    for ac_exec_ext in '' $ac_executable_extensions; do
65308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65309    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65311    break 2
65312  fi
65313done
65314  done
65315IFS=$as_save_IFS
65316
65317  ;;
65318esac
65319fi
65320CCACHE=$ac_cv_path_CCACHE
65321if test -n "$CCACHE"; then
65322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65323$as_echo "$CCACHE" >&6; }
65324else
65325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65326$as_echo "no" >&6; }
65327fi
65328
65329
65330  test -n "$CCACHE" && break
65331done
65332
65333  else
65334    # The variable is set, but is it from the command line or the environment?
65335
65336    # Try to remove the string !CCACHE! from our list.
65337    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65338    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65339      # If it failed, the variable was not from the command line. Ignore it,
65340      # but warn the user (except for BASH, which is always set by the calling BASH).
65341      if test "xCCACHE" != xBASH; then
65342        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65343$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65344      fi
65345      # Try to locate tool using the code snippet
65346      for ac_prog in ccache
65347do
65348  # Extract the first word of "$ac_prog", so it can be a program name with args.
65349set dummy $ac_prog; ac_word=$2
65350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65351$as_echo_n "checking for $ac_word... " >&6; }
65352if ${ac_cv_path_CCACHE+:} false; then :
65353  $as_echo_n "(cached) " >&6
65354else
65355  case $CCACHE in
65356  [\\/]* | ?:[\\/]*)
65357  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65358  ;;
65359  *)
65360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65361for as_dir in $PATH
65362do
65363  IFS=$as_save_IFS
65364  test -z "$as_dir" && as_dir=.
65365    for ac_exec_ext in '' $ac_executable_extensions; do
65366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65367    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65369    break 2
65370  fi
65371done
65372  done
65373IFS=$as_save_IFS
65374
65375  ;;
65376esac
65377fi
65378CCACHE=$ac_cv_path_CCACHE
65379if test -n "$CCACHE"; then
65380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65381$as_echo "$CCACHE" >&6; }
65382else
65383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65384$as_echo "no" >&6; }
65385fi
65386
65387
65388  test -n "$CCACHE" && break
65389done
65390
65391    else
65392      # If it succeeded, then it was overridden by the user. We will use it
65393      # for the tool.
65394
65395      # First remove it from the list of overridden variables, so we can test
65396      # for unknown variables in the end.
65397      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65398
65399      # Check if we try to supply an empty value
65400      if test "x$CCACHE" = x; then
65401        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65402$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65403        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65404$as_echo_n "checking for CCACHE... " >&6; }
65405        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65406$as_echo "disabled" >&6; }
65407      else
65408        # Check if the provided tool contains a complete path.
65409        tool_specified="$CCACHE"
65410        tool_basename="${tool_specified##*/}"
65411        if test "x$tool_basename" = "x$tool_specified"; then
65412          # A command without a complete path is provided, search $PATH.
65413          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65414$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65415          # Extract the first word of "$tool_basename", so it can be a program name with args.
65416set dummy $tool_basename; ac_word=$2
65417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65418$as_echo_n "checking for $ac_word... " >&6; }
65419if ${ac_cv_path_CCACHE+:} false; then :
65420  $as_echo_n "(cached) " >&6
65421else
65422  case $CCACHE in
65423  [\\/]* | ?:[\\/]*)
65424  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65425  ;;
65426  *)
65427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65428for as_dir in $PATH
65429do
65430  IFS=$as_save_IFS
65431  test -z "$as_dir" && as_dir=.
65432    for ac_exec_ext in '' $ac_executable_extensions; do
65433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65434    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65436    break 2
65437  fi
65438done
65439  done
65440IFS=$as_save_IFS
65441
65442  ;;
65443esac
65444fi
65445CCACHE=$ac_cv_path_CCACHE
65446if test -n "$CCACHE"; then
65447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65448$as_echo "$CCACHE" >&6; }
65449else
65450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65451$as_echo "no" >&6; }
65452fi
65453
65454
65455          if test "x$CCACHE" = x; then
65456            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65457          fi
65458        else
65459          # Otherwise we believe it is a complete path. Use it as it is.
65460          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65461$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65462          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65463$as_echo_n "checking for CCACHE... " >&6; }
65464          if test ! -x "$tool_specified"; then
65465            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65466$as_echo "not found" >&6; }
65467            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65468          fi
65469          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65470$as_echo "$tool_specified" >&6; }
65471        fi
65472      fi
65473    fi
65474
65475  fi
65476
65477
65478
65479  if test "x$CCACHE" = x; then
65480    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65481  fi
65482
65483
65484      PATH="$OLD_PATH"
65485      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65486      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65487    else
65488      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65489$as_echo "no" >&6; }
65490      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65491$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65492    fi
65493  elif test "x$enable_ccache" = xno; then
65494    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65495$as_echo "no, explicitly disabled" >&6; }
65496    CCACHE_STATUS="Disabled"
65497  elif test "x$enable_ccache" = x; then
65498    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65499$as_echo "no" >&6; }
65500  else
65501    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65502$as_echo "unknown" >&6; }
65503    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65504  fi
65505
65506
65507
65508# Check whether --with-ccache-dir was given.
65509if test "${with_ccache_dir+set}" = set; then :
65510  withval=$with_ccache_dir;
65511fi
65512
65513
65514  if test "x$with_ccache_dir" != x; then
65515    # When using a non home ccache directory, assume the use is to share ccache files
65516    # with other users. Thus change the umask.
65517    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65518    if test "x$CCACHE" = x; then
65519      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65520$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65521    fi
65522  fi
65523
65524  if test "x$CCACHE" != x; then
65525
65526  if test "x$CCACHE" != x; then
65527    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
65528      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65529          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
65530      if test "x$HAS_BAD_CCACHE" != "x"; then
65531        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
65532      fi
65533    fi
65534    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65535      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65536          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65537      if test "x$HAS_BAD_CCACHE" != "x"; then
65538        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65539      fi
65540      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65541$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65542      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65543      PUSHED_FLAGS="$CXXFLAGS"
65544      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65545      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65546/* end confdefs.h.  */
65547
65548int
65549main ()
65550{
65551
65552  ;
65553  return 0;
65554}
65555_ACEOF
65556if ac_fn_cxx_try_compile "$LINENO"; then :
65557  CC_KNOWS_CCACHE_TRICK=yes
65558else
65559  CC_KNOWS_CCACHE_TRICK=no
65560fi
65561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65562      CXXFLAGS="$PUSHED_FLAGS"
65563      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65565$as_echo "yes" >&6; }
65566        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65567
65568        CCACHE_SLOPPINESS=pch_defines,time_macros
65569      else
65570        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65571$as_echo "no" >&6; }
65572        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65573      fi
65574    fi
65575
65576    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65577        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65578
65579    if test "x$SET_CCACHE_DIR" != x; then
65580      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65581      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65582    fi
65583  fi
65584
65585  fi
65586
65587
65588###############################################################################
65589#
65590# And now the finish...
65591#
65592###############################################################################
65593
65594# Check for some common pitfalls
65595
65596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65597    file_to_test="$SRC_ROOT/LICENSE"
65598    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65599      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
65600    fi
65601  fi
65602
65603
65604  # Did user specify any unknown variables?
65605
65606  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65607    # Replace the separating ! with spaces before presenting for end user.
65608    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65609    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65610$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65611  fi
65612
65613
65614  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65615$as_echo_n "checking if build directory is on local disk... " >&6; }
65616
65617  # df -l lists only local disks; if the given directory is not found then
65618  # a non-zero exit code is given
65619  if test "x$DF" = x; then
65620    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65621      # msys does not have df; use Windows "net use" instead.
65622      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65623      if test "x$IS_NETWORK_DISK" = x; then
65624        OUTPUT_DIR_IS_LOCAL="yes"
65625      else
65626        OUTPUT_DIR_IS_LOCAL="no"
65627      fi
65628    else
65629      # No df here, say it's local
65630      OUTPUT_DIR_IS_LOCAL="yes"
65631    fi
65632  else
65633    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65634      OUTPUT_DIR_IS_LOCAL="yes"
65635    else
65636      OUTPUT_DIR_IS_LOCAL="no"
65637    fi
65638  fi
65639
65640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65641$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65642
65643
65644
65645  # Check if the user has any old-style ALT_ variables set.
65646  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65647
65648  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65649  # Since we can't properly handle the dependencies for this, warn the user about the situation
65650  if test -e $OUTPUT_ROOT/spec.gmk; then
65651    IS_RECONFIGURE=yes
65652  else
65653    IS_RECONFIGURE=no
65654  fi
65655
65656
65657# At the end, call the custom hook. (Dummy macro if no custom sources available)
65658
65659
65660# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65661
65662  # Keep feature lists sorted and free of duplicates
65663  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65664  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65665  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65666  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65667  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65668  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65669  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65670
65671  # Validate features
65672  for variant in $JVM_VARIANTS; do
65673    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65674$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65675    features_var_name=JVM_FEATURES_$variant
65676    JVM_FEATURES_TO_TEST=${!features_var_name}
65677    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65678$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65679    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65680    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65681    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65682    if test "x$INVALID_FEATURES" != x; then
65683      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65684    fi
65685  done
65686
65687
65688# We're messing a bit with internal autoconf variables to put the config.status
65689# in the output directory instead of the current directory.
65690CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65691
65692# Create the actual output files. Now the main work of configure is done.
65693cat >confcache <<\_ACEOF
65694# This file is a shell script that caches the results of configure
65695# tests run on this system so they can be shared between configure
65696# scripts and configure runs, see configure's option --config-cache.
65697# It is not useful on other systems.  If it contains results you don't
65698# want to keep, you may remove or edit it.
65699#
65700# config.status only pays attention to the cache file if you give it
65701# the --recheck option to rerun configure.
65702#
65703# `ac_cv_env_foo' variables (set or unset) will be overridden when
65704# loading this file, other *unset* `ac_cv_foo' will be assigned the
65705# following values.
65706
65707_ACEOF
65708
65709# The following way of writing the cache mishandles newlines in values,
65710# but we know of no workaround that is simple, portable, and efficient.
65711# So, we kill variables containing newlines.
65712# Ultrix sh set writes to stderr and can't be redirected directly,
65713# and sets the high bit in the cache file unless we assign to the vars.
65714(
65715  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65716    eval ac_val=\$$ac_var
65717    case $ac_val in #(
65718    *${as_nl}*)
65719      case $ac_var in #(
65720      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65721$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65722      esac
65723      case $ac_var in #(
65724      _ | IFS | as_nl) ;; #(
65725      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65726      *) { eval $ac_var=; unset $ac_var;} ;;
65727      esac ;;
65728    esac
65729  done
65730
65731  (set) 2>&1 |
65732    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65733    *${as_nl}ac_space=\ *)
65734      # `set' does not quote correctly, so add quotes: double-quote
65735      # substitution turns \\\\ into \\, and sed turns \\ into \.
65736      sed -n \
65737	"s/'/'\\\\''/g;
65738	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65739      ;; #(
65740    *)
65741      # `set' quotes correctly as required by POSIX, so do not add quotes.
65742      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65743      ;;
65744    esac |
65745    sort
65746) |
65747  sed '
65748     /^ac_cv_env_/b end
65749     t clear
65750     :clear
65751     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65752     t end
65753     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65754     :end' >>confcache
65755if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65756  if test -w "$cache_file"; then
65757    if test "x$cache_file" != "x/dev/null"; then
65758      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65759$as_echo "$as_me: updating cache $cache_file" >&6;}
65760      if test ! -f "$cache_file" || test -h "$cache_file"; then
65761	cat confcache >"$cache_file"
65762      else
65763        case $cache_file in #(
65764        */* | ?:*)
65765	  mv -f confcache "$cache_file"$$ &&
65766	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65767        *)
65768	  mv -f confcache "$cache_file" ;;
65769	esac
65770      fi
65771    fi
65772  else
65773    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65774$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65775  fi
65776fi
65777rm -f confcache
65778
65779test "x$prefix" = xNONE && prefix=$ac_default_prefix
65780# Let make expand exec_prefix.
65781test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65782
65783# Transform confdefs.h into DEFS.
65784# Protect against shell expansion while executing Makefile rules.
65785# Protect against Makefile macro expansion.
65786#
65787# If the first sed substitution is executed (which looks for macros that
65788# take arguments), then branch to the quote section.  Otherwise,
65789# look for a macro that doesn't take arguments.
65790ac_script='
65791:mline
65792/\\$/{
65793 N
65794 s,\\\n,,
65795 b mline
65796}
65797t clear
65798:clear
65799s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65800t quote
65801s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65802t quote
65803b any
65804:quote
65805s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65806s/\[/\\&/g
65807s/\]/\\&/g
65808s/\$/$$/g
65809H
65810:any
65811${
65812	g
65813	s/^\n//
65814	s/\n/ /g
65815	p
65816}
65817'
65818DEFS=`sed -n "$ac_script" confdefs.h`
65819
65820
65821ac_libobjs=
65822ac_ltlibobjs=
65823U=
65824for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65825  # 1. Remove the extension, and $U if already installed.
65826  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65827  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65828  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65829  #    will be set to the directory where LIBOBJS objects are built.
65830  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65831  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65832done
65833LIBOBJS=$ac_libobjs
65834
65835LTLIBOBJS=$ac_ltlibobjs
65836
65837
65838
65839: "${CONFIG_STATUS=./config.status}"
65840ac_write_fail=0
65841ac_clean_files_save=$ac_clean_files
65842ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65843{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65844$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65845as_write_fail=0
65846cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65847#! $SHELL
65848# Generated by $as_me.
65849# Run this file to recreate the current configuration.
65850# Compiler output produced by configure, useful for debugging
65851# configure, is in config.log if it exists.
65852
65853debug=false
65854ac_cs_recheck=false
65855ac_cs_silent=false
65856
65857SHELL=\${CONFIG_SHELL-$SHELL}
65858export SHELL
65859_ASEOF
65860cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65861## -------------------- ##
65862## M4sh Initialization. ##
65863## -------------------- ##
65864
65865# Be more Bourne compatible
65866DUALCASE=1; export DUALCASE # for MKS sh
65867if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65868  emulate sh
65869  NULLCMD=:
65870  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65871  # is contrary to our usage.  Disable this feature.
65872  alias -g '${1+"$@"}'='"$@"'
65873  setopt NO_GLOB_SUBST
65874else
65875  case `(set -o) 2>/dev/null` in #(
65876  *posix*) :
65877    set -o posix ;; #(
65878  *) :
65879     ;;
65880esac
65881fi
65882
65883
65884as_nl='
65885'
65886export as_nl
65887# Printing a long string crashes Solaris 7 /usr/bin/printf.
65888as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65889as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65890as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65891# Prefer a ksh shell builtin over an external printf program on Solaris,
65892# but without wasting forks for bash or zsh.
65893if test -z "$BASH_VERSION$ZSH_VERSION" \
65894    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65895  as_echo='print -r --'
65896  as_echo_n='print -rn --'
65897elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65898  as_echo='printf %s\n'
65899  as_echo_n='printf %s'
65900else
65901  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65902    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65903    as_echo_n='/usr/ucb/echo -n'
65904  else
65905    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65906    as_echo_n_body='eval
65907      arg=$1;
65908      case $arg in #(
65909      *"$as_nl"*)
65910	expr "X$arg" : "X\\(.*\\)$as_nl";
65911	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65912      esac;
65913      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65914    '
65915    export as_echo_n_body
65916    as_echo_n='sh -c $as_echo_n_body as_echo'
65917  fi
65918  export as_echo_body
65919  as_echo='sh -c $as_echo_body as_echo'
65920fi
65921
65922# The user is always right.
65923if test "${PATH_SEPARATOR+set}" != set; then
65924  PATH_SEPARATOR=:
65925  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65926    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65927      PATH_SEPARATOR=';'
65928  }
65929fi
65930
65931
65932# IFS
65933# We need space, tab and new line, in precisely that order.  Quoting is
65934# there to prevent editors from complaining about space-tab.
65935# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65936# splitting by setting IFS to empty value.)
65937IFS=" ""	$as_nl"
65938
65939# Find who we are.  Look in the path if we contain no directory separator.
65940as_myself=
65941case $0 in #((
65942  *[\\/]* ) as_myself=$0 ;;
65943  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65944for as_dir in $PATH
65945do
65946  IFS=$as_save_IFS
65947  test -z "$as_dir" && as_dir=.
65948    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65949  done
65950IFS=$as_save_IFS
65951
65952     ;;
65953esac
65954# We did not find ourselves, most probably we were run as `sh COMMAND'
65955# in which case we are not to be found in the path.
65956if test "x$as_myself" = x; then
65957  as_myself=$0
65958fi
65959if test ! -f "$as_myself"; then
65960  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65961  exit 1
65962fi
65963
65964# Unset variables that we do not need and which cause bugs (e.g. in
65965# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65966# suppresses any "Segmentation fault" message there.  '((' could
65967# trigger a bug in pdksh 5.2.14.
65968for as_var in BASH_ENV ENV MAIL MAILPATH
65969do eval test x\${$as_var+set} = xset \
65970  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65971done
65972PS1='$ '
65973PS2='> '
65974PS4='+ '
65975
65976# NLS nuisances.
65977LC_ALL=C
65978export LC_ALL
65979LANGUAGE=C
65980export LANGUAGE
65981
65982# CDPATH.
65983(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65984
65985
65986# as_fn_error STATUS ERROR [LINENO LOG_FD]
65987# ----------------------------------------
65988# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65989# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65990# script with STATUS, using 1 if that was 0.
65991as_fn_error ()
65992{
65993  as_status=$1; test $as_status -eq 0 && as_status=1
65994  if test "$4"; then
65995    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65996    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65997  fi
65998  $as_echo "$as_me: error: $2" >&2
65999  as_fn_exit $as_status
66000} # as_fn_error
66001
66002
66003# as_fn_set_status STATUS
66004# -----------------------
66005# Set $? to STATUS, without forking.
66006as_fn_set_status ()
66007{
66008  return $1
66009} # as_fn_set_status
66010
66011# as_fn_exit STATUS
66012# -----------------
66013# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66014as_fn_exit ()
66015{
66016  set +e
66017  as_fn_set_status $1
66018  exit $1
66019} # as_fn_exit
66020
66021# as_fn_unset VAR
66022# ---------------
66023# Portably unset VAR.
66024as_fn_unset ()
66025{
66026  { eval $1=; unset $1;}
66027}
66028as_unset=as_fn_unset
66029# as_fn_append VAR VALUE
66030# ----------------------
66031# Append the text in VALUE to the end of the definition contained in VAR. Take
66032# advantage of any shell optimizations that allow amortized linear growth over
66033# repeated appends, instead of the typical quadratic growth present in naive
66034# implementations.
66035if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66036  eval 'as_fn_append ()
66037  {
66038    eval $1+=\$2
66039  }'
66040else
66041  as_fn_append ()
66042  {
66043    eval $1=\$$1\$2
66044  }
66045fi # as_fn_append
66046
66047# as_fn_arith ARG...
66048# ------------------
66049# Perform arithmetic evaluation on the ARGs, and store the result in the
66050# global $as_val. Take advantage of shells that can avoid forks. The arguments
66051# must be portable across $(()) and expr.
66052if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66053  eval 'as_fn_arith ()
66054  {
66055    as_val=$(( $* ))
66056  }'
66057else
66058  as_fn_arith ()
66059  {
66060    as_val=`expr "$@" || test $? -eq 1`
66061  }
66062fi # as_fn_arith
66063
66064
66065if expr a : '\(a\)' >/dev/null 2>&1 &&
66066   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66067  as_expr=expr
66068else
66069  as_expr=false
66070fi
66071
66072if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66073  as_basename=basename
66074else
66075  as_basename=false
66076fi
66077
66078if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66079  as_dirname=dirname
66080else
66081  as_dirname=false
66082fi
66083
66084as_me=`$as_basename -- "$0" ||
66085$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66086	 X"$0" : 'X\(//\)$' \| \
66087	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66088$as_echo X/"$0" |
66089    sed '/^.*\/\([^/][^/]*\)\/*$/{
66090	    s//\1/
66091	    q
66092	  }
66093	  /^X\/\(\/\/\)$/{
66094	    s//\1/
66095	    q
66096	  }
66097	  /^X\/\(\/\).*/{
66098	    s//\1/
66099	    q
66100	  }
66101	  s/.*/./; q'`
66102
66103# Avoid depending upon Character Ranges.
66104as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66105as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66106as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66107as_cr_digits='0123456789'
66108as_cr_alnum=$as_cr_Letters$as_cr_digits
66109
66110ECHO_C= ECHO_N= ECHO_T=
66111case `echo -n x` in #(((((
66112-n*)
66113  case `echo 'xy\c'` in
66114  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66115  xy)  ECHO_C='\c';;
66116  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66117       ECHO_T='	';;
66118  esac;;
66119*)
66120  ECHO_N='-n';;
66121esac
66122
66123rm -f conf$$ conf$$.exe conf$$.file
66124if test -d conf$$.dir; then
66125  rm -f conf$$.dir/conf$$.file
66126else
66127  rm -f conf$$.dir
66128  mkdir conf$$.dir 2>/dev/null
66129fi
66130if (echo >conf$$.file) 2>/dev/null; then
66131  if ln -s conf$$.file conf$$ 2>/dev/null; then
66132    as_ln_s='ln -s'
66133    # ... but there are two gotchas:
66134    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66135    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66136    # In both cases, we have to default to `cp -pR'.
66137    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66138      as_ln_s='cp -pR'
66139  elif ln conf$$.file conf$$ 2>/dev/null; then
66140    as_ln_s=ln
66141  else
66142    as_ln_s='cp -pR'
66143  fi
66144else
66145  as_ln_s='cp -pR'
66146fi
66147rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66148rmdir conf$$.dir 2>/dev/null
66149
66150
66151# as_fn_mkdir_p
66152# -------------
66153# Create "$as_dir" as a directory, including parents if necessary.
66154as_fn_mkdir_p ()
66155{
66156
66157  case $as_dir in #(
66158  -*) as_dir=./$as_dir;;
66159  esac
66160  test -d "$as_dir" || eval $as_mkdir_p || {
66161    as_dirs=
66162    while :; do
66163      case $as_dir in #(
66164      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66165      *) as_qdir=$as_dir;;
66166      esac
66167      as_dirs="'$as_qdir' $as_dirs"
66168      as_dir=`$as_dirname -- "$as_dir" ||
66169$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66170	 X"$as_dir" : 'X\(//\)[^/]' \| \
66171	 X"$as_dir" : 'X\(//\)$' \| \
66172	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66173$as_echo X"$as_dir" |
66174    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66175	    s//\1/
66176	    q
66177	  }
66178	  /^X\(\/\/\)[^/].*/{
66179	    s//\1/
66180	    q
66181	  }
66182	  /^X\(\/\/\)$/{
66183	    s//\1/
66184	    q
66185	  }
66186	  /^X\(\/\).*/{
66187	    s//\1/
66188	    q
66189	  }
66190	  s/.*/./; q'`
66191      test -d "$as_dir" && break
66192    done
66193    test -z "$as_dirs" || eval "mkdir $as_dirs"
66194  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66195
66196
66197} # as_fn_mkdir_p
66198if mkdir -p . 2>/dev/null; then
66199  as_mkdir_p='mkdir -p "$as_dir"'
66200else
66201  test -d ./-p && rmdir ./-p
66202  as_mkdir_p=false
66203fi
66204
66205
66206# as_fn_executable_p FILE
66207# -----------------------
66208# Test if FILE is an executable regular file.
66209as_fn_executable_p ()
66210{
66211  test -f "$1" && test -x "$1"
66212} # as_fn_executable_p
66213as_test_x='test -x'
66214as_executable_p=as_fn_executable_p
66215
66216# Sed expression to map a string onto a valid CPP name.
66217as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66218
66219# Sed expression to map a string onto a valid variable name.
66220as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66221
66222
66223exec 6>&1
66224## ----------------------------------- ##
66225## Main body of $CONFIG_STATUS script. ##
66226## ----------------------------------- ##
66227_ASEOF
66228test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66229
66230cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66231# Save the log message, to keep $0 and so on meaningful, and to
66232# report actual input values of CONFIG_FILES etc. instead of their
66233# values after options handling.
66234ac_log="
66235This file was extended by OpenJDK $as_me jdk9, which was
66236generated by GNU Autoconf 2.69.  Invocation command line was
66237
66238  CONFIG_FILES    = $CONFIG_FILES
66239  CONFIG_HEADERS  = $CONFIG_HEADERS
66240  CONFIG_LINKS    = $CONFIG_LINKS
66241  CONFIG_COMMANDS = $CONFIG_COMMANDS
66242  $ $0 $@
66243
66244on `(hostname || uname -n) 2>/dev/null | sed 1q`
66245"
66246
66247_ACEOF
66248
66249case $ac_config_files in *"
66250"*) set x $ac_config_files; shift; ac_config_files=$*;;
66251esac
66252
66253
66254
66255cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66256# Files that config.status was made for.
66257config_files="$ac_config_files"
66258
66259_ACEOF
66260
66261cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66262ac_cs_usage="\
66263\`$as_me' instantiates files and other configuration actions
66264from templates according to the current configuration.  Unless the files
66265and actions are specified as TAGs, all are instantiated by default.
66266
66267Usage: $0 [OPTION]... [TAG]...
66268
66269  -h, --help       print this help, then exit
66270  -V, --version    print version number and configuration settings, then exit
66271      --config     print configuration, then exit
66272  -q, --quiet, --silent
66273                   do not print progress messages
66274  -d, --debug      don't remove temporary files
66275      --recheck    update $as_me by reconfiguring in the same conditions
66276      --file=FILE[:TEMPLATE]
66277                   instantiate the configuration file FILE
66278
66279Configuration files:
66280$config_files
66281
66282Report bugs to <build-dev@openjdk.java.net>.
66283OpenJDK home page: <http://openjdk.java.net>."
66284
66285_ACEOF
66286cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66287ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66288ac_cs_version="\\
66289OpenJDK config.status jdk9
66290configured by $0, generated by GNU Autoconf 2.69,
66291  with options \\"\$ac_cs_config\\"
66292
66293Copyright (C) 2012 Free Software Foundation, Inc.
66294This config.status script is free software; the Free Software Foundation
66295gives unlimited permission to copy, distribute and modify it."
66296
66297ac_pwd='$ac_pwd'
66298srcdir='$srcdir'
66299AWK='$AWK'
66300test -n "\$AWK" || AWK=awk
66301_ACEOF
66302
66303cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66304# The default lists apply if the user does not specify any file.
66305ac_need_defaults=:
66306while test $# != 0
66307do
66308  case $1 in
66309  --*=?*)
66310    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66311    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66312    ac_shift=:
66313    ;;
66314  --*=)
66315    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66316    ac_optarg=
66317    ac_shift=:
66318    ;;
66319  *)
66320    ac_option=$1
66321    ac_optarg=$2
66322    ac_shift=shift
66323    ;;
66324  esac
66325
66326  case $ac_option in
66327  # Handling of the options.
66328  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66329    ac_cs_recheck=: ;;
66330  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66331    $as_echo "$ac_cs_version"; exit ;;
66332  --config | --confi | --conf | --con | --co | --c )
66333    $as_echo "$ac_cs_config"; exit ;;
66334  --debug | --debu | --deb | --de | --d | -d )
66335    debug=: ;;
66336  --file | --fil | --fi | --f )
66337    $ac_shift
66338    case $ac_optarg in
66339    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66340    '') as_fn_error $? "missing file argument" ;;
66341    esac
66342    as_fn_append CONFIG_FILES " '$ac_optarg'"
66343    ac_need_defaults=false;;
66344  --he | --h |  --help | --hel | -h )
66345    $as_echo "$ac_cs_usage"; exit ;;
66346  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66347  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66348    ac_cs_silent=: ;;
66349
66350  # This is an error.
66351  -*) as_fn_error $? "unrecognized option: \`$1'
66352Try \`$0 --help' for more information." ;;
66353
66354  *) as_fn_append ac_config_targets " $1"
66355     ac_need_defaults=false ;;
66356
66357  esac
66358  shift
66359done
66360
66361ac_configure_extra_args=
66362
66363if $ac_cs_silent; then
66364  exec 6>/dev/null
66365  ac_configure_extra_args="$ac_configure_extra_args --silent"
66366fi
66367
66368_ACEOF
66369cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66370if \$ac_cs_recheck; then
66371  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66372  shift
66373  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66374  CONFIG_SHELL='$SHELL'
66375  export CONFIG_SHELL
66376  exec "\$@"
66377fi
66378
66379_ACEOF
66380cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66381exec 5>>config.log
66382{
66383  echo
66384  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66385## Running $as_me. ##
66386_ASBOX
66387  $as_echo "$ac_log"
66388} >&5
66389
66390_ACEOF
66391cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66392_ACEOF
66393
66394cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66395
66396# Handling of arguments.
66397for ac_config_target in $ac_config_targets
66398do
66399  case $ac_config_target in
66400    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66401    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66402    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66403    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66404    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66405
66406  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66407  esac
66408done
66409
66410
66411# If the user did not use the arguments to specify the items to instantiate,
66412# then the envvar interface is used.  Set only those that are not.
66413# We use the long form for the default assignment because of an extremely
66414# bizarre bug on SunOS 4.1.3.
66415if $ac_need_defaults; then
66416  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66417fi
66418
66419# Have a temporary directory for convenience.  Make it in the build tree
66420# simply because there is no reason against having it here, and in addition,
66421# creating and moving files from /tmp can sometimes cause problems.
66422# Hook for its removal unless debugging.
66423# Note that there is a small window in which the directory will not be cleaned:
66424# after its creation but before its name has been assigned to `$tmp'.
66425$debug ||
66426{
66427  tmp= ac_tmp=
66428  trap 'exit_status=$?
66429  : "${ac_tmp:=$tmp}"
66430  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66431' 0
66432  trap 'as_fn_exit 1' 1 2 13 15
66433}
66434# Create a (secure) tmp directory for tmp files.
66435
66436{
66437  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66438  test -d "$tmp"
66439}  ||
66440{
66441  tmp=./conf$$-$RANDOM
66442  (umask 077 && mkdir "$tmp")
66443} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66444ac_tmp=$tmp
66445
66446# Set up the scripts for CONFIG_FILES section.
66447# No need to generate them if there are no CONFIG_FILES.
66448# This happens for instance with `./config.status config.h'.
66449if test -n "$CONFIG_FILES"; then
66450
66451
66452ac_cr=`echo X | tr X '\015'`
66453# On cygwin, bash can eat \r inside `` if the user requested igncr.
66454# But we know of no other shell where ac_cr would be empty at this
66455# point, so we can use a bashism as a fallback.
66456if test "x$ac_cr" = x; then
66457  eval ac_cr=\$\'\\r\'
66458fi
66459ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66460if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66461  ac_cs_awk_cr='\\r'
66462else
66463  ac_cs_awk_cr=$ac_cr
66464fi
66465
66466echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66467_ACEOF
66468
66469
66470{
66471  echo "cat >conf$$subs.awk <<_ACEOF" &&
66472  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66473  echo "_ACEOF"
66474} >conf$$subs.sh ||
66475  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66476ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66477ac_delim='%!_!# '
66478for ac_last_try in false false false false false :; do
66479  . ./conf$$subs.sh ||
66480    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66481
66482  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66483  if test $ac_delim_n = $ac_delim_num; then
66484    break
66485  elif $ac_last_try; then
66486    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66487  else
66488    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66489  fi
66490done
66491rm -f conf$$subs.sh
66492
66493cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66494cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66495_ACEOF
66496sed -n '
66497h
66498s/^/S["/; s/!.*/"]=/
66499p
66500g
66501s/^[^!]*!//
66502:repl
66503t repl
66504s/'"$ac_delim"'$//
66505t delim
66506:nl
66507h
66508s/\(.\{148\}\)..*/\1/
66509t more1
66510s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66511p
66512n
66513b repl
66514:more1
66515s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66516p
66517g
66518s/.\{148\}//
66519t nl
66520:delim
66521h
66522s/\(.\{148\}\)..*/\1/
66523t more2
66524s/["\\]/\\&/g; s/^/"/; s/$/"/
66525p
66526b
66527:more2
66528s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66529p
66530g
66531s/.\{148\}//
66532t delim
66533' <conf$$subs.awk | sed '
66534/^[^""]/{
66535  N
66536  s/\n//
66537}
66538' >>$CONFIG_STATUS || ac_write_fail=1
66539rm -f conf$$subs.awk
66540cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66541_ACAWK
66542cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66543  for (key in S) S_is_set[key] = 1
66544  FS = ""
66545
66546}
66547{
66548  line = $ 0
66549  nfields = split(line, field, "@")
66550  substed = 0
66551  len = length(field[1])
66552  for (i = 2; i < nfields; i++) {
66553    key = field[i]
66554    keylen = length(key)
66555    if (S_is_set[key]) {
66556      value = S[key]
66557      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66558      len += length(value) + length(field[++i])
66559      substed = 1
66560    } else
66561      len += 1 + keylen
66562  }
66563
66564  print line
66565}
66566
66567_ACAWK
66568_ACEOF
66569cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66570if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66571  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66572else
66573  cat
66574fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66575  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66576_ACEOF
66577
66578# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66579# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66580# trailing colons and then remove the whole line if VPATH becomes empty
66581# (actually we leave an empty line to preserve line numbers).
66582if test "x$srcdir" = x.; then
66583  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66584h
66585s///
66586s/^/:/
66587s/[	 ]*$/:/
66588s/:\$(srcdir):/:/g
66589s/:\${srcdir}:/:/g
66590s/:@srcdir@:/:/g
66591s/^:*//
66592s/:*$//
66593x
66594s/\(=[	 ]*\).*/\1/
66595G
66596s/\n//
66597s/^[^=]*=[	 ]*$//
66598}'
66599fi
66600
66601cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66602fi # test -n "$CONFIG_FILES"
66603
66604
66605eval set X "  :F $CONFIG_FILES      "
66606shift
66607for ac_tag
66608do
66609  case $ac_tag in
66610  :[FHLC]) ac_mode=$ac_tag; continue;;
66611  esac
66612  case $ac_mode$ac_tag in
66613  :[FHL]*:*);;
66614  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66615  :[FH]-) ac_tag=-:-;;
66616  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66617  esac
66618  ac_save_IFS=$IFS
66619  IFS=:
66620  set x $ac_tag
66621  IFS=$ac_save_IFS
66622  shift
66623  ac_file=$1
66624  shift
66625
66626  case $ac_mode in
66627  :L) ac_source=$1;;
66628  :[FH])
66629    ac_file_inputs=
66630    for ac_f
66631    do
66632      case $ac_f in
66633      -) ac_f="$ac_tmp/stdin";;
66634      *) # Look for the file first in the build tree, then in the source tree
66635	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66636	 # because $ac_f cannot contain `:'.
66637	 test -f "$ac_f" ||
66638	   case $ac_f in
66639	   [\\/$]*) false;;
66640	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66641	   esac ||
66642	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66643      esac
66644      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66645      as_fn_append ac_file_inputs " '$ac_f'"
66646    done
66647
66648    # Let's still pretend it is `configure' which instantiates (i.e., don't
66649    # use $as_me), people would be surprised to read:
66650    #    /* config.h.  Generated by config.status.  */
66651    configure_input='Generated from '`
66652	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66653	`' by configure.'
66654    if test x"$ac_file" != x-; then
66655      configure_input="$ac_file.  $configure_input"
66656      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66657$as_echo "$as_me: creating $ac_file" >&6;}
66658    fi
66659    # Neutralize special characters interpreted by sed in replacement strings.
66660    case $configure_input in #(
66661    *\&* | *\|* | *\\* )
66662       ac_sed_conf_input=`$as_echo "$configure_input" |
66663       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66664    *) ac_sed_conf_input=$configure_input;;
66665    esac
66666
66667    case $ac_tag in
66668    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66669      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66670    esac
66671    ;;
66672  esac
66673
66674  ac_dir=`$as_dirname -- "$ac_file" ||
66675$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66676	 X"$ac_file" : 'X\(//\)[^/]' \| \
66677	 X"$ac_file" : 'X\(//\)$' \| \
66678	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66679$as_echo X"$ac_file" |
66680    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66681	    s//\1/
66682	    q
66683	  }
66684	  /^X\(\/\/\)[^/].*/{
66685	    s//\1/
66686	    q
66687	  }
66688	  /^X\(\/\/\)$/{
66689	    s//\1/
66690	    q
66691	  }
66692	  /^X\(\/\).*/{
66693	    s//\1/
66694	    q
66695	  }
66696	  s/.*/./; q'`
66697  as_dir="$ac_dir"; as_fn_mkdir_p
66698  ac_builddir=.
66699
66700case "$ac_dir" in
66701.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66702*)
66703  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66704  # A ".." for each directory in $ac_dir_suffix.
66705  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66706  case $ac_top_builddir_sub in
66707  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66708  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66709  esac ;;
66710esac
66711ac_abs_top_builddir=$ac_pwd
66712ac_abs_builddir=$ac_pwd$ac_dir_suffix
66713# for backward compatibility:
66714ac_top_builddir=$ac_top_build_prefix
66715
66716case $srcdir in
66717  .)  # We are building in place.
66718    ac_srcdir=.
66719    ac_top_srcdir=$ac_top_builddir_sub
66720    ac_abs_top_srcdir=$ac_pwd ;;
66721  [\\/]* | ?:[\\/]* )  # Absolute name.
66722    ac_srcdir=$srcdir$ac_dir_suffix;
66723    ac_top_srcdir=$srcdir
66724    ac_abs_top_srcdir=$srcdir ;;
66725  *) # Relative name.
66726    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66727    ac_top_srcdir=$ac_top_build_prefix$srcdir
66728    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66729esac
66730ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66731
66732
66733  case $ac_mode in
66734  :F)
66735  #
66736  # CONFIG_FILE
66737  #
66738
66739_ACEOF
66740
66741cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66742# If the template does not know about datarootdir, expand it.
66743# FIXME: This hack should be removed a few years after 2.60.
66744ac_datarootdir_hack=; ac_datarootdir_seen=
66745ac_sed_dataroot='
66746/datarootdir/ {
66747  p
66748  q
66749}
66750/@datadir@/p
66751/@docdir@/p
66752/@infodir@/p
66753/@localedir@/p
66754/@mandir@/p'
66755case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66756*datarootdir*) ac_datarootdir_seen=yes;;
66757*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66758  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66759$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66760_ACEOF
66761cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66762  ac_datarootdir_hack='
66763  s&@datadir@&$datadir&g
66764  s&@docdir@&$docdir&g
66765  s&@infodir@&$infodir&g
66766  s&@localedir@&$localedir&g
66767  s&@mandir@&$mandir&g
66768  s&\\\${datarootdir}&$datarootdir&g' ;;
66769esac
66770_ACEOF
66771
66772# Neutralize VPATH when `$srcdir' = `.'.
66773# Shell code in configure.ac might set extrasub.
66774# FIXME: do we really want to maintain this feature?
66775cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66776ac_sed_extra="$ac_vpsub
66777$extrasub
66778_ACEOF
66779cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66780:t
66781/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66782s|@configure_input@|$ac_sed_conf_input|;t t
66783s&@top_builddir@&$ac_top_builddir_sub&;t t
66784s&@top_build_prefix@&$ac_top_build_prefix&;t t
66785s&@srcdir@&$ac_srcdir&;t t
66786s&@abs_srcdir@&$ac_abs_srcdir&;t t
66787s&@top_srcdir@&$ac_top_srcdir&;t t
66788s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66789s&@builddir@&$ac_builddir&;t t
66790s&@abs_builddir@&$ac_abs_builddir&;t t
66791s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66792$ac_datarootdir_hack
66793"
66794eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66795  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66796
66797test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66798  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66799  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66800      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66801  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66802which seems to be undefined.  Please make sure it is defined" >&5
66803$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66804which seems to be undefined.  Please make sure it is defined" >&2;}
66805
66806  rm -f "$ac_tmp/stdin"
66807  case $ac_file in
66808  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66809  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66810  esac \
66811  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66812 ;;
66813
66814
66815
66816  esac
66817
66818done # for ac_tag
66819
66820
66821as_fn_exit 0
66822_ACEOF
66823ac_clean_files=$ac_clean_files_save
66824
66825test $ac_write_fail = 0 ||
66826  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66827
66828
66829# configure is writing to config.log, and then calls config.status.
66830# config.status does its own redirection, appending to config.log.
66831# Unfortunately, on DOS this fails, as config.log is still kept open
66832# by configure, so config.status won't be able to write to it; its
66833# output is simply discarded.  So we exec the FD to /dev/null,
66834# effectively closing config.log, so it can be properly (re)opened and
66835# appended to by config.status.  When coming back to configure, we
66836# need to make the FD available again.
66837if test "$no_create" != yes; then
66838  ac_cs_success=:
66839  ac_config_status_args=
66840  test "$silent" = yes &&
66841    ac_config_status_args="$ac_config_status_args --quiet"
66842  exec 5>/dev/null
66843  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66844  exec 5>>config.log
66845  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66846  # would make configure fail if this is the last instruction.
66847  $ac_cs_success || as_fn_exit 1
66848fi
66849if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66850  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66851$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66852fi
66853
66854
66855# After AC_OUTPUT, we need to do final work
66856
66857
66858  # Try to move config.log (generated by autoconf) to the configure-support directory.
66859  if test -e ./config.log; then
66860    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66861  fi
66862
66863  # Rotate our log file (configure.log)
66864  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66865    $RM -f "$OUTPUT_ROOT/configure.log.old"
66866  fi
66867  if test -e "$OUTPUT_ROOT/configure.log"; then
66868    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66869  fi
66870
66871  # Move configure.log from current directory to the build output root
66872  if test -e ./configure.log; then
66873    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66874  fi
66875
66876  # Make the compare script executable
66877  $CHMOD +x $OUTPUT_ROOT/compare.sh
66878
66879
66880# Finally output some useful information to the user
66881
66882  # Finally output some useful information to the user
66883
66884  printf "\n"
66885  printf "====================================================\n"
66886  if test "x$no_create" != "xyes"; then
66887    if test "x$IS_RECONFIGURE" != "xyes"; then
66888      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66889    else
66890      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66891    fi
66892  else
66893    if test "x$IS_RECONFIGURE" != "xyes"; then
66894      printf "A configuration has been successfully checked but not created\n"
66895    else
66896      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66897    fi
66898  fi
66899  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66900    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66901  else
66902    printf "using default settings.\n"
66903  fi
66904
66905  printf "\n"
66906  printf "Configuration summary:\n"
66907  printf "* Debug level:    $DEBUG_LEVEL\n"
66908  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66909  printf "* JDK variant:    $JDK_VARIANT\n"
66910  printf "* JVM variants:   $JVM_VARIANTS\n"
66911  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66912  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66913
66914  printf "\n"
66915  printf "Tools summary:\n"
66916  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66917    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66918  fi
66919  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66920  if test "x$TOOLCHAIN_VERSION" != "x"; then
66921    print_version=" $TOOLCHAIN_VERSION"
66922  fi
66923  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66924  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66925  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66926
66927  printf "\n"
66928  printf "Build performance summary:\n"
66929  printf "* Cores to use:   $JOBS\n"
66930  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66931  if test "x$CCACHE_STATUS" != "x"; then
66932    printf "* ccache status:  $CCACHE_STATUS\n"
66933  fi
66934  printf "\n"
66935
66936  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66937    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66938    printf "will result in longer build times.\n"
66939    printf "\n"
66940  fi
66941
66942  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66943    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66944    printf "These are not respected, and will be ignored. It is recommended\n"
66945    printf "that you clean your environment. The following variables are set:\n"
66946    printf "$FOUND_ALT_VARIABLES\n"
66947    printf "\n"
66948  fi
66949
66950  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66951    printf "WARNING: Your build output directory is not on a local disk.\n"
66952    printf "This will severely degrade build performance!\n"
66953    printf "It is recommended that you create an output directory on a local disk,\n"
66954    printf "and run the configure script again from that directory.\n"
66955    printf "\n"
66956  fi
66957
66958  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66959    printf "WARNING: The result of this configuration has overridden an older\n"
66960    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66961    printf "proper build. Failure to do so might result in strange build problems.\n"
66962    printf "\n"
66963  fi
66964
66965  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66966    printf "WARNING: The result of this configuration was not saved.\n"
66967    printf "You should run without '--no-create | -n' to create the configuration.\n"
66968    printf "\n"
66969  fi
66970
66971
66972
66973  # Locate config.log.
66974  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66975    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66976  elif test -e "./config.log"; then
66977    CONFIG_LOG_PATH="."
66978  fi
66979
66980  if test -e "$CONFIG_LOG_PATH/config.log"; then
66981    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66982    if test $? -eq 0; then
66983      printf "The following warnings were produced. Repeated here for convenience:\n"
66984      # We must quote sed expression (using []) to stop m4 from eating the [].
66985      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66986      printf "\n"
66987    fi
66988  fi
66989
66990